|
From: Horvath T. <zs...@ax...> - 2005-05-18 17:09:16
|
Hi List!
I have three suggestions.
1. If there is no purgeable data in the database, the perfparse-db-purge
produce some output, which cron does not "like".
I did the following in my crontab:
# Purge PerfParse database.
50 10 * * * root /usr/local/nagios/bin/perfparse-db-purge
1>>/var/log/nagios/nagios.log 2>&1
Of course someone can replace the log file with /dev/null to supress every
output.
2. I installed PP with method#3. According to the documentation I created a
script, which I run via crontab every 15 minutes.
This can be done under Linux in the following way:
# Run PerfParse every 15 minutes to update Nagios graphs.
*/15 * * * * root /usr/local/nagios/scriptek/PeriodicUserLogParse.sh
Note */15 is the first entry and not 15!!!
3. The example script in the docu is not complete. If there is no file, than
mv create output, which cron does not "like".
My modified script is the following:
#!/bin/sh
PerfParseDir=/usr/local/nagios
mvCMD=/bin/mv
catCMD=/bin/cat
rmCMD=/bin/rm
if [ -s {$PerfParseDir}/var/perfdata.log ]
then
$mvCMD {$PerfParseDir}/var/perfdata.log
${PerfParseDir}/var/perfdata.log1
$catCMD ${PerfParseDir}/var/perfdata.log1 |
${PerfParseDir}/bin/perfparse-log2mysql -c ${PerfParseDir}/etc/perfparse.cfg
$rmCMD {$PerfParseDir}/var/perfdata.log1
else
exit 1
fi
I hope I can help somebody with the above things.
Bye, Tamas!
|