configuring nagiosgrapher to not use regex for matching service names

Christopher House chouse at gmail.com
Mon Oct 31 20:53:26 CET 2005


Well, I hoped that would do the trick, but it doesn't seem to. I see this in
my logs:
 2005-10-31 14:47:46 PIPE: Athos Dsk: /prod/dbbackup /dev/lv_dbbackup: 29%
used: 9056MB of 30720MB (85%) : OK
2005-10-31 14:47:46 RRD: [Athos][Dsk:
/prod/dbbackup]:/usr/local/nagios/ngrapher/rrd/Athos/9df684b6513d292a227b0f7721fb5fec.rrd
- successfully created!
2005-10-31 14:47:46 VALUES: [Athos][Dsk: /prod/dbbackup]:
Unixpdbbkupused=9056 Unixpdbbkuptotal=30720 Unixprdused=9056
UnixProdDbtotal=30720 UnixProdDbused=9056 Unixprdtotal=30720

The Dsk: /prod/dbbackup service is matching and saving values for /prod,
/prodb, and /prod/dbbackup in the /prod/dbbackup file (9df...rrd). When I
view the graph for /prod/dbbackup, it has the GPRINT's for all the matching
services printed on it so there's 3 copies of the same number.
 Here is my ngraph.cfg section for /prod/dbbackup:

# (AIX) Disk /prod/dbbackup #############################
define ngraph{
service_name Dsk: /prod/dbbackup$
graph_log_regex used: ([0-9]*)
graph_value Unixpdbbkupused
graph_units MB
graph_legend Disk used
rrd_plottype AREA
rrd_color 00a000
}

define ngraph{
service_name Dsk: /prod/dbbackup$
graph_log_regex of ([0-9]*)
graph_value Unixpdbbkuptotal
graph_units MB
graph_legend Disk total
rrd_plottype LINE3
rrd_color ff0000
}

define ngraph{
service_name Dsk: /prod/dbbackup$
type GPRINT
print_source Unixpdbbkupused
print_description Used MB
print_function LAST
print_format %lg
}

define ngraph{
service_name Dsk: /prod/dbbackup$
type CDEF
graph_value Unixpdbbkupfree
graph_units MB
graph_legend Disk free
graph_calc Unixpdbbkuptotal,Unixpdbbkupused,-
rrd_plottype AREA
rrd_color 0000ff
hide yes
}

define ngraph{
service_name Dsk: /prod/dbbackup$
type GPRINT
print_source Unixpdbbkupfree
print_description Free MB
print_function LAST
print_format %lg
}

define ngraph{
service_name Dsk: /prod/dbbackup$
type GPRINT
print_source Unixpdbbkuptotal
print_description Total MB
print_function LAST
print_format %lg
}

 Here is my /prod config section of ngraph.cfg:

# (AIX) Disk /prod #############################
define ngraph{
service_name Dsk: /prod$
graph_log_regex used: ([0-9]*)
graph_value Unixprdused
graph_units MB
graph_legend Disk used
rrd_plottype AREA
rrd_color 00a000
}

define ngraph{
service_name Dsk: /prod$
graph_log_regex of ([0-9]*)
graph_value Unixprdtotal
graph_units MB
graph_legend Disk total
rrd_plottype LINE3
rrd_color ff0000
}

define ngraph{
service_name Dsk: /prod$
type GPRINT
print_source Unixprdused
print_description Used MB
print_function LAST
print_format %lg
}

define ngraph{
service_name Dsk: /prod$
type CDEF
graph_value Unixprdfree
graph_units MB
graph_legend Disk free
graph_calc Unixprdtotal,Unixprdused,-
rrd_plottype AREA
rrd_color 0000ff
hide yes
}

define ngraph{
service_name Dsk: /prod$
type GPRINT
print_source Unixprdfree
print_description Free MB
print_function LAST
print_format %lg
}

define ngraph{
service_name Dsk: /prod$
type GPRINT
print_source Unixprdtotal
print_description Total MB
print_function LAST
print_format %lg
}

The section for /prod/db is the same as the ones above except the
service_name is Dsk: /prod/db$.

Please let me know if you see anything wrong above or have any ideas.

Thanks so much. I've been banging my head on my desk about this forever.

 On 10/31/05, Andreas Ericsson <ae at op5.se> wrote:
>
> Christopher House wrote:
> > Is there a way to have nagiosgrapher (
> >
> http://www.nagiosexchange.org/Charts.42.0.html?&tx_netnagext_pi1%5Bp_view%5D=195)
> > not use regex to match the service_name in its ngraph.cfg?
>
> Probably not, but if you want it to stop matching somewhere all you need
> to do is add a dollar-sign.
>
> > I have several
> > services that start with:
> > Dsk: /prod
> > (such as Dsk: /prod/pl , Dsk: /prod/home , etc)
>
> So the regex for graphing
> Dsk: /prod
> but not
> Dsk: /prod/pl
> would be
> Dsk: /prod$
>
>
>
> --
> Andreas Ericsson andreas.ericsson at op5.se
> OP5 AB www.op5.se <http://www.op5.se>
> Tel: +46 8-230225 Fax: +46 8-230231
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> 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
>



--
Christopher House
chouse at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051031/6bf28b92/attachment.html>


More information about the Users mailing list