Codebase list icingaweb2-module-pnp / 10bb0a85-f494-4842-9cf9-e33c62e57379/upstream
Import upstream version 1.1.0+git20200311.1.13a50ef Debian Janitor 2 years ago
10 changed file(s) with 190 addition(s) and 24 deletion(s). Raw diff Collapse all Expand all
0 .gitignore export-ignore
1 .gitattributes export-ignore
2 icingaexchange.yml export-ignore
3 icingaweb2-module-pnp4nagios.zip export-ignore
0 ## editors
1 .*.sw[op]
2 .idea/
3 *~
4
5 ## vendor stuff
6 /vendor/
0 PNP module for Icinga Web 2
1 ===========================
0 # PNP module for Icinga Web 2
21
3 General Information
4 -------------------
2 #### Table of Contents
53
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)
813
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
1315
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.
1618
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)
2221
23 TODO
24 ----
22 ## License
2523
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
1717 git checkout master
1818 git log --use-mailmap | grep ^Author: | cut -f2- -d' ' | sort | uniq > AUTHORS
1919 ```
20
21 ## Update metadata
22
23 Edit and update [module.info](module.info).
2024
2125 ## Changelog
2226
0 <?php
1
2 namespace Icinga\Module\Pnp\Controllers;
3
4 use Icinga\Module\Pnp\Web\Controller;
5
6 class SpecialController extends Controller
7 {
8 public function indexAction()
9 {
10 $url = $this->getRequest()->getUrl();
11 $queryString = $url->getQueryString();
12
13 $this->view->url = \sprintf(
14 '%s/special?%s',
15 $this->getBaseUrl(),
16 $queryString
17 );
18
19 $this->getTabs()->add('special', [
20 'label' => $this->translate('Special'),
21 'url' => $url,
22 ])->activate('special');
23
24 $this->setViewScript('index/iframe');
25 }
26 }
Binary diff not shown
0 name: PNP
1 description: "file:///README.md"
2 url: "https://dev.icinga.org/projects/icingaweb2-module-pnp"
3 tags: PNP, Charts, RRD, Performance Data, Monitoring
4 vendor: Icinga
5 target: Icinga Web 2
6 type: Module
7 license: gplv2
8 releases:
9 -
10 name: v1.0.1
11 description: "Current"
12 files:
13 -
14 name: icingaweb2-module-pnp.zip
15 url: "https://github.com/Icinga/icingaweb2-module-pnp/archive/v1.0.1.zip"
16 description: Module file for Icinga Web 2
17 checksum: d13f5137eee30958543ff05e51f2355c
00 Name: PNP4Nagios
1 Version: 1.0.1
1 Version: 1.1.0
22 Depends: monitoring>=2.1.0
33 Description: Timeseries grapher integration for PNP4Nagios
44 PNP is an addon to Icinga or Nagios which analyzes performance data