NagiosGrapher: How do the links work?

Hugo van der Kooij hvdkooij at vanderkooij.org
Thu Jan 26 21:13:55 CET 2006


On Thu, 26 Jan 2006, Arno Lehmann wrote:

> If you posted one of the entries not working and the corresponding
> output from the check plugin someone, perhaps even I, might help you more.

I may be a bit rusty on RRDtool and regex but I miss the load issue here.

The plugin output:
	OK - load average: 2.01, 1.67, 1.55

3 gauges defined:

define ngraph{
        service_name            LOAD
        graph_log_regex         , (\d+\.\d+)($| critical| warning)
        graph_value             15min
        graph_units             load
        graph_legend            15min avg load
        rrd_plottype            AREA
        rrd_color               EACC00
        }

        graph_log_regex         , (\d+\.\d+),
        graph_value             5min
        rrd_plottype            STACK

        graph_log_regex         : (\d+\.\d+),
        graph_value             1min
        rrd_plottype            STACK

To me this should match just fine. I suspect there is nothing wrong with
that. But in the sample there is a section which has me puzzled:

define ngraph{
        service_name            LOAD
        type                    CDEF
        graph_value             cdef_load
        graph_units
        graph_legend
        graph_calc              15min,5min,+,1min,+
        rrd_plottype            LINE1
        rrd_color               000000
        hide                    no
        }

Why would one try to add these lines together anyway?

I would expect to see multiple lines in the design. These values just
don't make sense to add up. But that is for later to worry about. I can
fix the graphs when I want to later.

The log tells me:

2006-01-26 20:49:46 PIPE: aragorn       Current Load    OK - load average:
1.58, 1.59, 1.56     load1=1.580;5.000;10.000;0;
load5=1.590;4.000;6.000;0; load15=1.560;3.000;4.000;0;
2006-01-26 20:49:46 RRD: rrdtool create
/var/spool/nagios/rrd/aragorn/50651c20531d52e9c5eaa48a204e53c4.rrd --step=
RRA:AVERAGE:0.5:5: RRA:MAX:0.5:5: RRA:MIN:0.5:5: RRA:AVERAGE:0.5:30:
RRA:MAX:0.5:30: RRA:MIN:0.5:30: RRA:AVERAGE:0.5:120: RRA:MAX:0.5:120:
RRA:MIN:0.5:120: RRA:AVERAGE:0.5:1440: RRA:MAX:0.5:1440: RRA:MIN:0.5:1440:
2006-01-26 20:49:46 RRD: [aragorn][Current Load]:step size should be no
less than one second
2006-01-26 20:49:46 VALUES: [aragorn][Current Load]: 1min=1.58 5min=1.59
15min=1.56
2006-01-26 20:49:46 RRD: rrdtool update
/var/spool/nagios/rrd/aragorn/50651c20531d52e9c5eaa48a204e53c4.rrd
--template=1min:5min:15min N:1.58:1.59:1.56
2006-01-26 20:49:46 RRD: [aragorn][Current Load]:opening
'/var/spool/nagios/rrd/aragorn/50651c20531d52e9c5eaa48a204e53c4.rrd': No
such file or directory

I just don't see where the step size gets defined (besides the default
values). And digging a bit around in collect2.pl is puzling as I can't
find how $step is filled there either. But I noticed that $step is being
undefined between the actual creation of the RRD's and the log lines which
makes the logging less acurate:

                # Create the RRD
                # $step = $default_step;

                RRDs::create( $file, "--step", $step, @system );
                $step = undef;

                if($opt_verbose & $LOG_RRD_STATUS) {
                        $dummy="";
                        foreach (@system) {
                                $dummy.=$_. ' ';
                        }
                        print_log("RRD: rrdtool create $file --step=$step $dummy");
                }

                $rrd_err = RRDs::error;

collect2.pl filestamp:
# $Id: collect2.pl 885 2005-07-12 13:54:36Z gmueller $

Hugo.

-- 
	I hate duplicates. Just reply to the relevant mailinglist.
	hvdkooij at vanderkooij.org		http://hvdkooij.xs4all.nl/
		Don't meddle in the affairs of magicians,
		for they are subtle and quick to anger.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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