> On 17 Jun 2016, at 14:30, Jakub Šídlo <[email protected]> wrote:
>
> Hi there,
> I’ve downloaded plugin for SNMPing QNAP NAS but when I try to invoke the 
> script via
>
> object CheckCommand "SNMPQNAP" {
>                 import "plugin-check-command"
>
>                 command = [ PluginDir + "check_snmp_qnap.pl" + " -H 
> $qnap_address$" + " -a" + " -V" ]
>
>                 vars.qnap_address = "$address$"
> }
>
> The plugin output is: execvpe​(/usr/lib/nagios/plugins/check_​snmp_​qnap.​pl 
> -H *address* -a -V) failed: No such file or directory

The command array must consist of elements, e.g. the called binary script and 
then all parameters.

Though it is better to use command arguments similar to other CheckCommand 
definitions already there.

  command = [ PluginDir + “/check_snmp_qnap.pl” ]

  arguments = {
    “-H” = {
       value = “$qnap_address$”
       description = “…”
       order = 1 //if needed
    }
    “-a” = {
      description = “…”
      //use set_if = “$booleanmacroname$” to optionally set the argument
      order = 2 //if needed
     }
     “-V” = {
       description = “…”
       //use set_if if needed
       order = 3 //if needed
     }
  }

More at 
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/addons-plugins#plugins

Kind regards,
Michael


-- 
Michael Friedrich, DI (FH)
Senior Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | [email protected]

** OSBConf 2016 - September - osbconf.org **
** OSMC 2016 - November - netways.de/osmc **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to