|
From: Tim W. <tim...@gm...> - 2004-11-22 09:24:09
|
Has anyone managed to use 'method 4' , i.e. make nagios write to a
pipe that is read by perfparsed?
I managed to get it to work once, but then I killed perfparsed and
tried to restart it and it never comes up again. In the error log I
see this:
2004/11/22 10:11:12 [perfparsed.c:127 9800 ] Perfparsed
successfully daemonized (pid=9800)
2004/11/22 10:11:18 [log_reader.c:370 9800 ] Could not create fifo
'/usr/local/nagios/var/perfparse.pipe'
The problem is that perfparse.pipe still exists from the previous run.
But you can't get rid of it, because nagios is constantly writing to
it. If you remove it, it instantly reappears as a regular file!
OK, I could shutdown nagios and restart perfparsed first and then
nagios again, but this is not really an acceptable solution.
Perhaps I'm going about it the wrong way....
Tim
My perfparse.cfg:
nagios@naxos:~/etc$ cat perfparse.cfg
#
# 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.
#
# Parser managment :
# ==================
# Performance Data Log Files ("-" for stdin) :
Service_Log = "|/usr/local/nagios/var/perfparse.pipe"
Service_Log_Position_Mark_Path = ""
# Error handling :
Error_Log = "/usr/local/nagios/var/perfparse_error.log"
Error_Log_Rotate = "Yes"
Drop_File = "/tmp/perfparse.drop"
Drop_File_Rotate = "Yes"
# Lock file for only one perfparse running at the same time
Lock_File = "/var/lock/perfparse.lock"
# Reporting options :
# ===================
# Do not display completion status of perfparse:
Show_Status_Bar = "no"
# Display a report on exit of perfparse:
Do_Report = "no"
# CGI managment :
# ===============
# Default user permissions in the CGI. Accepted values are (ro|rw|hide)
Default_user_permissions_Policy = "rw"
Default_user_permissions_Host_groups = "rw"
# Output logger :
# ===============
# set Output_Log_File to "yes" to enable it
Output_Log_File = "yes"
Output_Log_Filename =
"/usr/local/nagios/var/log/perfparse_output_log"
Output_Log_Rotate = "yes"
# Socket_output managment :
# =========================
Use_Storage_Socket_Output = "no"
Storage_Socket_Output_Host_Name = "localhost"
Storage_Socket_Output_Port = "1974"
# Perfparsed server managment :
# =============================
Server_Port = "1976"
# Database managment :
# ====================
Use_Storage_Mysql = "yes"
No_Raw_Data = "no"
No_Bin_Data = "no"
# Database Authentication
DB_Host="ncc1701e"
DB_User="user"
DB_Pass="pass"
DB_Name="nagios"
# misc
Dummy_Hostname = "dummy"
|