|
From: Kemp, D. <Dar...@xe...> - 2004-07-20 17:57:05
|
Got this.
The default commands in misccommands.cfg are not ended with a new line.
So everything was on one big line.
Not good.
-dkk
-----Original Message-----
From: Kemp, Darren=20
Sent: Tuesday, July 20, 2004 1:41 PM
To: 'Ben Clewett'
Cc: 'per...@li...'
Subject: RE: [Perfparse-users] Problems processing serviceperf.log
The conf may be screwed up, I still have the command syntax for the
host_perfdata_command, however, without this I get nothing logged
whatsoever.
In nagios.cfg:
host_perfdata_command=3Dprocess-host-perfdata
service_perfdata_command=3Dprocess-service-perfdata
xpdfile_host_perfdata_file=3D/usr/local/nagios/var/hostperf.log
xpdfile_host_perfdata_template=3D$TIMET$\t$HOSTNAME$\t$OUTPUT$\t$PERFDATA=
$
xpdfile_service_perfdata_file=3D/usr/local/nagios/var/serviceperf.log
xpdfile_service_perfdata_template=3D$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$=
O
UTPUT$\t
$PERFDATA$
In misccommands.cfg:
# 'process-host-perfdata' command definition
define command{
command_name process-host-perfdata
command_line /usr/bin/printf "%b"
"$LASTHOSTCHECK$\t$HOSTNAME$\t$HOST
STATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT
$\t$HOST
PERFDATA$" >> /usr/local/nagios/var/hostperf.log
}
# 'process-service-perfdata' command definition
define command{
command_name process-service-perfdata
command_line /usr/bin/printf "%b"
"$LASTSERVICECHECK$\t$HOSTNAME$\t$S
ERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERV
ICEEXECU
TIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$" >>
/usr/local/n
agios/var/serviceperf.log
}
-----Original Message-----
From: Ben Clewett [mailto:Be...@cl...]=20
Sent: Tuesday, July 20, 2004 12:23 PM
To: Kemp, Darren; 'per...@li...'
Subject: Re: [Perfparse-users] Problems processing serviceperf.log
Darren,
You almost certainly have a bad serviceperf.log file.
The first column of this file should be a number. In your case it=20
contains a 'D'.
Can you check nagios.cfg against our documentation to ensure you have=20
the correct format defined for this file?
You may also have to delete this file. PerfParse does not seem to=20
understand it in it's current form.
If this is not the case, please let me know.
Regards, Ben.
Kemp, Darren wrote:
> Anyone have any idea why my unixtime is returning a D?
>=20
> =20
>=20
> I'm still poking around, but it seems rather strange J
>=20
> =20
>=20
> bash-2.03# ./perfparse -r
>=20
> Filename: /usr/local/nagios/var/serviceperf.log
>=20
> File open at line 0 and ready to parse:
>=20
> 00:00:00 l 0 read 0 @ 0.0 l/sec. Met 0 @ NaN Met/l. Drop 0. "INSERT=20
> INTO perfdata_service_raw (host_name, service_description, ctime,=20
> txt_data) VALUES ('4.065000','0.820000',FROM_UNIXTIME(D),'PING OK -=20
> Packet loss =3D 0%, RTA =3D 32.00 ms')" failed:
>=20
> Unknown column 'D' in 'field list'
>=20
> bash-2.03#
>=20
> =20
>=20
> =20
>=20
> -dkk
>=20
|