Adding pnp4nagios datasource to Grafana

  • What Grafana version and what operating system are you using?

Grafana : Version 9.3.2

OS Version CentOS Stream 8
Mariadb: Version 15.1 Distrib 10.5.18-MariaDB, for Linux (x86_64) using readline 5.1
Nagios Core : Version 4.4.9
Nagios Plugins : Version 2.3.3
pnp4nagios : Version 0.6.26

  • What are you trying to achieve?

We are trying to add the pnp datasource from the pnp4nagios plugin to provide graphs for devices monitored by Nagios Core

  • How are you trying to achieve it?

by linking the nagios database through the pnp4nagios pluging

  • What happened?

When adding the datasource URL and username/password click on save and test we get the following errors with the http
127.0.0.1/pnp4nagios : Datasource not connected: 400 Bad Request
localhost/pnp4nagios : Datasource not connected: 400 Bad Request
/pnp4nagios : Datasource not connected: 400 Bad Request

  • What did you expect to happen?

Database should connect and allow dashboard to be created

  • Did you follow any online instructions? If so, what is the URL?

pnp4nagios : Install PNP4Nagios on Centos - ServerNoobs
grafana : https://computingforgeeks.com/how-to-install-grafana-on-rhel-8/

Hi @mikec66,

Welcome to the :grafana: community support forums !!

We are excited that you joined our OSS community. Please read about some of the FAQs in the community :slight_smile:

The Nagios is a community-based plugin for Grafana (that means we do not maintain it). I did found this page which explains as how to install and configure it.

Also, there is a GitHub page as well which seems to be very actively updated and contains more documentation.

If you still having issues, then please report the developer on their GitHub repo by creating a new issue and I am sure that they will guide you.

I hope this helps. :slight_smile:

I’ve done another clean build - installed MariDB, then Nagios Core, then pnp4nagios following all the instructions on the internet to get it working.

Nagios works without any issue, pnp4nagios shows graphs without any problems.

After installing grafana using the instructions on the website and making sure the api.php and the pnp plugins were installed using the instructions on the website I am still unable to add a pnp datasource as can be seen by the attached image.

are you set on using pnp4nagios or you willing to try something else for ex the following

https://localhost:3000/t/nagios-xi-grafana-integration/38305/6

Which is using nagios rest api.

We currently use nagios core with graphite and graphios on an centos 7 machine but as support for centos 7 is due to end soon we are trying to upgrade to centos 8 stream but graphite and graphios are not compatible.

if we could stay with core we could just copy the config files for all of the items we monitor to the new system reducing the downtime.

1 Like

the sample principle for nagios core, doesn’t it have a rest api?