On Tue, 21 Jul 2015, LOEFFLER Peter wrote:

> Hi,
> 
> i'm trying build a check for a special windows event using NSClient++ and 
> check_nrpe.
> The problem is that icinga2 seems to quote every argument and the 
> check_eventlog plugin doesn't like it.
> 
> 
> Versions:
> 
> [r...@pmon01.lan.hbd icinga2]# yum info icinga2
> Loaded plugins: fastestmirror, security
> Loading mirror speeds from cached hostfile
> Installed Packages
> Name        : icinga2
> Arch        : x86_64
> Version     : 2.3.5
> Release     : 1.el6
> Size        : 18 k
> Repo        : installed
> From repo   : icinga-stable-release
> Summary     : Network monitoring application
> URL         : https://www.icinga.org/
> License     : GPL-2.0+
> Description : Meta package for Icinga 2 Core, DB IDO and Web.
> 
> [r...@pmon01.lan.hbd icinga2]# /usr/lib64/nagios/plugins/check_nrpe --help
> 
> NRPE Plugin for Nagios
> Copyright (c) 1999-2008 Ethan Galstad (nag...@nagios.org)
> Version: 2.15
> Last Modified: 09-06-2013
> 
> [r...@pmon01.lan.hbd icinga2]# /usr/lib64/nagios/plugins/check_nrpe -H 
> '10.100.0.135' -t 20
> I (0,4,1,102 2013-07-15) seem to be doing fine...
> 
> 
> Config:
> 
> template Service "sys_windows_event_source_schannel_eventid_36887" {
>         import "generic-service"
> 
>         check_command = "check_nrpe_with_args"
> 
>         vars.ARG1 = "check_eventlog"
>         vars.ARG2 = "file=Application MaxWarn=0 MaxCrit=0 filter='id=36887' 
> 'scan-range=-7d' unique 'syntax=ID: %id%, Source: %source%, File: %file%'"
        thats wrong. There isn't a shell involved, therefore every argument
        needs to part of a list. [ 'file=Application', 'MaxWarn=0', ... ]
        And so on. 

        In facts the arguments aren't quoted, but since there isn't a shell
        involved they are not word splitted as you would see in a shell. 

Alex
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to