|
From: Ben C. <Be...@cl...> - 2004-06-15 12:54:16
|
Phillipp,
Great to hear you have installed MySQL 4. This will make a difference.
I think perfparse has experienced a format of log file it can't=20
understand. Can you look in nagios.cfg and find these lines:
process_performance_data=3D1
xpdfile_service_perfdata_file=3D/usr/local/nagios/var/serviceperf.log
xpdfile_service_perfdata_template=3D$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$=
OUTPUT$\t$PERFDATA$
These have to be exactly as above in this version of PerfParse.
If you really need a different format, I can show you how to change the=20
source code to accommodate your changes.
Regards, Ben.
Sand Philipp wrote:
> Hi,
>=20
> I installed mysql 4 now and recompiled the perparse binaries. Now it se=
ems ok concering the compiling stuff.
> Now I get an error when running perfparse, that i got unknown colums in=
my service-perfdata file.
>=20
> Here's the Error Message:
> #./perfparse -l /usr/local/nagios/var/service-perfdata.out
> Filename: /usr/local/nagios/var/service-perfdata.out
> "INSERT INTO perfdata_service_raw (host_name, service_description, ctim=
e, txt_data) VALUES ('users=3D1;75;150;01083050695','pcadm76',FROM_UNIXTI=
ME(n),'Current Users')" failed:
> Unknown column 'n' in 'field list'
> 00:00:00 l 1 read 0 @ 0.0 l/sec. Met 0 @ nan Met/l. Drop 0. =20
>=20
> What's next? :)
>=20
> Thanks in advance!
> Philipp
>=20
>=20
>>-----Original Message-----
>>From: Ben Clewett [mailto:Be...@cl...]=20
>>Sent: Monday, June 14, 2004 2:36 PM
>>To: Sand Philipp; 'per...@li...'
>>Subject: Re: Make error
>>
>>Phillipp,
>>
>>You are never waiting my time, if I can do anything to help=20
>>PerfParse users I always will.
>>
>>You problems is the version of SQL you are using. Only the=20
>>latest version 4 supports transactions.
>>
>>I would advise you to upgrade to the latest version. =20
>>Alternatively, you can edit the source code in the directory=20
>>'src'. Look for any lines like:
>>
>>now_query("START TRANSACTION");
>>
>>or
>>
>>now_query("COMMIT");
>>
>>And delete them.
>>
>>
>>Regards, Ben.
>>
>>
>>
>>
>>Sand Philipp wrote:
>>
>>
>>>Ah great now it works...thanks for that!
>>>Now i got another failure :( I just created the Database=20
>>
>>and the tables with the mysql_create.sh skript contributed.
>>
>>>Now i want to run perfparse and get the following:
>>>[root@nagios1 bin]# ./perfparse
>>>"START TRANSACTION" failed:
>>>You have an error in your SQL syntax near 'START=20
>>
>>TRANSACTION' at line=20
>>
>>>1
>>>
>>>My mysql.log shows the following:
>>>
>>>040614 13:50:48 201 Connect =20
>>
>>ro...@na... on nagios
>>
>>> 201 Query SELECT file_name,=20
>>
>>line_in_file, last_line_hash, pid, file_name FROM=20
>>perfdata_state WHERE domain =3D '008DC5B5'
>>
>>> 201 Query UPDATE perfdata_state=20
>>
>>SET pid =3D 10227, line_in_file =3D 0, last_line_hash =3D '',=20
>>file_name =3D '/usr/local/nagios/var/serviceperf.log' WHERE=20
>>domain =3D '008DC5B5'
>>
>>> 201 Query SET AUTOCOMMIT=3D0
>>> 201 Query START TRANSACTION
>>> 201 Quit
>>>
>>>Sorry for wasting your time :)
>>>
>>>Philipp
>>>
>>>
>>>
>>>>-----Original Message-----
>>>>From: Ben Clewett [mailto:Ben...@ro...]
>>>>Sent: Monday, June 14, 2004 12:41 PM
>>>>To: Sand Philipp
>>>>Cc: 'per...@li...'
>>>>Subject: Re: Make error
>>>>
>>>>Hi Philipp,
>>>>
>>>>I am glad you have found PerfParse, and hope you will enjoy=20
>>
>>using it.
>>
>>>>Your error messages seem to indicate you do not have the=20
>>
>>MySQL client=20
>>
>>>>development libs on your system. These will include the=20
>>
>>missing files=20
>>
>>>>'mysql.h' and 'errmsg.h'.
>>>>
>>>>If you don't think this is the case, (errors in the make are=20
>>>>possible), enter the following and let me know if it replys with=20
>>>>anything:
>>>>
>>>>$ find / -name "mysql.h" -ls 2> /dev/null
>>>>
>>>>I do not know 'Fedora Core 1', so I am not sure how they distribute=20
>>>>the Mysql-devel package. You can however obtain this from MySQL by=20
>>>>getting and installing the source package from mysql.com. =20
>>
>>It is the=20
>>
>>>>client development libs you need, or the full package :)
>>>>
>>>>I also notice you are on MySQL version 3. This does not support=20
>>>>transactions. I strongly advice you upgrade to the full version of=20
>>>>MySQL 4, in what ever their latest release version it,=20
>>
>>including the=20
>>
>>>>'InnoDB', or 'max', release.
>>>>Transactions ensure that bad data cannot accidentally be=20
>>
>>added to the=20
>>
>>>>system, which will ensure a far better quality database in the long=20
>>>>run. This also offers referential integrity, so that your database=20
>>>>cannot be accidentally corrupted by a bad program/user! :)
>>>>
>>>>May I ask in future that you might want to address support=20
>>
>>requests to=20
>>
>>>>the mailing list per...@li.... =20
>>
>>You can sign=20
>>
>>>>up for this from the bottom of PerfParse project page:
>>>>
>>>>http://sourceforge.net/projects/perfparse
>>>>
>>>>This will help other users with similar errors to fix their own=20
>>>>problems, and you may get a reply from another user who offers an=20
>>>>alternate fix.
>>>>
>>>>Kind regards,
>>>>
>>>>Ben Clewett.
>>>>
>>>>
>>>>Sand Philipp wrote:
>>>>
>>>>
>>>>
>>>>>Hi Ben,
>>>>>
>>>>>I just wanted to try out your perparse Plugin for Nagios,=20
>>
>>and got a=20
>>
>>>>>few problems in compiling the package...
>>>>>My OS: Fedora Core 1
>>>>>Nagios 1.2 (without MySQL)
>>>>>Mysql server version: 3.23.58
>>>>>
>>>>>When I run configure everything looks fine.
>>>>>When I run make (as root) the following messages are displayed:
>>>>>[root@nagios1 perfparse-0.08]# make
>>>>>make all-recursive
>>>>>make[1]: Entering directory `/root/perfparse-0.08'
>>>>>Making all in src
>>>>>make[2]: Entering directory `/root/perfparse-0.08/src'
>>>>>if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I'/usr/include' =20
>>>>
>>>>-g -O2 -Wall
>>>>
>>>>
>>>>>-MT perfparse.o -MD -MP -MF ".deps/perfparse.Tpo" -c -o=20
>>
>>perfparse.o=20
>>
>>>>>perfparse.c; \
>>>>>
>>>>>then mv -f ".deps/perfparse.Tpo" ".deps/perfparse.Po"; else rm -f=20
>>>>>".deps/perfparse.Tpo"; exit 1; fi In file included from
>>>>>perfparse.c:35:
>>>>>common.h:29:19: mysql.h: No such file or directory
>>>>>common.h:30:20: errmsg.h: No such file or directory In file
>>>>
>>>>included
>>>>
>>>>>from perfparse.c:35:
>>>>
>>>>>common.h:41: error: syntax error before "db_mysql"
>>>>>common.h:41: warning: type defaults to `int' in declaration
>>>>
>>>>of `db_mysql'
>>>>
>>>>
>>>>>common.h:41: warning: data definition has no type or storage class
>>>>>common.h:42: error: syntax error before '*' token
>>>>>common.h:42: warning: type defaults to `int' in declaration of=20
>>>>>`query_result'
>>>>>common.h:42: warning: data definition has no type or storage class
>>>>>common.h:43: error: syntax error before "result_row"
>>>>>common.h:43: warning: type defaults to `int' in declaration
>>>>
>>>>of `result_row'
>>>>
>>>>
>>>>>common.h:43: warning: data definition has no type or storage class
>>>>>perfparse.c: In function `my_on_exit':
>>>>>perfparse.c:198: warning: implicit declaration of function
>>>>
>>>>`mysql_close'
>>>>
>>>>
>>>>>perfparse.c: In function `save_raw_data':
>>>>>perfparse.c:672: warning: implicit declaration of function=20
>>>>>`mysql_fetch_row'
>>>>>perfparse.c: In function `saveBinAllowed':
>>>>>perfparse.c:702: error: subscripted value is neither array
>>>>
>>>>nor pointer
>>>>
>>>>
>>>>>perfparse.c: In function `now_get_state':
>>>>>perfparse.c:1183: error: subscripted value is neither array nor=20
>>>>>pointer
>>>>>perfparse.c: In function `sql_fail':
>>>>>perfparse.c:1386: warning: implicit declaration of function
>>>>
>>>>`mysql_error'
>>>>
>>>>
>>>>>perfparse.c:1386: warning: format argument is not a pointer (arg 4)
>>>>>make[2]: *** [perfparse.o] Error 1
>>>>>make[2]: Leaving directory `/root/perfparse-0.08/src'
>>>>>make[1]: *** [all-recursive] Error 1
>>>>>make[1]: Leaving directory `/root/perfparse-0.08'
>>>>>make: *** [all] Error 2
>>>>>
>>>>>When i run ./make install then, the following is displayed:
>>>>>
>>>>>[root@nagios1 perfparse-0.08]# make install Making install in src
>>>>>make[1]: Entering directory `/root/perfparse-0.08/src'
>>>>>if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I'/usr/include' =20
>>>>
>>>>-g -O2 -Wall
>>>>
>>>>
>>>>>-MT perfparse.o -MD -MP -MF ".deps/perfparse.Tpo" -c -o=20
>>
>>perfparse.o=20
>>
>>>>>perfparse.c; \
>>>>>
>>>>>then mv -f ".deps/perfparse.Tpo" ".deps/perfparse.Po"; else rm -f=20
>>>>>".deps/perfparse.Tpo"; exit 1; fi In file included from
>>>>>perfparse.c:35:
>>>>>common.h:29:19: mysql.h: No such file or directory
>>>>>common.h:30:20: errmsg.h: No such file or directory In file
>>>>
>>>>included
>>>>
>>>>>from perfparse.c:35:
>>>>
>>>>>common.h:41: error: syntax error before "db_mysql"
>>>>>common.h:41: warning: type defaults to `int' in declaration
>>>>
>>>>of `db_mysql'
>>>>
>>>>
>>>>>common.h:41: warning: data definition has no type or storage class
>>>>>common.h:42: error: syntax error before '*' token
>>>>>common.h:42: warning: type defaults to `int' in declaration of=20
>>>>>`query_result'
>>>>>common.h:42: warning: data definition has no type or storage class
>>>>>common.h:43: error: syntax error before "result_row"
>>>>>common.h:43: warning: type defaults to `int' in declaration
>>>>
>>>>of `result_row'
>>>>
>>>>
>>>>>common.h:43: warning: data definition has no type or storage class
>>>>>perfparse.c: In function `my_on_exit':
>>>>>perfparse.c:198: warning: implicit declaration of function
>>>>
>>>>`mysql_close'
>>>>
>>>>
>>>>>perfparse.c: In function `save_raw_data':
>>>>>perfparse.c:672: warning: implicit declaration of function=20
>>>>>`mysql_fetch_row'
>>>>>perfparse.c: In function `saveBinAllowed':
>>>>>perfparse.c:702: error: subscripted value is neither array
>>>>
>>>>nor pointer
>>>>
>>>>
>>>>>perfparse.c: In function `now_get_state':
>>>>>perfparse.c:1183: error: subscripted value is neither array nor=20
>>>>>pointer
>>>>>perfparse.c: In function `sql_fail':
>>>>>perfparse.c:1386: warning: implicit declaration of function
>>>>
>>>>`mysql_error'
>>>>
>>>>
>>>>>perfparse.c:1386: warning: format argument is not a pointer (arg 4)
>>>>>make[1]: *** [perfparse.o] Error 1
>>>>>make[1]: Leaving directory `/root/perfparse-0.08/src'
>>>>>make: *** [install-recursive] Error 1
>>>>>
>>>>>
>>>>>Any suggestions?
>>>>>Thanks in advance!
>>>>>Philipp
>>>>>
>>>>>
>>>>>
>>>>>_____________________________
>>>>>
>>>>>*Philipp Sand*
>>>>>OC-CC-TEC-SYS
>>>>>
>>>>>*SYCOR GmbH*
>>>>>Heinrich-von-Stephan-Stra=DFe 1-5
>>>>>D - 37073 G=F6ttingen
>>>>>
>>>>>Telefon +49 (0) 551 / 490 - 0
>>>>>Telefax +49 (0) 551 / 490 - 2000
>>>>>
>>>>>_philipp.sand@sycor.de_
>>>>>___www.sycor.de___ <file://www.sycor.de>__
>>>>>------------------------------------------------
>>>>>
>>>>
>>>>
>>>>
>>
>>
>=20
|