Hi,

Am 05.09.2014 09:50, schrieb 
[email protected]<mailto:[email protected]>:






That's not using the command arguments where key-value pairs could be
made optional, or conditional. Where did you copy/get that
CheckCommand from?



Got that from here:

http://icinga2.readthedocs.org/en/latest/chapter-3.html
roll down to NSClient++
was also a little surprised but as they mentioned the "specialitys" of NSC++....

" You've found something that doesn't exist."

docs.icinga.org is the only valid and current source for Icinga 2 where 
developers push their updates for features and fixes. If you require a local 
one, check the doc/ folder.

readthedocs is fairly outdated, and not an official source. don't use it, not 
even a cached copy.







http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/monit
oring-basics#command-arguments

You would want something like this using

1) command arguments
2) vars.nt_address to be able to override the address by the service
in a readable way
3) not using keys with double quotes in the var dictionary, and rather
use the index operator

object CheckCommand "check_nt" {

  import "plugin-check-command"

  command = [ PluginDir + "/check_nt" ]

  arguments = {
    "-H" = "$nt_address$"
    "-v" = "$nt_check_variable$"
    "-p" = "$nt_port$"
    "-l" = "$nt_partition$"
    "-w" = "$nt_warn$"
    "-c" = "$nt_crit$"
    "-s" = "$nt_pass$"
  }

  vars.nt_address = "$address"



vars.nt_address = "$address$"

it's a macro, and I need more coffee.

Hehe! Agreed!



  vars.nt_port = "12489"
  vars.nt_pass = "secret"
}



Did it that way...and it obviously worked! :)

Thx mate!

np - I'd like to hear from your migration to icinga 2 on this years OSMC :-P

Kind regards,
Michael



-- 
Michael Friedrich, DI (FH)
Application Developer

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

** Open Source Backup Conference 2014 - September - osbconf.org **
** Puppet Camp Duesseldorf 2014 - Oktober - netways.de/puppetcamp **
** OSMC 2014 - November - netways.de/osmc **
** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to