Hi,

i'm struggeling a little with the check command definitions.
Trying to set up some check commands for check_nt I'm wondering if it is 
possible to negate unused vars instead of creating a bunch of separate commands.

For example:

I have defined:

object CheckCommand "check_nt" {
  import "plugin-check-command"

  command = [ PluginDir + "/check_nt",
    "-H", "$address$",
    "-v", "$nt_check_variable$",
    "-p", "$nt_port$",
    "-l", "$nt_partition$",
    "-w", "$nt_warn$",
    "-c", "$nt_crit$",
    "-s", "$nt_pass$"
  ]

  vars = {

  "nt_port" = "12489"
  "nt_pass" = "secret"

}

Now I use this to check the UPTIME like:


object Service "check_nt_uptime" {
  import "generic-service"

  host_name = "myHost"
  check_command = "check_nt"
  vars.sla = "24x7"

vars += {
  nt_check_variable = "UPTIME"
  }

Now in icinga2.log it complaints:

[2014-09-05 09:03:12 +0200] warning/MacroProcessor: Macro 'nt_partition' is not 
defined.
Context:
        (0) Resolving macros for string '$nt_partition$'
        (1) Executing check for object 'myHost!check_nt_uptime'

[2014-09-05 09:03:12 +0200] warning/MacroProcessor: Macro 'nt_warn' is not 
defined.
Context:
        (0) Resolving macros for string '$nt_warn$'
        (1) Executing check for object 'myHost!check_nt_uptime'

[2014-09-05 09:03:12 +0200] warning/MacroProcessor: Macro 'nt_crit' is not 
defined.
Context:
        (0) Resolving macros for string '$nt_crit$'
        (1) Executing check for object 'myHost!check_nt_uptime'

What is clear, because not used here.

Question is now, do I have to define another check command like:

}

object CheckCommand "check_nt_uptime" {
  import "plugin-check-command"

  command = [ PluginDir + "/check_nt",
    "-H", "$address$",
    "-v", "$nt_check_variable$",
    "-p", "$nt_port$",
    "-s", "$nt_pass$"
  ]

  vars = {

  "nt_port" = "12489"
  "nt_pass" = "secret"

}

}

Or is it possible the negate some of the unused stuff from the check command 
above?



Viele Gruesse,
Kind regards,

Rico Spiesberger
System Engineer
IT-SR-IR-2

MANN+HUMMEL GMBH
Grönerstr. 50
71636 Ludwigsburg, Germany

Phone +49 7141 98 2362
Fax +49 7141 98 182362
[email protected]<mailto:[email protected]>
www.mann-hummel.com<http://www.mann-hummel.com/>

MANN+HUMMEL GmbH, Hindenburgstr. 45, 71638 Ludwigsburg, Sitz der Gesellschaft: 
Ludwigsburg, Registergericht Stuttgart HRB 200155.
Geschäftsführer: Alfred Weber, Manfred Wolf, Frank Jehle. Vorsitzender des 
Aufsichtsrats: Thomas Fischer.

_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to