Hi,

picking up on that problem (for which I would love to have an answer as
well ! ), is there any news regarding the
native Icinga2 Agent? I saw that it is in 2.1 Milestone, but is there
already an idea on how would the configuration look like?

The reason I am asking this is that we would like to switch to the native
agent as transparently as possible. So by factorizing
nrpe behavior to a single check like Driss would like to do, we could
easily switch over.

Thanks and cheers,
Chris


2014-06-25 16:01 GMT+02:00 el majdoubi Driss <[email protected]>:

> Sorry, I did not send the good version. Here is the actual configuration.
>
> The idea is to have a generic nrpe command to which I could pass any
> number of arguments.
>
>
> apply Service "nrpe-load" {
>   import "tpl-service"
>
>   check_command = "check_nrpe_load"
>   vars.w_level = "30"
>   vars.c_level = "5"
>   vars.nrpe_timeout = "15"
>   assign where host.vars.tpl-linux
> }
>
>
> object CheckCommand "check_nrpe_load" {
>         import "check_nrpe_arg"
>         vars.remote_nrpe_command  = "check_load2"
>         vars.nrpe_arg_list = "$w_level$ $C_level$"
> }
>
> object CheckCommand "check_nrpe_arg" {
>         import "plugin-check-command"
>
>         command = PluginDir + "/check_nrpe"
>
>         arguments = {
>                 "-H" = "$nrpe_address$"
>                 "-p" = "$nrpe_port$"
>                 "-c" = "$remote_nrpe_command$"
>                 "-n" = {
>                         set_if = "$nrpe_no_ssl$"
>                         description = "Do not use SSL."
>                 }
>                 "-u" = {
>                         set_if = "$nrpe_timeout_unknown$"
>                         description = "Make socket timeouts return an
> UNKNOWN state instead of CRITICAL"
>                 }
>                 "-t" = "$nrpe_timeout$"
>                  "-a" = "$nrpe_arg_list$"
>
> }
>
> The problem is that all the arguments I give it are considered in the
> execution as a single string argument,
> and that's why I get an unknown status.
>
> What would be a good practice configuration for this problem?
>
> Thanks
>
>
> 2014-06-25 15:48 GMT+02:00 el majdoubi Driss <[email protected]>:
>
> hello,
>>
>> im trying to define a sevice as follow:
>>
>> apply Service "nrpe-load" {
>>   import "tpl-service"
>>
>>   check_command = "check_nrpe_load"
>>   vars.w_level = "30"
>>   vars.c_level = "5"
>>   vars.nrpe_timeout = "15"
>>   assign where host.vars.tpl-linux
>> }
>>
>>
>> object CheckCommand "check_nrpe_load" {
>>         import "check_nrpe_arg"
>>         vars.remote_nrpe_command  = "check_load2"
>> }
>>
>> object CheckCommand "check_nrpe_arg" {
>>         import "plugin-check-command"
>>
>>         command = PluginDir + "/check_nrpe"
>>
>>         arguments = {
>>                 "-H" = "$nrpe_address$"
>>                 "-p" = "$nrpe_port$"
>>                 "-c" = "$remote_nrpe_command$"
>>                 "-n" = {
>>                         set_if = "$nrpe_no_ssl$"
>>                         description = "Do not use SSL."
>>                 }
>>                 "-u" = {
>>                         set_if = "$nrpe_timeout_unknown$"
>>                         description = "Make socket timeouts return an
>> UNKNOWN state instead of CRITICAL"
>>                 }
>>                 "-t" = "$nrpe_timeout$"
>>                  "-a" = "$w_level$,$c_level$%"
>>
>> }
>>
>>
>> after checkimg the config there are no errors but in the icingaweb
>> interface i get an umknown status of my service with this output "uncorrect
>> command line arguments supplied"
>>
>> any ideas??
>>
>> thanks a lot
>> cordially
>>
>
>
> _______________________________________________
> icinga-users mailing list
> [email protected]
> https://lists.icinga.org/mailman/listinfo/icinga-users
>
>


-- 
Christophe HAEN
CERN PH-LBC 2/R022
Phone : +41 (0)2 27 67 31 25
Mobile : +41 (0)7 64 87 88 57
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to