[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

problem with new hosts in pnp4nagios 0.6.24

Hi everybody
I’m using nagios 4.0.7 and pnp4nagios 0.6.24
All seem’s to be working fine with all the hosts I had in nagios before pnp
all the graphics are displayed ok in all this hosts
the problem comes with 2 new hosts I add after the pnp instalation
actually every thing seems to be fine
the xml and rdd files are generated ok
but when I try to display any graphic  it appear empty and some fields
apear -nan instead the values
can anybody help me or knows whats happening

thanks

Mike Romo
Screen-Shot-2014-08-15-at-4.54.12-PM.png
0
MikeRomo
Asked:
MikeRomo
  • 7
  • 6
5 Solutions
 
nick2253Commented:
I had a problem like this one one of my new hosts.  What worked for me was deleting the XML and RRD files in /usr/local/pnp4nagios/var/<Hostname>

PNP4Nagios should automatically recreate them when the next perfdata is processed.
0
 
MikeRomoAuthor Commented:
I already have done that :( the problem is in the services graphics the host ping works fine
0
 
nick2253Commented:
Did you delete the services XML and RRD files?  The host ping and each of the services should have an XML and RRD pair.  (I just realized that the location should be /usr/local/pnp4nagios/var/perfdata/<hostname>/)

The problem here is most likely that process_perfdata.pl (the PNP4Nagios data processor) is unable to process the data and therefore is not correctly writing to the RRD files.

Check the perfdata.log file:  cat perfdata.log | grep -i <hostname>

How are you using pnp4nagios?  Bulk mode?  Or something different?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
MikeRomoAuthor Commented:
yes I already delete the files twice and they are created again there are created this both files I use pnp4nagio in bulk mode and the log is this
2014-08-22 13:07:24 [5686] [2] RRDs::create /usr/local/pnp4nagios/var/perfdata/proddb01/_HOST_.rrd RRA:AVERAGE:0.5:1:2880 RRA:AVERAGE:0.5:5:2880 RRA:AVERAGE:0.5:30:4320 RRA:AVERAGE:0.5:360:5840 RRA:MAX:0.5:1:2880 RRA:MAX:0.5:5:2880 RRA:MAX:0.5:30:4320 RRA:MAX:0.5:360:5840 RRA:MIN:0.5:1:2880 RRA:MIN:0.5:5:2880 RRA:MIN:0.5:30:4320 RRA:MIN:0.5:360:5840 DS:1:GAUGE:8460:U:U DS:2:GAUGE:8460:U:U --start=1408730837 --step=60
2014-08-22 13:07:24 [5686] [2] /usr/local/pnp4nagios/var/perfdata/proddb01/_HOST_.rrd created
2014-08-22 13:07:39 [5710] [1] Found Performance Data for proddb01 / _oracle_PRO (/oracle/PRO=302996MB;346480;389790;0;433100)
2014-08-22 13:07:39 [5710] [2] RRDs::create /usr/local/pnp4nagios/var/perfdata/proddb01/_oracle_PRO.rrd RRA:AVERAGE:0.5:1:2880 RRA:AVERAGE:0.5:5:2880 RRA:AVERAGE:0.5:30:4320 RRA:AVERAGE:0.5:360:5840 RRA:MAX:0.5:1:2880 RRA:MAX:0.5:5:2880 RRA:MAX:0.5:30:4320 RRA:MAX:0.5:360:5840 RRA:MIN:0.5:1:2880 RRA:MIN:0.5:5:2880 RRA:MIN:0.5:30:4320 RRA:MIN:0.5:360:5840 DS:1:GAUGE:305:U:U --start=1408730858 --step=60
2014-08-22 13:07:39 [5710] [2] /usr/local/pnp4nagios/var/perfdata/proddb01/_oracle_PRO.rrd created

thanks
0
 
nick2253Commented:
So, it looks like everything is working correctly.

Can you try removing the template for this check command?  Let's make sure that the template isn't causing any problems.
0
 
MikeRomoAuthor Commented:
I think about doing that but I discard it because of the fact that I use the same template for other servers...let me try and I let you know
Mike
0
 
MikeRomoAuthor Commented:
nop, same thing with default templates...:(
Captura-de-pantalla-2014-08-25-a-la-s--1
0
 
nick2253Commented:
Have you verified that the data is actually in the RRD files?  To get the average files from the database:  rrdtool fetch <rrd file> AVERAGE

You might also want to check the permission on the files to make sure they are owned my nagios:nagios (or whatever user:group you are using).
0
 
MikeRomoAuthor Commented:
root@ixco-nagios:/usr/local/pnp4nagios/var/perfdata/prodbi01# rrdtool fetch _oracle.rrd AVERAGE

1408913340: -nan
1408913400: -nan
1408913460: -nan
1408913520: -nan
1408913580: -nan
1408913640: -nan
1408913700: -nan
1408913760: -nan
1408913820: -nan
1408913880: -nan
1408913940: -nan
1408914000: -nan
1408914060: -nan
1408914120: -nan
1408914180: -nan
1408914240: -nan
1408914300: -nan
1408914360: -nan
1408914420: -nan
1408914480: -nan
1408914540: -nan
1408914600: -nan
1408914660: -nan
1408914720: -nan
1408914780: -nan
1408914840: -nan
1408914900: -nan
1408914960: -nan
1408915020: -nan
1408915080: -nan
1408915140: -nan
1408915200: -nan
1408915260: -nan
1408915320: -nan
1408915380: -nan
1408915440: -nan
1408915500: -nan
1408915560: -nan
1408915620: -nan
1408915680: -nan
1408915740: -nan
1408915800: -nan
1408915860: -nan
1408915920: -nan
1408915980: -nan
1408916040: -nan
1408916100: -nan
1408916160: -nan
1408916220: -nan
1408916280: -nan
1408916340: -nan
1408916400: -nan
1408916460: -nan
1408916520: -nan
1408916580: -nan
1408916640: -nan

-rw-r--r--  1 nagios nagios    2016 Aug 25 15:43 Total_Processes.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:46 _.rrd
-rw-r--r--  1 nagios nagios    1940 Aug 25 15:46 _.xml
-rw-r--r--  1 nagios nagios  768224 Aug 25 15:48 _HOST_.rrd
-rw-r--r--  1 nagios nagios    2551 Aug 25 15:48 _HOST_.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:45 _bobjedge.rrd
-rw-r--r--  1 nagios nagios    2014 Aug 25 15:45 _bobjedge.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:45 _oracle.rrd
-rw-r--r--  1 nagios nagios    1985 Aug 25 15:45 _oracle.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:43 _oracle_BOE.rrd
-rw-r--r--  1 nagios nagios    2031 Aug 25 15:43 _oracle_BOE.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:44 _oracle_BOE_102_64.rrd
-rw-r--r--  1 nagios nagios    2092 Aug 25 15:44 _oracle_BOE_102_64.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:47 _oracle_SMP.rrd
-rw-r--r--  1 nagios nagios    2034 Aug 25 15:47 _oracle_SMP.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:44 _oracle_SMP_102_64.rrd
-rw-r--r--  1 nagios nagios    2092 Aug 25 15:44 _oracle_SMP_102_64.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:47 _sapmnt.rrd
-rw-r--r--  1 nagios nagios    1982 Aug 25 15:47 _sapmnt.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:48 _sapmnt_SPM.rrd
-rw-r--r--  1 nagios nagios    2043 Aug 25 15:48 _sapmnt_SPM.xml
-rw-r--r--  1 nagios nagios  384952 Aug 25 15:43 _usr_sap_SPM.rrd
-rw-r--r--  1 nagios nagios    2050 Aug 25 15:43 _usr_sap_SPM.xml
0
 
nick2253Commented:
Well, darn.

It's clear that the script is correctly writing to the RRD file.  However, it doesn't look like you are getting information to the script.

Can you verify that the plugin is returning valid performance data?  Compare it against the other hosts?  Be really pedantic:  check for semi-colons, spaces, etc. that might be different.
0
 
MikeRomoAuthor Commented:
Can you verify that the plugin is returning valid performance data?  Compare it against the other hosts?

you mean in the log file?
0
 
MikeRomoAuthor Commented:
I finally found out what is buggin this issue but I can't figure out how can I fix it, the problem comes  in the /check_commands/check_nrpe.cfg file
I just rename it .bak , then I delete /var/perfdata/<host> files, all templetes became default and the "new" hosts starts to generate graphics

here's my check_nrpe.cfg file can you figure out what's wrong?

I'v already change datatype to counter and heartbeat to default

greetings Mike

#
# Adapt the Template if check_command should not be the PNP Template
#
# check_command check_nrpe!check_all_local_disks
# ________0__________|             |
# ________1________________________|
#
# User ARG1
CUSTOM_TEMPLATE = 0,1
#
# Change the RRD Datatype based on the check_command Name.
# Defaults to GAUGE.
#
# Adjust the whole RRD Database
 DATATYPE = GUAGE
#
# Adjust every single DS by using a List of Datatypes.
# DATATYPE = GAUGE,GAUGE,COUNTER,COUNTER

# Use the MIN value for newly created RRD Databases.
# This value defaults to 0
 USE_MIN_ON_CREATE = 0
#
# Use the MAX value for newly created RRD Databases.
# This value defaults to 0
 USE_MAX_ON_CREATE = 0

# Use a single RRD Database per Service
# This Option is only used while creating new RRD Databases
#
 RRD_STORAGE_TYPE = SINGLE
#
# Use multiple RRD Databases per Service
# One RRD Database per Datasource.
# RRD_STORAGE_TYPE = MULTIPLE
#
# RRD_STORAGE_TYPE = SINGLE

# RRD Heartbeat in seconds
# This Option is only used while creating new RRD Databases
# Existing RRDs can be changed by "rrdtool tune"
# More on http://oss.oetiker.ch/rrdtool/doc/rrdtune.en.html
#
# This value defaults to 8640
 RRD_HEARTBEAT = 305
0
 
nick2253Commented:
By valid performance data, I meant in the Nagios window.  When you look at the details for a service, there is a performance data line.

Is this the working .cfg, or is this the bad .cfg?  I'm wondering if it's the change between GAUGE and COUNTER that is causing a problem.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now