Announcement

Collapse
No announcement yet.

os::windows::snmp][service] Name with special chars

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • os::windows::snmp][service] Name with special chars

    Hi,

    I want ot monitor the windows service Service Bureau distance. I used to do it with check_snmp_win.pl and the trick "Service Bureau . distance". It works well but I would like to use only the new plugins : how could I do to make it work ?

  • #2
    Hi,

    You could test it with the following command:

    Code:
    $ perl centreon_plugins.pl --plugin=os::windows::snmp::plugin --mode=service --hostname=XXX --snmp-version=2c --snmp-community=public --service='Services Bureau.*' --regexp --verbose --snmp-timeout=15 --state='active' --critical="1:"

    Comment


    • #3
      Hi. I formerly tried with regexp but it did not work due to a typo error on my side: Service vs Services

      I confirm it works well using for example Services Bureau.*distance as the regexp.

      But I found a weird issue with the WebUI. Using the CLI, in fact, I can use the exact name as follows and it works:
      Code:
      $ perl centreon_plugins.pl --plugin=os::windows::snmp::plugin --mode=service --hostname=XXX --service='Services Bureau  distance' --critical="1:"
      In the WebUI, I create a command using the exact syntax of the plugin :
      Code:
      $USER1$/centreon_plugins.pl --plugin os::windows::snmp::plugin --mode service --hostname $HOSTADDRESS$ --snmp-community $_HOSTSNMPCOMMUNITY$ --snmp-version $_HOSTSNMPVERSION$ --service $ARG1$ --critical "1:"
      Then I create a service with the args set to Services Bureau distance and the test fails... Perhaps an encoding issue between the UI (database) and the command ?

      Note: same issue if I use macros

      Comment


      • #4
        I don't see the quote in your WebUI command. Like that:
        Code:
        $USER1$/centreon_plugins.pl --plugin os::windows::snmp::plugin --mode service --hostname $HOSTADDRESS$ --snmp-community '$_HOSTSNMPCOMMUNITY$' --snmp-version $_HOSTSNMPVERSION$ --service '$ARG1$' --critical "1:"

        Comment


        • #5
          Indeed, I put them in the arg field, undoubtedly not a good way to do it. But the issue remains.

          Comment

          Working...
          X