Using PNP4Nagios

Daniel Bareiro daniel-listas at gmx.net
Mon Jun 21 19:19:40 CEST 2010


Hi, Jim.

On Monday, 21 June 2010 12:32:00 +0100,
Jim Avery wrote:

> > I'm testing PNP4Nagios, but for some reason I'm just looking
> > graphics for services in the Nagios server. For the rest of the
> > remote hosts, when I click on the some red star, I get something
> > like this:
> >
> > Initalising
> > (OK) Using /usr/local/nagios/share/perfdata/
> > (OK) RRDTool /usr/bin/rrdtool found.
> > (OK) RRDTool /usr/bin/rrdtool is executable
> > (OK) PHP Function proc_open is enabled
> > (OK) PHP Function fpassthru is enabled
> > (OK) PHP Function xml_parser_create is enabled
> > (OK) PHP zlib Support found.
> > (OK) PHP GD Support found.
> > (OK) RRD Base Directory /usr/local/nagios/share/perfdata/ found.
> > (OK) Hostname Router is set.
> > (!)  Directory /usr/local/nagios/share/perfdata/alderamin not found.
> >
> > Where Alderamin is the hostname. In the service status interface,
> > the Nagios server shows no red stars for the host or for services.
> > However I can access their information through the following URL:
> >
> > http://ws1/nagios/pnp/index.php
> >
> >
> > These are the lines I've in /usr/local/nagios/etc/nagios.cfg for
> > pnp4nagios:
> >
> >
> > broker_module=/usr/local/nagios/bin/npcdmod.o
> >
> > process_performance_data=1
> > enable_environment_macros=1
> >
> > host_perfdata_command=process-host-perfdata
> > service_perfdata_command=process-service-perfdata
> >
> >
> > In /usr/local/nagios/etc/objects/mynet.cfg I added "srv-pnp" to the
> > service definitions in the directive "use" and I added "host-pnp" to
> > the directive "use" in the hosts definitions. Also, I'm using
> > "process_perf_data 0" in both hosts and services definitions.

> The srv-pnp and host-pnp templates will set the process_perf_data
> directive like so:
> 
>   process_perf_data   1
> 
> If you override this by setting process_perf_data to 0 in the host or
> service definition, this will stop PNP from generating the graph!
> 
> I recommend you remove the line which says "process_perf_data 0" from
> those service and host definitions in "mynet.cfg" which use the
> srv-pnp and host-pnp template.

Good. This made the difference. Now I can see the graphics on all remote
hosts but I can not see them on the host on which Nagios is installed.
But I found why this is. I was missing add "host-pnp" and "srv-pnp" in
the directive "use" in /usr/local/nagios/etc/objects/localhost.cfg file.

There are services that are failing to be plotted but I believe that it
is because they are not providing information for perfdata, as in the
case of check_md_raid. In the "service state information" table for the
check_md_raid service, the "performance data" is empty.

But I don't believe that it has much sense, for this particular case, to
make some type of graph. Perhaps for this case it may be desirable to
set process_perf_data to 0.

check_ssh and check_local_procs don't give information for perfdata
either.

On the other hand, I've a router whose host_name is "Router#1". It
appears that the "#" was causing a conflict that would prevent the
creation of the directory to keep track of charting. After removing this
character, the problem was solved.

For this router I'm checking three services: Enet0, PING, uptime. Of
these three services, only PING (check_ping) is providing perfdata
information. Uptime is obtained using check_snmp and in this case it
would not have sense to plotting these values. But the values of the
Enet0 interface (check_snmp_int [1]) can be useful.



Thanks for your reply.

Regards,
Daniel

[1] http://nagios.manubulon.com/snmp_int.html
-- 
Fingerprint: BFB3 08D6 B4D1 31B2 72B9  29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100621/4ac6bea9/attachment.sig>
-------------- next part --------------
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list