Problem with check_by_ssh was: RE: Problem with selfwritten Plugin

Andreas Ericsson ae at op5.se
Wed Dec 15 14:35:26 CET 2004


Sand Philipp wrote:
> Hi,
> 
> I just wrote a simple Shellscript which returns a text and a exitcode
> 2 and executed it with check_by_ssh on two different remote server.
> Again, when I execute the script via command line, the return code is
> displayed properly. But when I execute it via Nagios, for one of the
> two Servers, the Status is critical, as it should be, and for the
> other one, it's unknown??!!
> 
> I'm pretty irritated ...
> 

Making the rest of us irritated as well by re-sending the same email 
several times won't make you less so.

I'm fairly certain that the problem resides in your shellscript. Post it 
here so we can help you properly, or stop emailing the list about this 
issue.

> Philipp
> 
> 
>> -----Original Message----- From:
>> nagios-users-admin at lists.sourceforge.net 
>> [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Sand
>> Philipp Sent: Wednesday, December 15, 2004 12:43 PM To: Andreas
>> Ericsson; nagios-users at lists.sourceforge.net Subject: RE:
>> [Nagios-users] Problem with selfwritten Plugin
>> 
>> 
>>>> You mustn't understand the Error Message, it's ok for me
>>> 
>>> that way, I
>>> 
>>>> just inserted it to give you a idea how long it is. So
>> 
>> far so good.
>> 
>>>> When I run an echo $? It returns 2, so it should be displayed
>>>> as CRITICAL in Nagios, right? Buuut, and here's the MAIN
>>> 
>>> Problem for me:
>>> 
>>>> Nagios shows a Status UNKNOWN !!!??? Why is the returncode not
>>>>  interpreted in the right way by nagios??
>>>> 
>>> 
>>> Permission issues? Nagios sets it to unknown if the return code
>>> is UNKNOWN or anything outside of the range of what return
>> 
>> codes nagios
>> 
>>> handles properly.
>> 
>> Don't think that it's a permission issue. I testet it via console
>> with the user under which nagios runs. On the console I always get
>> the right return code (for testing 2) but in nagios it's unknown. 
>> What I found during my researches is another strange thing. 
>> Sometimes the check gets CRITICAL, but after the normal check 
>> interval it tourns to unknown again :-/
>> 
>> BTW, my nagios version is 2.0a1 The check is a plugin executed on a
>> remote check via the check_by_ssh plugin.
>> 
>> Heeelp :) Philipp
>> 
>> 
>> ************************************************
>> 
>> sycor plastics - die neue Branchenlösung für die
>> Kunststoffindustrie
>> 
>> www.sycor-plastics.de
>> 
>> ************************************************
>> 
>> 
>> 
>> 
>> Diese E-Mail ist vertraulich und kann darüber hinaus persönliche
>> Informationen beinhalten. Wenn Sie nicht der bestimmungsgemäße
>> Empfänger sind, löschen Sie bitte die E-Mail und deren Anhänge
>> sofort und benachrichtigen Sie uns darüber. Die Firma sycor willigt
>> in keine Verträge oder vertragliche Verpflichtungen ein oder
>> übermittelt rechtsverbindliche Angebote, die in Form von E-Mail
>> versandt werden, sofern dies nicht ausdrücklich in schriftlicher
>> Form zwischen den Parteien vereinbart wurde.
>> 
>> This e-mail is confidential and may contain personal and/or 
>> privileged information. If you are not the intended recipient 
>> please delete this e-mail and all attachments immediately and 
>> inform us. The company sycor does not agree with contracts or 
>> contract obligations sent by e-mail, neither do we transmit legally
>> binding offers by e-mail, unless this is not expressly agreed upon
>> between the parties and documented in written form.
>> 
>> 
>> 
>> ------------------------------------------------------- SF email is
>> sponsored by - The IT Product Guide Read honest & candid reviews on
>> hundreds of IT Products from real users. Discover which products
>> truly live up to the hype. Start reading now. 
>> http://productguide.itmanagersjournal.com/ 
>> _______________________________________________ Nagios-users
>> mailing list Nagios-users at lists.sourceforge.net 
>> https://lists.sourceforge.net/lists/listinfo/nagios-users :::
>> Please include Nagios version, plugin version (-v) and OS when
>> reporting any issue. ::: Messages without supporting info will risk
>> being sent to /dev/null
>> 
> 
> 
> 
> ************************************************
> 
> sycor plastics - die neue Branchenlösung für die Kunststoffindustrie
> 
> www.sycor-plastics.de
> 
> ************************************************
> 
> 
> 
> 
> Diese E-Mail ist vertraulich und kann darüber hinaus persönliche
> Informationen beinhalten. Wenn Sie nicht der bestimmungsgemäße
> Empfänger sind, löschen Sie bitte die E-Mail und deren Anhänge sofort
> und benachrichtigen Sie uns darüber. Die Firma sycor willigt in keine
> Verträge oder vertragliche Verpflichtungen ein oder übermittelt
> rechtsverbindliche Angebote, die in Form von E-Mail versandt werden,
> sofern dies nicht ausdrücklich in schriftlicher Form zwischen den
> Parteien vereinbart wurde.
> 
> This e-mail is confidential and may contain personal and/or
> privileged information. If you are not the intended recipient please
> delete this e-mail and all attachments immediately and inform us. The
> company sycor does not agree with contracts or contract obligations
> sent by e-mail, neither do we transmit legally binding offers by
> e-mail, unless this is not expressly agreed upon between the parties
> and documented in written form.
> 
> 
> 
> ------------------------------------------------------- SF email is
> sponsored by - The IT Product Guide Read honest & candid reviews on
> hundreds of IT Products from real users. Discover which products
> truly live up to the hype. Start reading now. 
> http://productguide.itmanagersjournal.com/ 
> _______________________________________________ Nagios-users mailing
> list Nagios-users at lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please
> include Nagios version, plugin version (-v) and OS when reporting any
> issue. ::: Messages without supporting info will risk being sent to
> /dev/null
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list