fix tabs->spaces

This commit is contained in:
Yannik Schmidt
2021-11-25 14:26:21 +01:00
parent 1f1f80f129
commit 4e9fa02731

View File

@@ -30,23 +30,23 @@ For example:
Use the [python-script]() as a command to execute, you can pass *protocol*, *host*, *port* and *service\_name* as arguments. Use the [python-script]() as a command to execute, you can pass *protocol*, *host*, *port* and *service\_name* as arguments.
object CheckCommand "gateway" { object CheckCommand "gateway" {
command = [ "/path/to/icinga-gateway-command.py" ] command = [ "/path/to/icinga-gateway-command.py" ]
arguments = { arguments = {
"--protocol" = "$protocol$" "--protocol" = "$protocol$"
"--host" = "$host$" "--host" = "$host$"
"--port" = "$port$" "--port" = "$port$"
"--service" = "$service_name$ "--service" = "$service_name$
} }
} }
apply Service "service_name" { apply Service "service_name" {
import "generic-service" import "generic-service"
check_command = "gateway" check_command = "gateway"
vars.protocol = "https" vars.protocol = "https"
vars.host = "localhost" vars.host = "localhost"
vars.port = "5000" vars.port = "5000"
vars.service = "service_name" vars.service = "service_name"
assign where host.name == "your_host" assign where host.name == "your_host"
} }
Icinga won't have a direct line to an actual host. You can define the remote hosts normally but change the alive check from *hostalive* to *http* and check the gateway availability instead. This will also prevent an error flood if the gateway ever becomes unreachable. The gateway has the */alive* for this purpose. Icinga won't have a direct line to an actual host. You can define the remote hosts normally but change the alive check from *hostalive* to *http* and check the gateway availability instead. This will also prevent an error flood if the gateway ever becomes unreachable. The gateway has the */alive* for this purpose.