[Nagiosplug-help] Plugin perpetually in warn state

Chase Simms Csimm at pubpress.com
Tue Mar 2 18:36:24 CET 2010


Kyle,

I started dumping different commands and found nagios was calling java 1.4.  I modified the symlink /usr/bin/java.  I'm not sure how the environment defaulted to that version.   When I log in as the nagios user or root they are using /usr/java/default/bin/java.

Either way, I got it working.

Thank you for the help.

Chase



>>> "Kyle O'Donnell" <kyleodonnell at gmail.com> 3/2/2010 10:14 AM >>>
try it from command line again, dump our environment variables into a file

then write a wrapper for the script that gets executed by nagios, have
the script dump the environment variables to a file as well, compare
them and see if anything jumps out at you.

what happens if you execute it as a non-privileged user?

On 3/1/10, Chase Simms <csimm at pubpress.com> wrote:
> Yes. I logged in as nagios and ran the command from the root. I ran the
> command from /nagios and the full path.
>
> I also temporarily pasted the command from the command line into the
> commands.cfg and took out the arguments out of the service call so the
> entire command, address and all was in the commands.cfg.
>
> I wondered if it was something nagios is doing interfering with java.
> I'm completely stumped.
>
>
>>>> "Kyle O'Donnell" 03/01/10 4:46 PM >>>
> Are you running on the command line as the 'nagios' users? could
> there be an environment variable missing? or a permissions problem?
>
> --kyleo
>
> On 3/1/10, Chase Simms wrote:
>> I am running Nagios 3.0.2 on CentOS 5.2. I've written some of my own
>> plugins and have had this running for a few years. So far, so good.
> Now I
>> want to monitor some Java apps using JMX. I tried a few different
> plugins
>> but haven't found one that works for me.
>>
>> I am trying to use Syabru Nagios JMX Plugin from
>>
> http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/Syabru-Nagios-JMX-Plugin/details.
>
>>
>>
>> It works when I run manually from the command line. I verified the
> exit
>> codes are returning correctly.
>>
>> Nagios always says the service is in a warn state and the Status
> Information
>> is always (null).
>>
>> Here are some excerpts from my config files to show my wiring.
>>
>> commands.cfg:
>> define command {
>> command_name check_feed_jmx
>> command_line /nagios/libexec/check_jmx -U
>> service:jmx:rmi:///jndi/rmi://$HOSTADDRESS$:$ARG1$/jmxrmi -O
>> SimonAuto:type=Feed,controller=pathProcessorController -A PollRate -K
>> PollRate -w 70 -c 80
>> }
>>
>> services.cfg:
>>
>> define service {
>> service_description FEED-SERVICE
>> use TEST-NO-PAGES
>> hostgroups FEED-SERVERS
>> check_command check_feed_jmx!1620
>> }
>>
>> hostgroups.cfg
>> define hostgroup {
>> hostgroup_name FEED-SERVERS
>> alias FEED-SERVERS
>> members SIMONAUTO6
>> }
>>
>> Any hints are appreciated.
>>
>>
>> The information in this email is intended for the sole use of the
> addressees
>> and may be confidential and subject to protection under the law. If
> you are
>> not the intended recipient, you are hereby notified that any
> distribution or
>> copying of this email is strictly prohibited. If you have received
> this
>> message in error, please reply and delete your copy.
>>
>>
>>
> ------------------------------------------------------------------------------
>
>> Download Intel* Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev 
>> _______________________________________________
>> Nagiosplug-help mailing list
>> Nagiosplug-help at lists.sourceforge.net 
>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help 
>> ::: Please include plugins version (-v) and OS when reporting any
> issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>
>>
>
> ------------------------------------------------------------------------------
>
> Download Intel* Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev 
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help 
> ::: Please include plugins version (-v) and OS when reporting any issue.
>
> ::: Messages without supporting info will risk being sent to /dev/null
> The information in this email is intended for the sole use of the
> addressees and may be confidential and subject to protection under the
> law. If you are not the intended recipient, you are hereby notified that
> any distribution or copying of this email is strictly prohibited. If you
> have received this message in error, please reply and delete your copy.
>
>

The information in this email is intended for the sole use of the addressees and may be confidential and subject to protection under the law. If you are not the intended recipient, you are hereby notified that any distribution or copying of this email is strictly prohibited. If you have received this message in error, please reply and delete your copy.





More information about the Help mailing list