NagiosGrapher: How do the links work?

Hugo van der Kooij hvdkooij at vanderkooij.org
Tue Jan 31 23:07:36 CET 2006


On Tue, 31 Jan 2006, Arno Lehmann wrote:

> On 1/31/2006 9:49 PM, Alastair Sheppard wrote:
> > On 02/01/2006 at 8:01 AM, Hugo van der Kooij wrote:
>
> >>>>                # Adding Graph Value Key's
> >>>>                foreach (@blocks) {
> >>>>                    if ( $service =~ /$_->{service_name}/ ) {
> >>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
> >>
> >>$_->{service_name} would result in LOAD and would match $service if
> >
> > the
> >
> >>service send to the pipe is in fact a LOAD type of check result.
>
> Ok, that sounds reasonable.
>
> Then, in my setup, I hand-crafted the definitions in ngraph.cfg and I am
> sure that they don't stumble over case-sensitive matching. For example,
> the exact same service definition, matched by the exact same graph
> definition, has resulted in severl rrds being created and one not. (some
> time ago, but I guess I could still find the log files in some backup...)
>
> > if ( $service =~ /$_->{service_name}/i ) {
>
> Hmm. Even if I would neither want nor need that modification in my copy
> of collect2.pl, there might be many cases where it's helpful.

The issue is this is the only wpot where matching is done this way.

On the data section the comparison is not present. All it does is clean
out the ttrailing spaces

	$_->{service_name} =~ s/\s+$//g;

I guess the other match is because the service result contained a match on
the service_name definition.

Fixing this lot to make sure it is more fool proof may take a while.
Perhaps if I have to babysit an upgrade without much else to do and I have
the whole script in paper in front of me.  (Which may be months from now.)

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