On 27.06.2014 08:35, Christophe HAEN wrote:
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?

Once there is, we will announce it on the devel lists. Since this is a huge topic, we decided to schedule this new feature after a final 2.0 release, allowing everyone to use Icinga 2 in production using existing tools and addons. Afterall users should first understand how Icinga 2 works, and then add their feature requests based on that experience (and not the one with "1.x is foobar, i want the whole world").


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.

Not sure if such a bulk definition makes sense then. But feel free to update the issues on dev.icinga.org with ideas and proposals, until we finally get resources to work on it.


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


-- 
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

Reply via email to