nagiosgraph.conf and heartbeats

emilio65
2012-02-16
2013-12-10
  • emilio65

    emilio65 - 2012-02-16

    Hi expert
    In nagios I check the disk space availability each 30 minutes (1800 secs)
    In order to get a graph of the % used space I put in nagiosgraph.conf this line

    heartbeats = .*,Check_Disco_D_RRD,.*=1850

    Check_Disco_D_RRD is the service name.

    This line seems doesn't work  and I get and empty graph

    Some one could tell me where is my error ?
    Thanks and Regards
    Emilio

     
  • Matthew Wall

    Matthew Wall - 2012-02-16

    if you sample every 30 minutes, you should specify these:

    stepsizes=.*,Check_Disco_D_RRD,.*=1800
    heartbeats=.*,Check_Disco_D_RRD,.*=3600
    

    the stepsize should be equal to the nagios sampling interval, and the heartbeat should be twice the stepsize.

    however, there is a bigger problem - a bug in nagiosgraph 1.4.4.  see the FAQ 'What settings control the amount and frequency of data stored?' for the fix.  it has been fixed in 1.4.5.

     
  • Matthew Wall

    Matthew Wall - 2012-02-16

    i hope to release 1.4.5 in the next week or two.  the release is nearly complete, but i still need to do testing on various platforms and configurations.

     
  • emilio65

    emilio65 - 2012-02-22

    this info set in nagiosgraph.conf don't work

    stepsizes=.*,Check_Disco_D_RRD,.*=1800
    heartbeats=.*,Check_Disco_D_RRD,.*=3600

    Justo to confirm this I set the debug option in the nagiosgrap.con file:

    debug_insert = 5
    # if this is set to a hostname, then only log for this host
    debug_insert_host = SVZVRDBVVC001W8
    # if this is set to a service, then only log for this service
    debug_insert_service = Check_Disco_D_RRD

    and the I delete the rrd file
    Check_Disco_D_RRD___DISCO.rrd

    Here what I found in the nagios log file
    Wed Feb 22 14:24:15 2012 insert.pl debug insert.pl processing started
    Wed Feb 22 14:24:15 2012 insert.pl debug getrules(/etc/nagiosgraph/map)
    Wed Feb 22 14:24:15 2012 insert.pl debug readperfdata: perflog is /var/nagios/perfdatagraph.log
    Wed Feb 22 14:24:15 2012 insert.pl info read 139 lines from perflog
    Wed Feb 22 14:24:15 2012 insert.pl debug processdata (139 lines)
    Wed Feb 22 14:24:15 2012 insert.pl warn processdata: no service found:
    connected users||connect_users=77;500;550
    Wed Feb 22 14:24:15 2012 insert.pl debug getdebug debug_insert = 5
    Wed Feb 22 14:24:15 2012 insert.pl debug getdebug debug_insert_host = SVZVRDBVVC001W8
    Wed Feb 22 14:24:15 2012 insert.pl debug getdebug debug_insert_service = Check_Disco_D_RRD
    Wed Feb 22 14:24:15 2012 insert.pl debug processdata data = [
      '1329917016',
      'SVZVRDBVVC001W8',
      'Check_Disco_D_RRD',
      'OK: hd D in use 42.52 perc and 17.24 GB free w-800 c-500',
      'DISCO=42.52%;'
    Wed Feb 22 14:24:15 2012 insert.pl info processing output/perfdata:
    hostname:SVZVRDBVVC001W8
    servicedesc:Check_Disco_D_RRD
    output:OK: hd D in use 42.52 perc and 17.24 GB free w-800 c-500
    perfdata:DISCO=42.52%;
    Wed Feb 22 14:24:15 2012 insert.pl debug createrrd(1329917015,SVZVRDBVVC001W8,Check_Disco_D_RRD,DISCO)
    Wed Feb 22 14:24:15 2012 insert.pl debug createrrd rrdfile is /var/nagiosgraph/rrd/SVZVRDBVVC001W8/Check_Disco_D_RRD___DISCO.rrd
    Wed Feb 22 14:24:15 2012 insert.pl debug createrrd step=300 heartbeat=1000 xff=0.5 resolutions=4 steps=1 6 24 288
    Wed Feb 22 14:24:15 2012 insert.pl debug labels-> = [
      'data',
      'GAUGE',
      '42.52'
    Wed Feb 22 14:24:15 2012 insert.pl info runcreate creating RRD: DS = [
      '/var/nagiosgraph/rrd/SVZVRDBVVC001W8/Check_Disco_D_RRD___DISCO.rrd',
      '-start',
      1329917015,
      '-step',
      300,
      'DS:data:GAUGE:1000:U:U',
      'RRA:AVERAGE:0.5:1:600',
      'RRA:AVERAGE:0.5:6:700',
      'RRA:AVERAGE:0.5:24:775',
      'RRA:AVERAGE:0.5:288:797'
    Wed Feb 22 14:24:16 2012 insert.pl debug createrrd filenames = [
      'Check_Disco_D_RRD___DISCO.rrd'
    Wed Feb 22 14:24:16 2012 insert.pl debug createrrd datasets = [
        0
    Wed Feb 22 14:24:16 2012 insert.pl info runupdate dataset = [
      '/var/nagiosgraph/rrd/SVZVRDBVVC001W8/Check_Disco_D_RRD___DISCO.rrd',
      '1329917016:42.52'
    Wed Feb 22 14:24:16 2012 insert.pl info processed 121 of 139 lines
    Wed Feb 22 14:24:16 2012 insert.pl debug insert.pl processing complete
    Wed Feb 22 14:25:04 2012 insert.pl debug insert.pl processing started
    Wed Feb 22 14:25:04 2012 insert.pl debug getrules(/etc/nagiosgraph/map)
    Wed Feb 22 14:25:04 2012 insert.pl debug readperfdata: perflog is /var/nagios/perfdatagraph.log
    Wed Feb 22 14:25:04 2012 insert.pl info read 31 lines from perflog
    Wed Feb 22 14:25:04 2012 insert.pl debug processdata (31 lines)
    Wed Feb 22 14:25:04 2012 insert.pl warn processdata: no service found:
    ed users||connect_users=40;100;200
    Wed Feb 22 14:25:04 2012 insert.pl info processed 23 of 31 lines
    Wed Feb 22 14:25:04 2012 insert.pl debug insert.pl processing complete

    The step is 300 and the hearbeat is 1000  (both default value)

    I can see the same info with the command
    rrdtool info /var/nagiosgraph/rrd/SVZVRDBVVC001W8/Check_Disco_D_RRD___DISCO.rrd'

    Many thanks for all your help

     
  • Matthew Wall

    Matthew Wall - 2012-02-22

    there is a bug in 1.4.4 that causes nagiosgraph to ignore 'stepsizes' and 'heartbeats'. in the function 'readconfig' in ngshared.pm (line 805) change:

    chomp $key
    

    to:

    chop $key
    
     
  • Matthew Wall

    Matthew Wall - 2012-02-22

    btw, what nagios plugin are you using to check for number of users?

    the log shows odd entries about 'no service found' for a nagios plugin with output of:

    ed users||connect_users=40;100;200
    
     
  • emilio65

    emilio65 - 2012-02-22

    OK , I modified the chomp to chop and now I the RRD file seems well configured
    (rrdtool info command show the step=1800 and heatbeat=3600)

    About the connected user :
    Are the user connected to MS SQL.
    I use the nagios : check check_mssql_health and in the status information I see
    OK - 34 connected users

    The Performance Data are connect_users=34;500;550
    500 is warning limit and 550 is critical limit
    At the moment (also as you see , there is the error in the log) I'm able to
    get the right RRD file with the 3 datas (number user, warning and critical)

     
  • Marco Murtas

    Marco Murtas - 2013-11-20

    Hi,

    I use nagiosgraph 1.4.4.

    As reported in the official doc "A typo in 1.4.3 and 1.4.4 prevents the specification of stepsizes, heartbeats, and resolutions. It has been fixed in 1.4.5."

    I do not find the versione 1.4.5 (it is available?), but I tried this info:

    there is a bug in 1.4.4 that causes nagiosgraph to ignore 'stepsizes' and 'heartbeats'.
    in the function 'readconfig' in ngshared.pm (line 805) change:
    chomp $key
    to:
    chop $key

    Within my Nagios there are some services checked every 30 secs. This is the current link of the graph (useful to read the hostname, the service and the database).
    .../nagiosgraph/cgi-bin/show.cgi?host=X14-mtc&service=Beacon_Power_Level&db=mtc_beacon

    I'd like to graph the values every 30secs so I changed the following variables

    heartbeats = X14-mtc,Beacon_Power_Level,.=60
    stepsizes = X14-mtc,Beacon_Power_Level,.
    =30

    I deleted the existing RRD file, but it has been created with the default values

    ...
    rrd_version = "0003"
    step = 300
    last_update = 1384940553
    header_size = 1208
    ...

    Can anyone help me?
    Thanks

     
  • Alan Brenner

    Alan Brenner - 2013-12-10

    I haven't had the chance to release 1.4.5, so you will have to check it out via subversion or git: git clone git://git.code.sf.net/p/nagiosgraph/git nagiosgraph-git

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks