[Check_mk (english)] Make Grafana with PNP plugin work with Check_MK CRE on one host

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:

  1. 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

  2. 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; )

  1. 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

2 Likes

Since i tested it recently: this works also with Check_MK CEE :slight_smile:

BR Thomas

···

Am So., 28. Okt. 2018 um 12:06 Uhr schrieb Volker A Mönch volker@moench.net:

Hallo Thomas,

wenn das mal keine Gedankenübertragung war :slight_smile:

Ich habe mich gestern mit Grafana in einem anderen Zusammenhang beschäftigt. Aber dann kam bei mir genau diese nun von dir beantwortete Frage auf. Vielen Dank dafür!

Gruß

Volker

On Sat, Oct 27, 2018 at 7:43 PM Thomas Wittmann tom.teel@gmail.com wrote:

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:

  1. 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
  1. 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; )

  1. 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


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

Manage your subscription or unsubscribe

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en


Volker A Mönch

Mobil 0172 8625166 |

Festnetz 02051 24666

1 Like