|
From: Yves M. <yme...@li...> - 2004-08-02 08:06:57
|
What version of perfparse are you running ?
If you are running the latest perfparse version (0.99.08 for now), could =
you check
nagios.cfg and the following line that should be:
xpdfile_service_perfdata_template=3D$TIME$\t$HOSTNAME$\t$SERVICEDESC$\t$O=
UTPUT$\t$SERVICESTATE$\t$PERFDATA$
If this is already the case, we have to find out why, in the SQL query, w=
e have:
host_name : '1091426180'
service_description : 'dh08'
ctime : RTA =3D 0.97 ms
txt_data : 'DNS'
nagios_status : 0
I can find no text with '1091426180' in the lines you give me, and no lin=
e with "RTA =3D
0.97 ms".
I think there is a problem in your service-perfdata.out file, and it this=
is really the
case, I'd like to know if there is a way to make perfparse more robust an=
d detect such
error.
Yves
> I am having the following error when I run ./perfparse -r
>
>
>
> Filename: /usr/local/nagios/var/service-perfdata.out
>
> File open at line 0 and ready to parse:
>
> 00:00:01 l 0 read 0 @ 0.0 l/sec. Met 0 @ nan Met/l. Drop 0. "INSERT
> INTO perfdata_service_raw (host_name, service_description, ctime,
> txt_data, nagios_status) VALUES ('1091426180','dh08',FROM_UNIXTIME(%,
> RTA =3D 0.97 ms),'DNS',0)" failed:
>
> You have an error in your SQL syntax. Check the manual that correspond=
s
> to your MySQL server version for the right syntax to use near '%, RTA 0=
.97 ms),'DNS',0)'
> at line 1
>
>
>
> I have installed PerfParse on RH 3.0 ES 2.4.21-15.0.3.EL running Nagios
> 1.2 and MySQL 4.0.2
>
>
>
> Below is the tail from the service-perfdata.out file:
>
>
>
> Filename: /usr/local/nagios/var/service-perfdata.out
>
>
>
> ING OK 1 HARD 4 0 PING OK - Packet loss 0%=
, RTA =3D 1.50 ms
> 1091426572 nc.rr.com-dhi PINGOK 1
> HARD 4 0 PING OK - Packet loss =3D 0%, RTA =3D 1.45 ms
> 1091426579 opus PING OK 1HARD 4 0 PING O=
K
> - Packet loss =3D 0%, RTA =3D 48.65 ms 1091426589
> bellsouth.net-burkes PING OK 1HARD 4 0 PING O=
K
> - Packet loss =3D 0%, RTA =3D 50.10 ms 1091426595 dh01 DNS
> OK 1 HARD 10 DNS ok - 1 seconds response time,
> Address(es) is/are 216.109.118.72 1091426601 dh01 PING O=
K
> 1 HARD4 0 PING OK - Packet loss =3D 0%, RTA =3D 1.00 =
ms
> 1091426615 dh04 HTTP OK 1 HARD 8 0HTTP
> ok: HTTP/1.1 200 OK - 8.610 second response time time8.6101091426626 =
gate-lan
> PING OK 1 HARD 40
> PING OK - Packet loss =3D 0%, RTA =3D 1.63 ms 1091426634 dh0=
8
> PING OK 1 HARD 4 0 PING OK - Packet loss 0=
%, RTA =3D 1.02 ms
> 1091426642 dh20 PING OK 1 HARD
> 4 0 PING OK - Packet loss =3D 0%, RTA =3D 0.24 ms 1091426=
648
> dh21 PING OK 1 HARD 4 0 PING OK - Packe=
t
> loss =3D 0%, RTA =3D 0.20 ms 1091426654 dh23 FTP OK =
1
> HARD 0 0 FTP OK - 0.020 second response time on port 2=
1
> [220 ProFTPD 1.2.8 Server (DH Innovations FTP Server) [dh23]] time=
0.0201091426661
> dh23 PING OK 1 HARD 40 PING
> OK - Packet loss =3D 0%, RTA =3D 0.83 ms 1091426667 dh24 =
PING
> OK 1 HARD 4 0 PING OK - Packet loss =3D 0%, R=
TA
> =3D 0.09 ms 1091426668 dh03 HTTP OK 1 HARD 7
> 0 HTTP ok: HTTP/1.1 200 OK - 7.139 second response time
> time=3D 7.1391091426674 dh26 PING OK 1 HARD 4
> 0 PING OK - Packet loss =3D 0%, RTA =3D 0.24 ms 1091426681
> dhch02 PING OK 1 HARD 4 0 PING OK - Packe=
t
> loss =3D 0%, RTA =3D 0.92 ms 1091426682 dh06 PING OK =
1
> HARD 4 0 PING OK - Packet loss =3D 0%, RTA =3D 1.08
> ms1091426688 dh07 SMTP OK 1 HARD 1 0
> SMTP OK - 1 second response time 1091426688 dhch04 PIN=
G
> OK 1 HARD 4 0 PING OK - Packet loss =3D 0%, R=
TA
> =3D 0.24 ms 1091426695 dhisw2 PINGOK 1 HARD 4
> 0 PING OK - Packet loss =3D 0%, RTA =3D 2.09 ms 1091426700
> fburke_lpt PING OK1 HARD 4 0 PING OK -
> Packet loss =3D 0%, RTA =3D 49.99 ms 1091426707 gate-burkes
> PING OK 1HARD 5 0 PING OK - Packet loss =3D 0%, =
RTA
> =3D 49.75 ms
>
>
>
> I looks like the file is wrapping instead of going to another line.
> Could this cause the INSERT to fail.
>
>
>
> Chris
>
>
>
> Christopher D. Chandler Managing Partner
>
> Office: 919-481-9876
> Mobile: 919-274-7684
>
>
>
> ch...@dh... <mailto:ch...@dh...>
>
>
>
> DH Innovations, LLC
> Post Office Box 5335 | Cary, North Carolina 27512
>
>
>
>
--=20
- Homepage - http://ymettier.free.fr - http://www.logicacmg.com -
- GPG key - http://ymettier.free.fr/gpg.txt -
- Maitretarot - http://www.nongnu.org/maitretarot/ -
- GTKtalog - http://www.nongnu.org/gtktalog/ -
|