[Nagiosplug-help] 1 questions about plugins : check_log2 and 1 solution for check_procs
Thomas
tguthmann at cvf.fr
Thu Aug 29 02:03:04 CEST 2002
Hi
First thanks to everybody for your help ! Thx !
Volker: Yes! you find the problem, the configure script said that the
correct line for my debian (woody) is :
---> /bin/ps -axo 'stat user ppid args' <----
But under debian, the ps command return a little warning messages which is:
Bad syntax, perhaps a bogus '-'? <======================= HERE ===
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1300 464 ? S Aug19 0:14 init
root 2 0.0 0.0 0 0 ? SW Aug19 0:05 [keventd]
....
The solution is to modify the command in the $NAGIOSSRC/plugins/config.h
and to suppress the minus in all ps command
under vi :%s/ps -/ps /
Thanks Volker !!!!
I will compil it to try it now ;)
For the check_log, I will try check_log2.pl but how it is possible to
extract all error level messages in the /var/log/messages for examples
(like Big Brother does).
For volker: nagiosplug1.3b1 (nagios only no more netsaint ;), but I want
to use check_log2.pl now, seems to be better in performance but just not
understand how to extract all error or warning messages from syslog
messages.
thx and some ideas
Tom
Volker.Aust at premiere.de wrote:
>Hi Thomas,
>
>
>
>>-----Original Message-----
>>From: Thomas [mailto:tguthmann at cvf.fr]
>>Sent: Wednesday, August 28, 2002 1:19 PM
>>To: Nagiosplug-help at lists.sourceforge.net;
>>Nagios-users at lists.sourceforge.net
>>Subject: [Nagiosplug-help] 2 questions about plugins : check_procs &
>>check_log
>>
>>
>>Hi,
>>
>>I'm running nagios 1.0b5/ nagiosplug1.3b1 on debian 3.0 (woody).
>>Netsaint, oops, nagios works fine but I'm encountering problems with
>>plugins usage and especially check_procs & check_log.
>>
>>*First check_procs:
>>Forget nagios config, I just run check_procs on command line
>>like this :
>>./check_procs -w 80 -c 95
>>System call sent warnings to stderr
>>CRITICAL - 143 processes running
>>
>>So as you can see I received a warning message "System call sent
>>warnings to stderr" and Nagios only intercept the warning and
>>said this
>>line in the web interface. I don't know where this message is coming
>>from because when I do a 'ps aux' I received no more message except
>>processus line ... any idea, I put a strace of the command
>>below at the
>>end of the mail.
>>
>>
>
>The strace show the following message:
>
>
>
>>read(5, "Bad syntax, perhaps a bogus \'-\'?"..., 4096) = 33
>>
>>
>
>The ps-command print this error message on STDERR and the plugin read this
>and print the message "System call sent warnings to stderr". You can see the
>ps-command-line in the plugins/config.h file in the directory there you
>compile the plugins. The line looks like '#define PS_COMMAND "/bin/ps
>xxxxxxxxxxxxxxx"' where the 'xxxxxxxxxxxxx' are the parameters configured by
>the ./configure-script. What happend when you call this line?
>
>
>
>>*Then, check_log:
>>Here, I don't understand the usage on the command line, I tried :
>>#./check_log -F /var/log/messages -O /tmp/bidon -q error
>>Log check data initialized...
>>
>>It copies my var/log/message in the the file /tmp/bidon
>>and if I retry my command or if I modify it I always received that:
>>#./check_log -F /var/log/messages -O /tmp/bidon -q error
>>./check_log: line 200: unexpected EOF while looking for matching ``'
>>./check_log: line 215: syntax error: unexpected end of file
>>
>>So to do simple: how does this plugin works ? (the -h is not
>>so useful)
>>
>>
>
>Did you use the netsaint or nagios plugins? Which version? My check_log
>scripts (netsaint-plugins-1.2.9-4 and nagios-plugins from the cvs) do not
>have a line '215'.
>
>
>
>>Hope a good samaritan could help me ;)
>>Thx & A+
>>
>>
>>
>
>Hope this helps.
>
>-vol
>
>
>
>
More information about the Help
mailing list