mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2025-12-06 07:21:38 +01:00
fix tabs->spaces
This commit is contained in:
16
README.md
16
README.md
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user