Hi
i wondered if anyone is interested how to make Grafana with the PNP4nagios plugin work with Check_MK if its on one host.
I have CMK running on Ubuntu 18.04, its downloaded from MK, Grafana is installed via repository apt (but it would pretty sure be the same if installed manually)
In Grafana install PNP4nagios datasource plugin.
Unter HTTP set URL to https://localhost//pnp4nagios and set access to server.
Leave all other options untouched.
In Check_MK (here Ubuntu) do the following:
-
Goto /opt/omd/versions//share/pnp4nagios/htdocs/application/controllers and do wget “https://github.com/lingej/pnp-metrics-api/raw/master/application/controller/api.php”
-
Goto /opt/omd/sites//etc/pnp4nagios and open config.php
Navigate to line 103 and change $conf[‘auth_enabled’] = TRUE; to $conf[‘auth_enabled’] = FALSE;
Do the same with line 109 ( $conf[‘auth_multisite_enabled’] = TRUE; -> $conf[‘auth_multisite_enabled’] = FALSE; )
- Goto /opt/omd/sites/home/etc/pnp4nagios/config.d and rename the files authorisation.php to authorisation.php_old and cookie_auth.php to cookie_auth.php_old.
Then do omd restart
Then hosts and services can be added in Grafana.
For whatever reason i cannot get it to work with authentication enabled. If someone has worked this out, please let me know.
The first and third goto step have to be repeated with every update, the second one seems to keep its values after updating.
Also i wnat to note that this worked with update from 1.4 to 1.5 without issues.
BR Thomas