Check_mk to Graphana with plugin PNP4Nagios

Hello,

After having succeeded to send log to Influxdb and Grafana, I want to learn to send it with PNP4Nagios plugin (some time I have to use RAW version).

I follow this link : [Check_mk (english)] Make Grafana with PNP plugin work with Check_MK CRE on one host

Check_mk 2.0.0p7 (CFE) : http://192.168.187.139/
Grafana : Grafana v8.0.4 : http://192.168.187.131:3000

On Grafana I do :

# grafana-cli plugins install sni-pnp-datasource
# systemctl restart grafana-server

On check_mk I do :

cd /opt/omd/versions/2.0.0p7.cfe/share/pnp4nagios/htdocs/application/controllers/
wget https://raw.githubusercontent.com/lingej/pnp-metrics-api/master/application/controller/api.php

Then I edit config.php

# nano /opt/omd/sites/testinflux/etc/pnp4nagios/config.php

#$conf['auth_enabled'] = TRUE;
$conf['auth_enabled'] = FALSE;

#$conf['auth_multisite_enabled']  = TRUE;
$conf['auth_multisite_enabled']  = FALSE;

Then,
# cd opt/omd/sites/home/etc/pnp4nagios/config.d

# mv authorisation.php authorisation.php_old 
# mv cookie_auth.php cookie_auth.php_old

And :
# omd restart

So, at this point I think Grafana database is OK :

However, I don’t have data :

Maybe it’s because I have error here :

http://192.168.187.139/testinflux/pnp4nagios/index.php/graph

As @dns_es and @KONY say here : Grafana connection to pnp4nagios with checkmk raw - #6 by dns_es
I try to selected Access over “Browser” instead of “Server(default)” .

But I have error :

If any one can help me to fix, I will be very grateful.

Thank you.

As you use the free edition it has no PNP4Nagios active anymore.
The free edition is the same as the enterprise with 25 host limit.
Also with the raw edition of 2.0 you can have problems as the PNP4Nagios is not working anymore there for 100%.

Yes,
Maybe I will try PNP4Nagios with 1.6.
Maybe 2.x RAW will permit to sent log to Influxdb ^^

Hello,
I do the same with RAW version, and that works !

You say : Also with the raw edition of 2.0 you can have problems as the PNP4Nagios is not working anymore there for 100%.

I think is not my problem, on prefius test, I try to use Nagios with CFE but on documentation, I see that :

So the CFE version don’t works with nagios.

So now it’s ok, but for send log to grafana with PNP4Nagios, we have to use Check_mk RAW, else, with free/entreprise, we have to use InfluxDB.

I think it is a little bit different. With the PNP4Nagios connector inside grafana you pull the data from PNP4Nagios every time your draw a graph. Datastorage is here the monitoring server with it’s rrd files.
The InfluxDB version sent’s really all data to the DB and grafana then takes the data from InfluxDB as it does it with other data from there. I don’t want to say what is better is it depends on your usage.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.