processing performance data - input, corrections solicited
Martin C. Walker
walk2137 at bellsouth.net
Sun Jun 29 23:57:40 CEST 2003
I am trying to process performance data to generate rrd's which I can
then use with APAN, Cacti and some other stuff.
I am in a distributed monitoring environment. Remote nagios boxen
execute service checks against their various local machines and send the
results back to the central host via nsca over stunnel. central box
cannot check remote hosts and services. it is passive only.
Now I want to generate rrd's which have to live on the central host (not
each individual machine). I do not want to execute each check more than
once (ie NOT once for nagios and once for performance data) and I do not
want to repetitively copy rrd's from the remote boxen to the central
host. that means that the data used to create the rrd's comes from the
service check output.
it doesn't look like there is any benefit to using nagios
process_perf_data as that only gives me a line of text data on the
sensor box which I still have to parse and send to the central box for
processing into rrdtool. It looks like I can get everything I need from
nagios.log entries on the central box. that includes the timestamp,
host, service, results output.
so, what I plan on doing is writing a daemon (perl probably) that reads
input lines from nagios.log and matches them against a configuration
file to see if they are of interest (obviously I'm not graphing every
service check). if the result is to be graphed I then pull out the
interesting data and do an rrdupdate with it.
its the pulling out of interesting data that has me stumped. I was
planning on a configuration file that had entries of the form
SENSOR_NAME;HOST_NAME;SERVICE_NAME;DSN1:expr1;[DSN2:expr2;...DSNn:exprn;]
my daemon would match host_name and service_name entries in the
nagios.log file and update the rrdfile in
/usr/local/rra/$SENSOR_NAME/$HOST_NAME/$SERVICE_NAME.rrd
using -template and the DSN names defined in the configuration file.
The expression associated with each DSN in the configuration file is the
string manipulation code to apply to the output string in the nagios.log
to pluck out the data that goes into the rrd file.
So, my questions, before I (attempt to) write all this:
1. is this the way to go or am I missing something?
2. if it is the way to go, has someone already written it?
3. if not, can anyone give me some pointers on what to use and how to
write the expr bits?
I am planning on using perl since it is supposed to have good string
manipulation and has rrdtool bindings. Learning Perl will be part of
this effort since I havn't done much more than print "Hello World\n"
with it. Is Perl the best choice for this?
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
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