k.... Found it... but now i ran into another problem.My check definition:
# Windows NRPE Checksobject CheckCommand "check_nrpe_win" { import
"plugin-check-command" command = [ PluginDir + "/check_nrpe" ]
arguments = { "-H" = "$address$" "-c" = {
value = "$command$" order = 0
} "-a" = { value =
"$arguments$" order = 1 }
"ShowAll" = { set_if = "$ShowAll$"
order = 10 } "MinWarn" = {
value = "MinWarn=$minwarn$" skip_key = true
set_if = "$min$" order = 2 }
"MinCrit" = { value = "MinCrit=$mincrit$"
skip_key = true set_if = "$min$"
order =3 } "MaxWarn" = {
value = "MaxWarn=$maxwarn$" skip_key =
true set_if = "$max$" order =4
} "MaxCrit" = { value =
"MaxCrit=$maxcrit$" skip_key = true
set_if = "$max$" order =5 }#
"type" = {# value = "type=$checktype$"#
skip_key = true# set_if = "$checktypeid$"#
order = 6# } }}
and one of my service definitions:
apply Service "Disk Space - C:" { import "generic-service" check_command =
"check_nrpe_win" vars.command = "CheckDriveSize" vars.arguments = "Drive=C:"
vars.mincrit = "5000M" vars.minwarn = "5000M" vars.min = "1" vars.ShowAll =
"1"
assign where host.vars.checkMethod == "nrpe-win"}
As lomg as i have the 'type=' part commented out, this check works... as soon
as i uncomment it, i get a nrpe error complaining about the commandline syntax
(not visible in the logs). What typoe did i make in that last part of the check
definition?
Hans Scheffers
AIX / Linux Systeembeheer
From: [email protected]
To: [email protected]
Date: Thu, 28 Aug 2014 13:06:35 +0200
Subject: Re: [icinga-users] Case Sensitivity and check commandline order
Thx for the quick answer Michael... works :D
And direct another question:
I need a '=' sign between the MinWarn and the value... how can i accomplish
that?
Hans Scheffers
AIX / Linux Systeembeheer
Date: Thu, 28 Aug 2014 12:46:12 +0200
From: [email protected]
To: [email protected]
Subject: Re: [icinga-users] Case Sensitivity and check commandline order
Am 28.08.2014 12:35, schrieb Hans Scheffers:
Hi
I am converting to icinga2 from icinga, but i got a few problems i don't know
how to tackle.
My check definition:
Object CheckCommand "check_nrpe_win" {
import "plugin-check-command"
command = [ PluginDir + "/check_nrpe" ]
arguments = {
"-H" = "$address$"
"-c" = "$command$"
"-a" = "$arguments$"
"MinWarn" = "$minwarn$
"MinCrit" = "$mincrit$
}
}
If I have in my service definition:
vars.command = "CheckDriveSize"
vars.arguments = "Drive=C:"
....
the service returns critical; looking in the debuglog it looks like the
commandline that is build is
'<dir>/check_nrpe' '-H' '<host>' '-a' 'Drive=C:' '-c' 'CheckDriveSize' ....
giving an error:
CRITICAL: Could not get free space for: -c -c reason: The system cannot find
the path specified.
running as
'<dir>/check_nrpe' '-H' '<host>' '-c' 'CheckDriveSize' '-a' 'Drive=C:' .....
works like a charm
Can i influence the sequence of the parameters on the commandline, so the -c
will be before the -a?
Look for 'order'.
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-checkcommand
Hans Scheffers
AIX / Linux Systeembeheer
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users
--
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
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users