On Dec 20, 2010, at 10:48 AM, mark bradley wrote:
> There's always strace(1) if you want to dive into the details ...
>
> Mark
Ah. Unfortunately, I am not Mac OS X and not Linux.
On Dec 20, 2010, at 10:28 AM, Mike Chesnut wrote:
>> Of course, one cannot tell what command is _actually_ being executed or
>> which command _was_ actually executed. I pointed this out in a previous
>> post (below). Apparently there are no workarounds for this.
>
> If I understand what you're asking about, I've used this to achieve it
> in the past:
>
> http://www.waggy.at/nagios/capture_plugin.htm
This is interesting. It is unfortunate that one would have to put the plugin
onto every command, but it is definitely a possibility. Of course, nagios could
itself have this kind of functionality. But that would be up to the
implementors.
Thanks for the replies, though.
cheers - ray
>
> On Mon, Dec 20, 2010 at 1:18 PM, Ray Kiddy <[email protected]> wrote:
>
> On Dec 20, 2010, at 9:36 AM, Polifemo, Salvatore wrote:
>
>> Yes, run the actual command from the command line as Steve demonstrated.
>>
>> Make sure which command is being used, and if you run the command with no
>> parameters it will display the correct usage.
>>
>> Salvatore Polifemo
>> Sr. Systems Security Specialist
>> ConEdison Solutions
>> 100 Summit Lake Drive
>> Valhalla, NY 10595
>>
>
> Of course, one cannot tell what command is _actually_ being executed or which
> command _was_ actually executed. I pointed this out in a previous post
> (below). Apparently there are no workarounds for this.
>
> - ray
>
> Begin forwarded message:
>
>> From: Ray Kiddy <[email protected]>
>> Date: November 17, 2010 9:42:59 AM PST
>> To: Nagios Users List <[email protected]>
>> Subject: [Nagios-users] can log show actual command executed?
>> Reply-To: Nagios Users List <[email protected]>
>>
>>
>> I am having a problem figuring out see what is actually being executed from
>> a service. Is there a way to get the nagios log to contain the actual
>> command being executed?
>>
>> This is what I am seeing in the Nagios.log file:
>>
>> [1290013792] SERVICE ALERT: myhost.com;Special
>> App;CRITICAL;SOFT;1;(Service Check Timed Out)
>>
>> This is what I see in the nagios.dat file:
>>
>> check_command=check_http!/myURL!alive
>>
>> So, this shows me what the command string is in the service.cfg. I cannot
>> see, though, what the actual command line is at this moment in time. It
>> turns out that this check_command corresponds (I think) to:
>>
>> check_http -u /myURL -s alive
>>
>> How would I know this, though, if the command definition had been changed or
>> if it is using, because of a mis-spelling, a command I do not think it is
>> using? If I go into the command.cfg and switch the order of parameters, for
>> example, I see nothing in these logs that tells me what is doing what.
>>
>> I know the simplest answer is "You should not do that." But my point is that
>> the log file does not have enough information to tell me what happened at a
>> past moment of time. I would need the log information _and_ the state of the
>> command definitions at that time. If a log does not show you what happened
>> in the past, what is its purpose?
>>
>> I am having a problem with a particular web application. For some reason I
>> put in the check and it fails. I execute the check_http that I _think_ this
>> service is doing, and it gives me an OK. I ended up creating a custom
>> executable that calls curl and fetches against the same URL and this now
>> works fine. Kind of lame, though. I use check_http in about 100 other
>> services. So, why is this one single service not working? An obvious answer
>> is that I am not calling the command in the way I think I am. But if I look
>> in the log to see what the service did, I can see what I _think_ it did
>> based on what I can see in what I _think_ is the correct command definition.
>> But I really do not know. I do not see a line like "check_http -u /myURL -s
>> alive" in the log, so, I cannot see if I am mis-reading things.
>>
>> Any suggestions?
>>
>> - ray
>>
>
>
>
>> From: steve f [mailto:[email protected]]
>> Sent: Monday, December 20, 2010 12:14 PM
>> To: [email protected]
>> Subject: Re: [Nagios-users] tracing nagios actions
>>
>> Mark,
>>
>> I think Salvatore means run the check manually from the command line , make
>> sure you run it as the nagios user and try setting tha warning & critical
>> values to something that will make it fail also:
>>
>> /usr/local/nagios/libexec > ./check_disk -w 50 -c 70 -p /home
>> DISK OK - free space: /home 440 MB (95% inode=99%);| /home=20MB;436;416;0;486
>>
>> The -p just checks a specific path. ( FYI )
>>
>> Steve
>>
>>
>>
>>
>> Date: Mon, 20 Dec 2010 11:50:14 -0500
>> From: [email protected]
>> To: [email protected]
>> Subject: Re: [Nagios-users] tracing nagios actions
>>
>> Hi Salvatore,
>>
>> They're all Unix (Redhat) servers. By check command do you mean nagios -v?
>> I've done that and I do not get an errors.
>>
>> Thanks,
>> Mark
>>
>> On Mon, Dec 20, 2010 at 11:35 AM, Polifemo, Salvatore
>> <[email protected]> wrote:
>> Are these Windows or *nix server?
>>
>> Either wau run the check command manually from a console and see what the
>> results are.
>>
>>
>>
>> Salvatore Polifemo
>> Sr. Systems Security Specialist
>> ConEdison Solutions
>> 100 Summit Lake Drive
>> Valhalla, NY 10595
>>
>> From: mark bradley [mailto:[email protected]]
>> Sent: Monday, December 20, 2010 11:14 AM
>> To: [email protected]
>> Subject: [Nagios-users] tracing nagios actions
>>
>> Hi,
>>
>> I have a small-ish number of servers and I've tried to configure Nagios to
>> warn me about disk-space running low. The problem is that, although disk
>> space is above both warning and critical levels I'm not getting any
>> notifications.
>>
>> The nagios.log file is silent on the topic and nagios -v does not produce
>> any errors or warnings.
>>
>> Is there a way to trace what actions nagios is considering (much like make
>> -n) in order to debug this problem? Is there a debugging methodology defined
>> somewhere? If it's in your head can you share?
>>
>> Thanks,
>> Mark
>>
>
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Nagios-users mailing list
> [email protected]
> 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
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d_______________________________________________
> Nagios-users mailing list
> [email protected]
> 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
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Nagios-users mailing list
[email protected]
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