]> granicus.if.org Git - icinga2/blob - doc/13-addons.md
Enhance Agent best practices throughout the documentation
[icinga2] / doc / 13-addons.md
1 # Icinga 2 Addons <a id="addons"></a>
2
3 ## Graphing <a id="addons-graphing"></a>
4
5 ### Graphite <a id="addons-graphing-graphite"></a>
6
7 [Graphite](https://graphite.readthedocs.org/en/latest/) is a time-series database
8 storing collected metrics and making them available through restful apis
9 and web interfaces.
10
11 Graphite consists of 3 software components:
12
13 * carbon -- a Twisted daemon that listens for time-series data
14 * whisper -- a simple database library for storing time-series data (similar in design to RRD)
15 * graphite webapp -- a Django webapp that renders graphs on-demand using Cairo
16
17 You need to install Graphite first, then proceed with configuring it in Icinga 2.
18
19 Use the [GraphiteWriter](14-features.md#graphite-carbon-cache-writer) feature
20 for sending real-time metrics from Icinga 2 to Graphite.
21
22 ```
23 # icinga2 feature enable graphite
24 ```
25
26 A popular alternative frontend for Graphite is for example [Grafana](https://grafana.org).
27
28 Integration in Icinga Web 2 is possible by installing the official [graphite module](https://icinga.com/docs/graphite/latest/).
29
30 ![Icinga Web 2 Detail View with Graphite](images/addons/icingaweb2_graphite.png)
31
32
33 ### InfluxDB <a id="addons-graphing-influxdb"></a>
34
35 [InfluxDB](https://influxdb.com) is a time series, metrics, and analytics database.
36 It’s written in Go and has no external dependencies.
37
38 Use the [InfluxdbWriter](14-features.md#influxdb-writer) feature
39 for sending real-time metrics from Icinga 2 to InfluxDB.
40
41 ```
42 # icinga2 feature enable influxdb
43 ```
44
45 A popular frontend for InfluxDB is for example [Grafana](https://grafana.org).
46
47 Integration in Icinga Web 2 is possible by installing the community [Grafana module](https://github.com/Mikesch-mp/icingaweb2-module-grafana).
48
49 ![Icinga Web 2 Detail View with Grafana](images/addons/icingaweb2_grafana.png)
50
51
52 ### PNP <a id="addons-graphing-pnp"></a>
53
54 [PNP](https://www.pnp4nagios.org) is a graphing addon.
55
56 [PNP](https://www.pnp4nagios.org) is an addon which adds a graphical representation of the performance data collected
57 by the monitoring plugins. The data is stored as rrd (round robin database) files.
58
59 Use your distribution's package manager to install the `pnp4nagios` package.
60
61 If you're planning to use it, configure it to use the
62 [bulk mode with npcd and npcdmod](https://docs.pnp4nagios.org/pnp-0.6/modes#bulk_mode_with_npcd_and_npcdmod)
63 in combination with Icinga 2's [PerfdataWriter](14-features.md#writing-performance-data-files). NPCD collects the performance
64 data files which Icinga 2 generates.
65
66 Enable performance data writer in icinga 2
67
68 ```
69 # icinga2 feature enable perfdata
70 ```
71
72 Configure npcd to use the performance data created by Icinga 2:
73
74 ```
75 vim /etc/pnp4nagios/npcd.cfg
76 ```
77
78 Set `perfdata_spool_dir = /var/spool/icinga2/perfdata` and restart the `npcd` daemon.
79
80 There's also an Icinga Web 2 module for direct PNP graph integration
81 available at [Icinga Exchange](https://exchange.icinga.com/icinga/PNP).
82
83 ## Visualization <a id="addons-visualization"></a>
84
85 ### Maps <a id="addons-visualization-maps"></a>
86
87 This community module displays host objects as markers on openstreetmap in Icinga Web 2.
88 It uses the data provided by the monitoring module and as such the [DB IDO](14-features.md#db-ido)
89 from Icinga 2.
90
91 If you configure multiple hosts with the same coordinates, i.e. servers in a datacenter, a clustered view is rendered.
92
93 Check the  [Map module docs](https://github.com/nbuchwitz/icingaweb2-module-map) for more details on
94 installation, configuration and integration.
95
96 ![Icinga Web 2 Maps](images/addons/icingaweb2_maps.png)
97
98 ### Dashing Dashboard <a id="addons-visualization-dashing-dashboard"></a>
99
100 The [Icinga 2 dashboard](https://github.com/dnsmichi/dashing-icinga2) is built
101 on top of Dashing and uses the [REST API](12-icinga2-api.md#icinga2-api) to visualize what's going
102 on with your monitoring. It combines several popular widgets and provides development
103 instructions for your own implementation.
104
105 The dashboard also allows to embed the [Icinga Web 2](https://icinga.com/products/icinga-web-2/)
106 host and service problem lists as Iframe.
107
108 ![Dashing dashboard](images/addons/dashing_icinga2.png)
109
110 ### Business Process <a id="addons-business-process"></a>
111
112 Create top-level views of your applications in a graphical editor.
113 Rules express dependencies between existing hosts and services and
114 let you alert on application level. Business processes are displayed
115 in a tree or list overview and can be added to any dashboard.
116
117 ![Icinga Web 2 Business Process](images/addons/icingaweb2_businessprocess.png)
118
119 ### NagVis <a id="addons-visualization-nagvis"></a>
120
121 By using the [DB IDO](14-features.md#db-ido) feature
122 you can create your own network maps
123 based on your monitoring configuration and status data using [NagVis](https://www.nagvis.org).
124
125 The configuration in nagvis.ini.php should look like this for Livestatus for example:
126
127 ```
128 [backend_live_1]
129 backendtype="mklivestatus"
130 socket="unix:/var/run/icinga2/cmd/livestatus"
131 ```
132
133 If you are planning an integration into Icinga Web 2, look at [this module](https://github.com/Icinga/icingaweb2-module-nagvis).
134
135 ### Icinga Reporting <a id="addons-visualization-reporting"></a>
136
137 By enabling the [DB IDO](14-features.md#db-ido) feature you can use the
138 [Icinga Reporting package](https://icinga.com/docs/icinga1/latest/en/reporting.html).
139
140 ### Thruk <a id="addons-visualization-thruk"></a>
141
142 [Thruk](https://www.thruk.org) is an alternative web interface which can be used with Icinga 2
143 and the [Livestatus](14-features.md#setting-up-livestatus) feature.
144
145 ## Log Monitoring <a id="log-monitoring"></a>
146
147 Using [Logstash](https://www.elastic.co/guide/en/logstash/current/introduction.html) or
148 [Graylog](https://www.graylog.org) in your infrastructure and correlate events with your monitoring
149 is even simpler these days.
150
151 * Use the `GelfWriter` feature to write Icinga 2's check and notification events to Graylog or Logstash.
152 * Configure the logstash `nagios` output to send passive traps to Icinga 2 using the external command pipe.
153 * Execute a plugin to check Graylog alert streams.
154
155 More details can be found in [this blog post](https://icinga.com/2014/12/02/team-icinga-at-osmc-2014/).
156
157 ## Notification Scripts and Interfaces <a id="notification-scripts-interfaces"></a>
158
159 There's a variety of resources available, for example different notification scripts such as:
160
161 * E-Mail ([examples](03-monitoring-basics.md#alert-notifications) provided)
162 * SMS
163 * Pager (XMPP, etc.)
164 * Twitter
165 * IRC
166 * Ticket systems
167 * etc.
168
169 Additionally external services can be [integrated with Icinga 2](https://icinga.com/products/integrations/):
170
171 * [Pagerduty](https://icinga.com/products/integrations/pagerduty/)
172 * [VictorOps](https://icinga.com/products/integrations/victorops/)
173 * [StackStorm](https://icinga.com/products/integrations/stackstorm/)
174
175 More information can be found on the [Icinga Website](https://icinga.com/).
176
177 ## Configuration Management Tools <a id="configuration-tools"></a>
178
179 If you require your favourite configuration tool to export the Icinga 2 configuration, please get in
180 touch with their developers. The Icinga project does not provide a configuration web interface
181 yet. Follow the [Icinga Blog](https://icinga.com/blog/) for updates on this topic.
182
183 If you're looking for puppet manifests, chef cookbooks, ansible recipes, etc. -- we're happy
184 to integrate them upstream, so please get in touch with the [Icinga team](https://icinga.com/community/).
185
186 These tools are currently in development and require feedback and tests:
187
188 * [Ansible Roles](https://github.com/Icinga/icinga2-ansible)
189 * [Puppet Module](https://github.com/Icinga/puppet-icinga2)
190 * [Chef Cookbook](https://github.com/Icinga/chef-icinga2)
191
192 ## More Addon Integration Hints <a id="addon-integration-hints"></a>
193
194 ### PNP Action Url <a id="addons-graphing-pnp-action-url"></a>
195
196 They work in a similar fashion for Icinga 2 and are used for 1.x web interfaces (Icinga Web 2 doesn't require
197 the action url attribute in its own module).
198
199 ```
200 template Host "pnp-hst" {
201   action_url = "/pnp4nagios/graph?host=$HOSTNAME$"
202 }
203
204 template Service "pnp-svc" {
205   action_url = "/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$"
206 }
207 ```
208