[icinga-users] Case Sensitivity and check commandline order

Hans Scheffers hans.scheffers at outlook.com
Thu Aug 28 13:06:35 CEST 2014


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: michael.friedrich at netways.de
To: icinga-users at lists.icinga.org
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
icinga-users at lists.icinga.org
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 | Michael.Friedrich at netways.de



** 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
icinga-users at lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20140828/c1ac81d4/attachment.html>


More information about the icinga-users mailing list