|
From: Ferrill, J. <jam...@NE...> - 2004-11-03 16:01:11
|
Hi all,
Yesterday, I upgraded from Perfparse 0.100.6 to 0.103.1. It was set up =
to use --with-file-perfdata and I kept it that way to save time since it =
works well. I have a cron job that runs perfparse.sh every 15 minutes, =
leaving the serviceperf.log intact. A cron job also runs perfparse.sh =
once just before midnight with --delete that tells it to restart nagios =
and delete the serviceperf.log file.
When I upgraded, I created a new perfparse.sh script to mimic this =
behaviour. It works well, but I ran into several issues that I wanted to =
share with the development group.
1) perfparse-log2db --show-config doesn't mention anything about =
Service_Log_Position_Mark_File. The docs mention it, but it doesn't seem =
to use it. It does use Service_Log_Position_Mark_Path.
2) The mark file that was created looked like this:
-rw-r--r-- 1 root root 19 Nov 3 09:30 =
perfdata_log.serviceperf.log.mark
-rw-r--r-- 1 root root 17 Nov 2 23:56 =
perfdata_log.serviceperf.log1.mark
I didn't know if the filename was supposed to be that complicated. =
Service_Log_Position_Mark_File would have been useful here.
3) I found an issue where the serviceperf.log file is renamed to =
serviceperf.log1 in the perfparse.sh script when nagios is restarted and =
the serviceperf.log is deleted. This causes the creation of the second =
mark file. But the next day, the midnight run sees the previous mark =
file and uses that to process the newer serviceperf.log file. A lot of =
records were processed a second time. The solution was to remove the =
mark file along with the serviceperf.log file at nagios restart time.
4) The file perfparse.log.log was created in the var directory. I'm not =
sure where this is coming from. Seems to only include some errors:
# cat perfparse.log.log
2004/11/02 15:39:53 [log_reader.c:181 28998 ] Could not open =
'/usr/local/nagios/var/perfdata_log.serviceperf.log1.mark'
5) Here are the contents of my perfparse.cfg file:
#
# PerfParse Config file.
#
# In all cases, variables used as:
#
# 1. From program default defined by configure.
# 2. From this file.
# 3. From variables passed to programs.
#
# Perfparsed server management
Server_Port =3D "1976"
Use_Storage_Socket_Output =3D "no"
Storage_Socket_Output_Port =3D "1974"
Storage_Socket_Output_Host_Name =3D "localhost"
# Database management and authentication
Use_Storage_Mysql =3D "yes"
No_Raw_Data =3D "no"
No_Bin_Data =3D "no"
DB_User =3D "nagios"
DB_Name =3D "nagios"
DB_Pass =3D "nagios"
DB_Host =3D "127.0.0.1"
# Performance Data Log Files ("-" for stdin)
# Drop file - For lines of log rejected
# Lock file - For only one perfparse running at the same time
# Nagios lock - Nagios file containing its PID (Necessary to delete =
log files)
# Output Log File - For logging all the data that perfparse reads
Delete_Host_Log =3D "no"
Delete_Service_Log =3D "no"
Host_Log =3D "/usr/local/nagios/var/hostperf.log"
Service_Log =3D =
"/usr/local/nagios/var/serviceperf.log"
Service_Log_Position_Mark_File =3D "serviceperf.pos"
Service_Log_Position_Mark_Path =3D "/usr/local/nagios/var"
Service_Log_Save_Position =3D "yes"
Drop_File =3D "/tmp/perfparse.drop"
Drop_File_Rotate =3D "no"
Error_Log =3D =
"/usr/local/nagios/var/perfparse.log"
Error_Log_Rotate =3D "no"
Lock_File =3D =
"/usr/local/nagios/var/perfparse.lock"
Nagios_Lock =3D "/usr/local/nagios/var/nagios.lock"
Output_Log_File =3D "no"
Output_Log_Rotate =3D "no"
Output_Log_Filename =3D =
"/usr/local/nagios/var/perfparse_output_log"
# Reporting options
# Do not display a report on exit of perfparse
# Do not display completion status of perfparse
Do_Report =3D "no"
Show_Status_Bar =3D "no"
# Misc
Dummy_Hostname =3D "dummy"
# CGI management
# Default user permissions in the CGI. Accepted values are (ro|rw|hide)
Default_user_permissions_Policy =3D "rw"
Default_user_permissions_Host_groups =3D "rw"
-------------------
James Ferrill
IT Analyst II
NextiraOne LLC
Phone: 713-307-4029
Email: jam...@ne...
|