diff --git a/README.md b/README.md index 10542c3..d01d018 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,30 @@ # nred2lox -Icinga-Check für die Verbindung von NodeRED zu Loxone \ No newline at end of file +Icinga-Check für die Verbindung von NodeRED zu Loxone + +**Beispiel für commands.conf:** +object CheckCommand "check_nred2lox" { + import "plugin-check-command" + command = [ "/scripts/icinga-checks/nred2lox/nred2lox.sh", "-H", "$address$", "-P", "$nred2lox_port$", "-S", "$nred2lox_miniserver$", "-w", "$nred2lox_warn$", "-c", "$nred2lox_crit$" ] +} + +**Beispiel für services.conf:** +apply Service "NodeRED zu NHI-TO-IE-LXMS" { + import "service-5m" + check_command = "check_nred2lox" + vars.nred2lox_port = vars.noderedport + vars.nred2lox_miniserver = "NHI-TO-IE-LXMS" + vars.nred2lox_warn = "80" + vars.nred2lox_crit = "120" + assign where (host.address || host.address6) && host.vars.noderedport +} + +apply Service "NodeRED zu NHI-SP-IE-LXMS" { + import "service-5m" + check_command = "check_nred2lox" + vars.nred2lox_port = vars.noderedport + vars.nred2lox_miniserver = "NHI-SP-IE-LXMS" + vars.nred2lox_warn = "80" + vars.nred2lox_crit = "120" + assign where (host.address || host.address6) && host.vars.noderedport +} \ No newline at end of file