Nagios status information

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
y.h
Posts: 3
Joined: Fri Jul 19, 2013 2:41 am

Nagios status information

Post by y.h »

I am working on a project that has my computer communicating with an arduino board that reads the sensor output and test it in a C plugin ( http://stackoverflow.com/questions/1767 ... on-it?lq=1) for nagios. My problem is that the status information is always null. My plugin is in the lib"/usr/local/nagios/libexec" In commands.cfg I added the following:

Code: Select all

define command{
    command_name    arduino_temp_sensor
    command_line    /usr/local/nagios/libexec/essai.c
    }
And in the localhost.cfg I added the following:

Code: Select all

define service{
        use                             generic-service         
        host_name                       localhost
        service_description             Temp
        check_command                   arduino_temp_sensor
        }
I'm confused if the output of the printf should appear in the status information or not. Thanks in advance:D.
Last edited by slansing on Fri Jul 19, 2013 12:52 pm, edited 1 time in total.
Reason: Moved to Nagios Core forum as this is not an idea, rather a question.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios status information

Post by abrist »

Does it run from the cli?

Code: Select all

/usr/local/nagios/libexec/essai.c
I doubt it will run as it is an uncompiled c program (at least that is what *.c usually implies).
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
y.h
Posts: 3
Joined: Fri Jul 19, 2013 2:41 am

Re: Nagios status information

Post by y.h »

Yes it runs normally.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios status information

Post by slansing »

Can you show us example output of the plugin? And a copy of it so we can look at it's format? I don't believe what you linked above is the actual plugin correct?
y.h
Posts: 3
Joined: Fri Jul 19, 2013 2:41 am

Re: Nagios status information

Post by y.h »

It works when I removed .c.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios status information

Post by lmiltchev »

Great, I am glad your issue has been resolved!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked