nagiosrrd

How to set logarithmic scaling in Nagiosgraph within Nagios?


I have graphs, I have data, but I need it in a logarithmic scale, as we're going from tens to 200K items, and variations are next to impossible to identify.Flatline graph example

I do not see where/how to edit the proper configuration file(s) to get this set of rrd graphs to run in logarithmic scale.


Solution

  • Nagiosgraph is a wrapper for rrdgraph, and in turn uses its own configuration file. I've found that the rrdopts.conf is probably the best location to make this change. Simply add the service name, and include the -o flag (or --logarithmic) Note how the other services have the rrdgraph options defined.

    # rrd options for nagiosgraph
    #
    # This file contains per-service options for rrdgraph.  The format is
    #   service=options
    # where the options are standard rrdgraph command-line options.  For example:
    #   PING=-X 0
    #   Load=-u 105 -l 0
    # The options will be applied to each graph matching the indicated service.
    # See rrdgraph for details about the options.
    
    # keep the ups plots in reasonable ranges
    ups-load=-u 105 -l 0 -r
    ups-charge=-u 105 -l 0 -r
    ups-temp=-u 45 -l 20 -r
    # memory counts are computer K not metric K, and always greater than 0
    mem=-l 0 -b 1024
    # do alternative autoscaling on the ntp graphs
    ntp=-A
    # cpu is always [0-100]
    cpu=-u 100 -l 0 -r
    # My custom check command needs logarithmic scaling -o option
    My_Custom_Service_Check_Command=-o