0

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 ( Reading from a serial port after writing on it) 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:

define command{
    command_name    arduino_temp_sensor
    command_line    /usr/local/nagios/libexec/essai.c
    }

And in the localhost.cfg I added the following:

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.

Community
  • 1
  • 1
Youmna Habchy
  • 107
  • 2
  • 4
  • 17

1 Answers1

1

It works when I removed .c as following:

define command{
     command_name    arduino_temp_sensor
     command_line    /usr/local/nagios/libexec/essai
     }
Youmna Habchy
  • 107
  • 2
  • 4
  • 17