Re: [Nagios-users] Calculations of RRD data

2010-08-09 Thread Stephen H. Dawson
Thanks,
SHD 

-Original Message-
From: avery...@gmail.com [mailto:avery...@gmail.com] On Behalf Of Jim Avery
Sent: Monday, August 09, 2010 12:01 E/T
To: serv...@shdawson.com
Cc: Nagios Users List
Subject: Re: [Nagios-users] Calculations of RRD data

On 9 August 2010 16:39, Stephen H. Dawson  wrote:
> Yes, we use DRRAW as well.  However, running those cal's, and then 
> graphing within Nagios or DRRAW or pnp4nagios would be nice.
>
> I guess it is an export from RRD, do the calc's, and review outside of 
> Nagios/DRRAW/pnp4nagios kind of thing?


It depends what you want do do.

I do a lot of simple maths using DRRAW in the CDEF field for each data
source or by adding CDEF lines.  Don't forget you can hide datasources by
setting "-Nothing-" for the line/area type so you can just display the
results not the original data.

For some things where drraw can't quite cut it, I use rrdgraph outside of
DRRAW (typically I use rrdcgi so I can easily publish to the web).
See: http://oss.oetiker.ch/rrdtool/doc/rrdcgi.en.html

I only bother exporting to .xml and import to Excel when I want to do really
fancy scatter graphs and regression analysis.


If you're going to want the performance data in a database all the time, you
might consider changing your Nagios perfdata processing config to output the
data to MySQL or whatever instead of or as well as to PNP.


Cheers,

Jim


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Calculations of RRD data

2010-08-09 Thread Jim Avery
On 9 August 2010 16:39, Stephen H. Dawson  wrote:
> Yes, we use DRRAW as well.  However, running those cal's, and then graphing
> within Nagios or DRRAW or pnp4nagios would be nice.
>
> I guess it is an export from RRD, do the calc's, and review outside of
> Nagios/DRRAW/pnp4nagios kind of thing?


It depends what you want do do.

I do a lot of simple maths using DRRAW in the CDEF field for each data
source or by adding CDEF lines.  Don't forget you can hide datasources
by setting "-Nothing-" for the line/area type so you can just display
the results not the original data.

For some things where drraw can't quite cut it, I use rrdgraph outside
of DRRAW (typically I use rrdcgi so I can easily publish to the web).
See: http://oss.oetiker.ch/rrdtool/doc/rrdcgi.en.html

I only bother exporting to .xml and import to Excel when I want to do
really fancy scatter graphs and regression analysis.


If you're going to want the performance data in a database all the
time, you might consider changing your Nagios perfdata processing
config to output the data to MySQL or whatever instead of or as well
as to PNP.


Cheers,

Jim

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Calculations of RRD data

2010-08-09 Thread Stephen H. Dawson
Yes, we use DRRAW as well.  However, running those cal's, and then graphing
within Nagios or DRRAW or pnp4nagios would be nice.

I guess it is an export from RRD, do the calc's, and review outside of
Nagios/DRRAW/pnp4nagios kind of thing?


Thanks,
SHD 

-Original Message-
From: avery...@gmail.com [mailto:avery...@gmail.com] On Behalf Of Jim Avery
Sent: Monday, August 09, 2010 11:35 E/T
To: serv...@shdawson.com; Nagios Users List
Subject: Re: [Nagios-users] Calculations of RRD data

On 8 August 2010 19:47, Stephen H. Dawson  wrote:
> Hi,
>
>
> Not sure if this is the correct place to ask this question, but 
> starting here.
>
> We use Nagios for lots of monitoring, and store that data in the RRD 
> database.  We graph that data.  Life is good.  We have some odd 
> thoughts about "what if" scenarios, where we need to further review 
> the data in the RRD database.  Simple arithmetic calculations of 
> minus, division, and then some averaging of some of those minus and
division outputs.
>
> We really do not want to put the monitored data into a SQL database.  
> How
> (hopefully) does one do arithmetic calculations of data in an RRD 
> database, please?


I find DRRAW really useful for that sort of thing.  As Marc said, you can
use rrdgraph to do these things - DRRAW just makes it easier.

For a version which was developed to add functionality specific to
PNP4Nagios, see:
http://www.semintelligent.com/blog/articles/39/pnp-aware-version-of-drraw-re
leased

I'm not sure if this was ever rolled in to the main DRRAW release which is
at http://web.taranis.org/drraw/


You can also use the rrdtool xport utility to export information from an rrd
to a .xml, doing some calc on it in the process, for example here's one
where I get data from three different rrd files:



#!/bin/sh

rrdtool xport  \
  --start "end -14 day" \
  --end "07/12/2010 00:00" \
  --step  3600 \
  --enumds \
  DEF:a=/usr/local/nagios/share/perfdata//chp-p15/Load.rrd:1:AVERAGE \
  DEF:e=/usr/local/nagios/share/perfdata//chp-p16/Load.rrd:1:AVERAGE \
 
DEF:b=/usr/local/nagios/share/perfdata//chp-p15/BIS_count_tBPInstances.rrd:1
:MIN
\
 
DEF:c=/usr/local/nagios/share/perfdata//chp-p15/BIS_count_tBPInstances.rrd:1
:MAX
\
  CDEF:d=c,b,- \
  XPORT:a:"Load Average App" \
  XPORT:e:"Load Average DB" \
  XPORT:d:"tBPInstances Delta" \
  XPORT:b:"tBPInstances Min" \
  XPORT:c:"tBPInstances Max" > 14days-to-20100623.xml


The xml file can then be easily imported in to Microsoft Excel so you can do
futher maths on it if you wish.

See:

http://oss.oetiker.ch/rrdtool/doc/rrdxport.en.html


Another neat thing you can do is use rrdcgi to publish graphs on the web.
See:

http://oss.oetiker.ch/rrdtool/doc/rrdcgi.en.html

I found the learning curve for all this lot fairly steep, but using drraw
helps (as it can show you what rrd commands it is building) and the rewards
are great.

hth,

Jim


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Calculations of RRD data

2010-08-09 Thread Jim Avery
On 8 August 2010 19:47, Stephen H. Dawson  wrote:
> Hi,
>
>
> Not sure if this is the correct place to ask this question, but starting
> here.
>
> We use Nagios for lots of monitoring, and store that data in the RRD
> database.  We graph that data.  Life is good.  We have some odd thoughts
> about "what if" scenarios, where we need to further review the data in the
> RRD database.  Simple arithmetic calculations of minus, division, and then
> some averaging of some of those minus and division outputs.
>
> We really do not want to put the monitored data into a SQL database.  How
> (hopefully) does one do arithmetic calculations of data in an RRD database,
> please?


I find DRRAW really useful for that sort of thing.  As Marc said, you
can use rrdgraph to do these things - DRRAW just makes it easier.

For a version which was developed to add functionality specific to
PNP4Nagios, see:
http://www.semintelligent.com/blog/articles/39/pnp-aware-version-of-drraw-released

I'm not sure if this was ever rolled in to the main DRRAW release
which is at http://web.taranis.org/drraw/


You can also use the rrdtool xport utility to export information from
an rrd to a .xml, doing some calc on it in the process, for example
here's one where I get data from three different rrd files:



#!/bin/sh

rrdtool xport  \
  --start "end -14 day" \
  --end "07/12/2010 00:00" \
  --step  3600 \
  --enumds \
  DEF:a=/usr/local/nagios/share/perfdata//chp-p15/Load.rrd:1:AVERAGE \
  DEF:e=/usr/local/nagios/share/perfdata//chp-p16/Load.rrd:1:AVERAGE \
  
DEF:b=/usr/local/nagios/share/perfdata//chp-p15/BIS_count_tBPInstances.rrd:1:MIN
\
  
DEF:c=/usr/local/nagios/share/perfdata//chp-p15/BIS_count_tBPInstances.rrd:1:MAX
\
  CDEF:d=c,b,- \
  XPORT:a:"Load Average App" \
  XPORT:e:"Load Average DB" \
  XPORT:d:"tBPInstances Delta" \
  XPORT:b:"tBPInstances Min" \
  XPORT:c:"tBPInstances Max" > 14days-to-20100623.xml


The xml file can then be easily imported in to Microsoft Excel so you
can do futher maths on it if you wish.

See:

http://oss.oetiker.ch/rrdtool/doc/rrdxport.en.html


Another neat thing you can do is use rrdcgi to publish graphs on the web.  See:

http://oss.oetiker.ch/rrdtool/doc/rrdcgi.en.html

I found the learning curve for all this lot fairly steep, but using
drraw helps (as it can show you what rrd commands it is building) and
the rewards are great.

hth,

Jim

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Calculations of RRD data

2010-08-08 Thread Marc Powell

On Aug 8, 2010, at 1:47 PM, Stephen H. Dawson wrote:

> We really do not want to put the monitored data into a SQL database.  How 
> (hopefully) does one do arithmetic calculations of data in an RRD database, 
> please?

You can do it directly with through rrdtool (i.e. 'rrdtool graph...'). CDEF's 
and VDEF's can have an arbitrary RPN calculation performed on them.  This might 
help --

http://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html#CDEF

--
Marc


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Nagios-users mailing list
Nagios-users@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