|
From: Steve G. <st...@ls...> - 2005-03-18 16:16:52
|
On Fri, Mar 18, 2005 at 12:22:33PM +0200, Veiko Kukk wrote:
> Why so much ignorance? Do you really care at all about perfparse being
> useful and functional as advertised?
Clearly, a lot of people do manage to get it working and functional. The
docs are not perfparse's strongest point, but that's often the case with
free software. You have to work through it, checking logs and individual
steps.
I've had it work fine using method 2 (nagios adds to log file, cron job
reads file and sends to perfparse).
Here's the command definition:
=======================================================
define command{
command_name process-service-perfdata-pp
command_line /usr/bin/perfparse_nagios_command.pl /var/lib/perfparse/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$"
}
=======================================================
Here's the invocation of that command (in nagios.cfg):
=======================================================
service_perfdata_command=process-service-perfdata-pp
=======================================================
Here's the cronjob:
=======================================================
*/5 * * * * nagios /var/lib/perfparse/dolog.sh
=======================================================
Here's dolog.sh:
=======================================================
#!/bin/sh
D=/var/lib/perfparse
mv $D/perfdata-service.log $D/perfdata-service.log.1
/usr/bin/perfparse-log2mysql -c /etc/perfparse/perfparse.cfg -l $D/perfdata-service.log.1
=======================================================
Here's *some* (hopefully all of the relevant parts) of my perfparse.cfg:
=======================================================
# Performance Data Log Files ("-" for stdin) :
Service_Log = -
Service_Log_Save_Position = "no"
#Service_Log_Position_Mark_Path = "/var/lib/perfparse"
# Lock file for only one perfparse running at the same time
Lock_File = "/var/lock/perfparse.lock"
# Database managment :
# ====================
Use_Storage_Mysql = "yes"
No_Raw_Data = "no"
No_Bin_Data = "no"
# Database Authentication
DB_User = "perfparse"
DB_Name = "perfparse"
DB_Pass = "XXXXXXX"
DB_Host = "localhost"
=======================================================
It works fine.
Steve
--
"Outlook not so good." That magic 8-ball knows everything! I'll ask
about Exchange Server next.
-- (Stolen from the net)
|