Perfdata confusion
Wolfgang Barth
wob at swobspace.de
Mon May 2 20:47:23 CEST 2005
On Mon, May 02, 2005 at 03:22:04PM +0000, bru1n at comcast.net wrote:
...
> I read through the manuals for both 1.0 and 2.0, (I'm using 2, and 1.0 looks quite different)and I think I'm going in a circle. Looking at the examples, well there isn't one for this section of nagios.cfg. I see the perfdata nagios/var/*.out | *.dat are just text (logs), but it is not clear to me what the pupose is of them.
>
> nagios.cfg:
> process_performance_data=1
...
There are to mechanism for processing perfdata:
1) using Templates
2) direct call of an external program
For writing perfdata in logfiles, use 1). 2) is good if you are using
nagiosgraph or other programs, which inserts perfdata directly in a local
database.
Parameter for 1):
- host/service_perfdata_file=<logfile or named pipe>
- host/service_perfdata_file_template=<format of writing data>
- host/service_perfdata_file_mode=a|w
-> a = append for plain files
-> w = write for named pipes
If you have a program which is parsing the logfile independent of nagios,
that's all, let the program poll your logfile.
If you want that nagios should start the external program:
- *_perfdata_file_processing_command=<nagios command object>
- *_perfdata_file_processing_interval=<time between two calls>
Instead of using perfdata_file_processing parameters, you also could use
cron for periodically polling.
Parameter for 2):
- host/service_perfdata_command=<nagios command object>
An example with nagiosgraph using 2):
define command{
command_name process-service-perfdata
command_line <somewhere>/insert.pl "$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$"
}
There ist no write to an external logfile or pipe, insert.pl writes
perfdata directly to a round robin database (rrd).
You can use 1) and 2) in parallel, i.e. filling perf2rrd and nagiosgraph
with perfdata, in all other cases use *_perfdata_file_* parameters (1) *or*
perfdata_command (2).
Hope this helps.
wob
--
<wob (at) swobspace de> * http://www.swobspace.de
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
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