Tomasz Chmielewski
2014-09-27 19:56:07 UTC
I'm trying to use Icinga 2.1.1, but I'm not sure how I can set custom
command parameters.
By default, /etc/icinga2/conf.d/hosts/localhost/http.conf was defined
as:
/*
* The CheckCommand object `http` is provided by
* the plugin check command templates.
* Check the documentation for details.
*/
object Service "http" {
import "generic-service"
host_name = "localhost"
check_command = "http"
vars.sla = "24x7"
}
I also see "http" command was defined in
/usr/share/icinga2/include/command-plugins.conf as:
object CheckCommand "http" {
import "plugin-check-command"
command = [ PluginDir + "/check_http" ]
arguments = {
"-H" = "$http_vhost$"
"-I" = "$http_address$"
"-u" = "$http_uri$"
"-p" = "$http_port$"
"-S" = {
set_if = "$http_ssl$"
}
"--sni" = {
set_if = "$http_sni$"
}
"-a" = {
value = "$http_auth_pair$"
description = "Username:password on sites with
basic authentication"
}
"--no-body" = {
set_if = "$http_ignore_body$"
}
"-r" = "$http_expect_body_regex$"
"-w" = "$http_warn_time$"
"-c" = "$http_critical_time$"
"-e" = "$http_expect$"
}
vars.http_address = "$address$"
vars.http_ssl = false
vars.http_sni = false
}
Now, how do I modify /etc/icinga2/conf.d/hosts/localhost/http.conf so
that it contains several other parameters available from
/usr/lib/nagios/plugins/check_http command?
For example, I would like /etc/icinga2/conf.d/hosts/localhost/http.conf
check to contain -H and -s parameters.
command parameters.
By default, /etc/icinga2/conf.d/hosts/localhost/http.conf was defined
as:
/*
* The CheckCommand object `http` is provided by
* the plugin check command templates.
* Check the documentation for details.
*/
object Service "http" {
import "generic-service"
host_name = "localhost"
check_command = "http"
vars.sla = "24x7"
}
I also see "http" command was defined in
/usr/share/icinga2/include/command-plugins.conf as:
object CheckCommand "http" {
import "plugin-check-command"
command = [ PluginDir + "/check_http" ]
arguments = {
"-H" = "$http_vhost$"
"-I" = "$http_address$"
"-u" = "$http_uri$"
"-p" = "$http_port$"
"-S" = {
set_if = "$http_ssl$"
}
"--sni" = {
set_if = "$http_sni$"
}
"-a" = {
value = "$http_auth_pair$"
description = "Username:password on sites with
basic authentication"
}
"--no-body" = {
set_if = "$http_ignore_body$"
}
"-r" = "$http_expect_body_regex$"
"-w" = "$http_warn_time$"
"-c" = "$http_critical_time$"
"-e" = "$http_expect$"
}
vars.http_address = "$address$"
vars.http_ssl = false
vars.http_sni = false
}
Now, how do I modify /etc/icinga2/conf.d/hosts/localhost/http.conf so
that it contains several other parameters available from
/usr/lib/nagios/plugins/check_http command?
For example, I would like /etc/icinga2/conf.d/hosts/localhost/http.conf
check to contain -H and -s parameters.
--
Tomasz Chmielewski
http://www.sslrack.com
Tomasz Chmielewski
http://www.sslrack.com