0 | |
PNP module for Icinga Web 2
|
1 | |
===========================
|
|
0 |
# PNP module for Icinga Web 2
|
2 | 1 |
|
3 | |
General Information
|
4 | |
-------------------
|
|
2 |
#### Table of Contents
|
5 | 3 |
|
6 | |
PNP is an addon to Icinga which analyzes performance data provided by plugins
|
7 | |
and stores them automatically into RRD-databases.
|
|
4 |
1. [About](#about)
|
|
5 |
2. [License](#license)
|
|
6 |
3. [Support](#support)
|
|
7 |
4. [Requirements](#requirements)
|
|
8 |
5. [Installation](#installation)
|
|
9 |
6. [Configuration](#configuration)
|
|
10 |
7. [FAQ](#faq)
|
|
11 |
8. [Thanks](#thanks)
|
|
12 |
9. [Contributing](#contributing)
|
8 | 13 |
|
9 | |
This module integrates PNP4Nagios into your
|
10 | |
[Icinga Web 2](https://www.icinga.org/icinga/screenshots/icinga-web-2/)
|
11 | |
frontend. It requires [PNP4Nagios](https://docs.pnp4nagios.org/)
|
12 | |
to installed and configured.
|
|
14 |
## About
|
13 | 15 |
|
14 | |
Installation
|
15 | |
------------
|
|
16 |
This module integrates [PNP](https://docs.pnp4nagios.org/) into [Icinga Web 2](https://www.icinga.com/products/icinga-web-2/)
|
|
17 |
and allows you to view beautiful graphs in the host/service detail view.
|
16 | 18 |
|
17 | |
Just drop this module to a folder named `pnp` in one of your Icinga Web 2 module
|
18 | |
directories. Then enable it in your frontend (Configuration -> Modules -> pnp
|
19 | |
-> enable) and it should work out of the box. Check the modules config tab right
|
20 | |
there in case you are using a customized installation instead of standard
|
21 | |
PNP4Nagios packages.
|
|
19 |
[![Detail View](doc/screenshot/detail_view.png)](doc/screenshot/detail_view.png)
|
|
20 |
[![Iframe](doc/screenshot/iframe.png)](doc/screenshot/iframe.png)
|
22 | 21 |
|
23 | |
TODO
|
24 | |
----
|
|
22 |
## License
|
25 | 23 |
|
26 | |
We should also provide an easy way to integrate our authentication and
|
27 | |
permission system into PNP4Nagios. This would require a small wrapper doing an
|
28 | |
embedded Icinga Web 2 bootstrap in order to provide our user object and a list
|
29 | |
of allowed hosts/services to PNP4Nagios.
|
|
24 |
Icinga Web 2 and this Icinga Web 2 module are licensed under the terms of the GNU General Public License Version 2, you will find a copy of this license in the LICENSE file included in the source package.
|
|
25 |
|
|
26 |
## Support
|
|
27 |
|
|
28 |
Join the [Icinga community channels](https://www.icinga.com/community/get-involved/) for questions.
|
|
29 |
|
|
30 |
## Requirements
|
|
31 |
|
|
32 |
This module glues PNP and Icinga Web 2 together. Both of them are required
|
|
33 |
to be installed and configured:
|
|
34 |
|
|
35 |
* [Icinga Web 2](https://www.icinga.com/products/icinga-web-2/) (>= 2.4.1)
|
|
36 |
* [PNP](https://docs.pnp4nagios.org/) (>= 0.6.25)
|
|
37 |
|
|
38 |
|
|
39 |
## Installation
|
|
40 |
|
|
41 |
Extract this module to your Icinga Web 2 modules directory as `pnp` directory.
|
|
42 |
|
|
43 |
Git clone:
|
|
44 |
|
|
45 |
```
|
|
46 |
cd /usr/share/icingaweb2/modules
|
|
47 |
git clone https://github.com/Icinga/icingaweb2-module-pnp.git pnp
|
|
48 |
```
|
|
49 |
|
|
50 |
|
|
51 |
Tarball download (latest [release](https://github.com/Icinga/icingaweb2-module-pnp/releases/latest)):
|
|
52 |
|
|
53 |
```
|
|
54 |
cd /usr/share/icingaweb2/modules
|
|
55 |
wget https://github.com/Icinga/icingaweb2-module-pnp/archive/v1.1.0.zip
|
|
56 |
unzip v1.1.0.zip
|
|
57 |
mv icingaweb2-module-pnp-1.1.0 pnp
|
|
58 |
```
|
|
59 |
|
|
60 |
### Enable Icinga Web 2 module
|
|
61 |
|
|
62 |
Enable the module in the Icinga Web 2 frontend in `Configuration -> Modules -> pnp -> enable`.
|
|
63 |
You can also enable the module by using the `icingacli` command:
|
|
64 |
|
|
65 |
```
|
|
66 |
icingacli module enable pnp
|
|
67 |
```
|
|
68 |
|
|
69 |
## Configuration
|
|
70 |
|
|
71 |
### PNP Configuration
|
|
72 |
|
|
73 |
The base URL for PNP (e.g. `/pnp4nagios`) must be accessible on the webserver.
|
|
74 |
|
|
75 |
There is an [open issue](https://github.com/Icinga/icingaweb2-module-pnp/issues/29)
|
|
76 |
for forwarding the Icinga Web 2 auth session to PNP.
|
|
77 |
|
|
78 |
### Module Configuration
|
|
79 |
|
|
80 |
Navigate to `Modules - PNP - Config` and specify the settings.
|
|
81 |
|
|
82 |
[![Configuration](doc/screenshot/config_form.png)](doc/screenshot/config_form.png)
|
|
83 |
|
|
84 |
## FAQ
|
|
85 |
|
|
86 |
### Duplicated Graphs in Detail View
|
|
87 |
|
|
88 |
There is a problem with `config.php` and `config_local.php`
|
|
89 |
in PNP (discussion [here](https://monitoring-portal.org/index.php?thread/35865-doppelte-eintr%C3%A4ge-im-icinga2-mit-pnp/&postID=228011#post228011)).
|
|
90 |
|
|
91 |
Remove the duplicated views in one of them, e.g. in `config_local.php`:
|
|
92 |
|
|
93 |
```
|
|
94 |
- $views[] = array('title' => '4 Hours', 'start' => (60*60*4) );
|
|
95 |
- $views[] = array('title' => '25 Hours', 'start' => (60*60*25) );
|
|
96 |
- $views[] = array('title' => 'One Week', 'start' => (60*60*25*7) );
|
|
97 |
- $views[] = array('title' => 'One Month', 'start' => (60*60*24*32) );
|
|
98 |
- $views[] = array('title' => 'One Year', 'start' => (60*60*24*380) );
|
|
99 |
```
|
|
100 |
|
|
101 |
The related issue can be found [here](https://github.com/Icinga/icingaweb2-module-pnp/issues/18).
|
|
102 |
|
|
103 |
### Preview Graphs Missing in Detail View
|
|
104 |
|
|
105 |
First off, the module needs to read the local PNP configuration files and as such
|
|
106 |
you need to ensure that the path can be read by the web server user. SELinux may prevent
|
|
107 |
this too next to wrong permissions or wrong paths. This path defaults to
|
|
108 |
`/etc/pnp4nagios` and requires adjustments for your own needs.
|
|
109 |
If the module is not able to read the configuration, an error will be logged
|
|
110 |
to the debug log and no graph will be rendered.
|
|
111 |
|
|
112 |
Also ensure that the user who is not seeing the graphs actually has the permission
|
|
113 |
to view the PNP module. Navigate into your roles configuration and verify that.
|
|
114 |
|
|
115 |
PNP stores meta information in an XML file next to the actual RRD file. If this file
|
|
116 |
is missing in your RRD data store, the module won't render graphs. Verify that PNP and
|
|
117 |
NPCD are running and troubleshoot why metrics are not updated. The debug level helps here.
|
|
118 |
|
|
119 |
Last but not least, if there are no graphs available, the detail view won't show any graphs.
|
|
120 |
You can verify that by opening the native PNP interface and search for the corresponding host
|
|
121 |
or service.
|
|
122 |
|
|
123 |
## Thanks
|
|
124 |
|
|
125 |
|
|
126 |
|
|
127 |
|
|
128 |
## Contributing
|
|
129 |
|
|
130 |
There are many ways to contribute to the Icinga Web module for PNP --
|
|
131 |
whether it be sending patches, testing, reporting bugs, or reviewing and
|
|
132 |
updating the documentation. Every contribution is appreciated!
|
|
133 |
|
|
134 |
|
|
135 |
|