|
From: Florian G. <fl...@bi...> - 2007-03-05 23:29:33
|
O.K. let's try:
- do you have perfparsed running?
- you can check the error log. In your config it is set to
"perfparse.log". Use a absolute path if you cannot find that file.
- Is /usr/local/nagios/var/service-perfdata.dat a pipe? If it is a file,
it will not work. move the file away. As far as i remember perfparsed
recreates the pipe at startup.
Here's my config of a testing system:
Nagios command:
command_line
/usr/local/nagios/bin/perfparse_nagios_pipe_command.pl /usr/local/nagios/va
r/serviceperf.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$"
"$SERVICEOUTPUT$" "$SERVICESTATE$" "$SERVI
CEPERFDATA$"
}
perfparse.cfg:
Service_Log = "|/usr/local/nagios/var/serviceperf.log"
Service_Log_Position_Mark_Path = "no"
Error_Log = "/usr/local/nagios/var/perfparse.log"
Error_Log_Rotate = "Yes"
Drop_File = "/tmp/perfparse.drop"
Drop_File_Rotate = "Yes"
Lock_File = "/var/lock/perfparse.lock"
Nagios_Lock = "/usr/local/nagios/var/nagios.lock"
Show_Status_Bar = "no"
Do_Report = "no"
Default_user_permissions_Policy = "rw"
Default_user_permissions_Host_groups = "rw"
Output_Log_File = "yes"
Output_Log_Filename =
"/usr/local/nagios/var/perfparse_output_log"
Output_Log_Rotate = "yes"
No_Raw_Data = "no"
No_Bin_Data = "no"
DB_User = "nagiostat"
DB_Name = "nagiostat"
DB_Pass = "nagiostat"
DB_Host = "127.0.0.1"
This is my perfparsed startfile:
#! /bin/sh
#
### BEGIN INIT INFO
# Provides: perfparsed
# Required-Start: $local_fs $remote_fs $syslog
# Required-Stop:
# Default-Start: 2 3 5
# Default-Stop:
# Description: Start the perfparse daemon.
### END INIT INFO
PPPIPE=/usr/local/nagios/var/serviceperf.log
case "$1" in
start)
if [ -f $PPPIPE ] ; then
echo "creating pipe"
mv $PPPIPE ${PPPIPE}.old
mkfifo $PPPIPE
chown nagios2:nagios2 $PPPIPE
APPLY_OLD_DATA=1
fi
echo "Starting perfparsed"
/usr/local/nagios/bin/perfparsed -d
if [ "$APPLY_OLD_DATA" ] ; then
echo "applying old data"
cat ${PPPIPE}.old >> $PPPIPE
fi
;;
stop)
killproc perfparsed
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
Flo
James Tran wrote:
> See i don't get how to check it then if i'm trying to do it the piped
> way. The install guide doesn't tell me anyway to check it except by
> running ./perfparse-log2mysql -r
> I want to be able to get this thing to work with oreon and well i think
> if i can get it to work ANY WAY i'll be fine.
>
> Here's what i've done for the configs
> I have no idea how to check it besides going to the
> /cgi-bin/nagios/perfparse.cgi and checking it but according the the cgi
> it still isn't working
> If you could give me some idea of how i can troubleshoot errors with
> this i'd be grateful. or highlight some trouble areas. This is me trying
> to set it up in pipe mode so if u can kinda guide me into pipe mode
> config that'd be great.
>
>
>
> *nagios.cfg:*
>
> host_perfdata_file=/usr/local/nagios/var/host-perfdata.dat
> service_perfdata_file=/usr/local/nagios/var/service-perfdata.dat
> service_perfdata_command=process-service-perfdata
> host_perfdata_command=process-host-perfdata
> host_perfdata_file_template=$TIMET$ $HOSTNAME$ $HOSTCHECKCOMMAND$
> $HOSTOUTPUT$ $
> HOSTSTATE$ $HOSTPERFDATA$
> service_perfdata_file_template=$TIMET$ $HOSTNAME$ $SERVICEDESC$
> $SERVICEOUTPUT$
> $SERVICESTATE$ $SERVICEPERFDATA$
> host_perfdata_file_processing_interval=10
> service_perfdata_file_processing_interval=10
> #host_perfdata_file_processing_command=process-host-perfdata
> #service_perfdata_file_processing_command=process-service-perfdata
>
> *misccommand.cfg*
>
> define command{
> command_name process-service-perfdata
> command_line $USER2$/bin/perfparse_nagios_pipe_command.pl
> /usr/local/nagio
> s/var/rw/service-perfdata.dat "$TIMET$" "$HOSTNAME$"
> "$HOSTCHECKCOMMAND$" "$HOST
> OUTPUT$" "$HOSTSTATE$" "$HOSTPERFDATA$"
> }
> define command{
> command_name process-host-perfdata
> command_line $USER2$/bin/perfparse_nagios_pipe_command.pl
> /usr/local/nagio
> s/var/rw/host-perfdata.dat "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$"
> "$SERVICEOUTPU
> T$" "$SERVICESTATE$" "$PERFDATA$"
>
> *perfparse.cfg*
> Server_Port = 1976
> Service_Log = "|/usr/local/nagios/var/service-perfdata.dat"
> Service_Log_Position_Mark_Path = "-"
> Error_Log = "perfparse.log"
> Error_Log_Rotate = "Yes"
> Error_Log_Keep_N_Days = "7"
> Drop_File = "/usr/local/nagios/var/perfparse.drop"
> Drop_File_Rotate = "Yes"
> Drop_File_Keep_N_Days = "7"
> Lock_File = "/var/lock/perfparse.lock"
> Show_Status_Bar = "Yes"
> Do_Report = "Yes"
> Default_user_permissions_Policy = "rw"
> Default_user_permissions_Host_groups = "rw"
> Default_user_permissions_Summary = "rw"
> Output_Log_File = "no"
> Output_Log_Filename =
> "/usr/local/nagios/var/perfparse_output_log"
> Output_Log_Rotate = "yes"
> Output_Log_Keep_N_Days = "7"
> Use_Storage_Socket_Output = "no"
> Storage_Socket_Output_Host_Name = "localhost"
> Storage_Socket_Output_Port = "1974"
> Server_Port = "1976"
> Use_Storage_Mysql = "yes"
> No_Raw_Data = "no"
> No_Bin_Data = "no"
> DB_User = "xxx"
> DB_Name = "xxx"
> DB_Pass = "xxx"
> DB_Host = "localhost"
> Dummy_Hostname = "dummy"
> Storage_Modules_Load = "mysql"
>
>
>
|