How to create pages for pnp4nagios graphs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
roeseler
Posts: 2
Joined: Tue Jul 07, 2015 9:46 am

How to create pages for pnp4nagios graphs

Post by roeseler »

Hello.

I'm trying to create pages in pnp4nagios that should contain only one graph. For instance, I have a switch that has a graph for an interface usage 'in' and another graph for 'out'; I would like to have a page that only contains the 'in' usage graph and another page for the 'out' usage graph, so that I can have them rotating in a monTV.
I don't now if it is possible to create the pages with the GUI so I created them manually in the folder /etc/pnp4nagios/pages and added the following content:

Code: Select all

#
# Sample Page Config
#
# Global Section
# use_regex [0|1]
# page_name < your page title >
# background_pdf <pdf file>

define  page  {
        use_regex 1
        page_name switch1-nwc-interface-usage-wan1-in
}

#
# Define the first Graph
#
define graph {
        host_name       switch1        # Every host starting with 'websrv'
        service_desc    interface-usage-wan1-in      # Every service starting with 'traffic'
        source          1             # OPTIONAL Show only the first image
}

When I open the page I get the following error:
Alert: ERROR: Sorry, but we can´t find any data using config file "switch1.cfg", Read FAQ online
Any help would be appreciated.

Cheers!
roeseler
Posts: 2
Joined: Tue Jul 07, 2015 9:46 am

Re: How to create pages for pnp4nagios graphs

Post by roeseler »

Just to add that I found the root cause. The service_desc was not matching the file name at /var/lib/pnp4nagios/perfdata on the host's folder.
Everything working now!

Cheers!
kyang

Re: How to create pages for pnp4nagios graphs

Post by kyang »

Sounds great! I'll be closing this topic as resolved! Thanks for posting the answer!

If you have any more questions, feel free to create another thread!

Thank you for using the Nagios Support Forums!
Locked