diff --git a/yaqd_watchdog/watchdog.avpr b/yaqd_watchdog/watchdog.avpr index b01de60..0bca126 100644 --- a/yaqd_watchdog/watchdog.avpr +++ b/yaqd_watchdog/watchdog.avpr @@ -85,6 +85,11 @@ "default": {}, "type": "map", "values": "set_position" + }, + "set_relative_actions": { + "default": {}, + "type": "map", + "values": "set_relative" } }, "doc": "", @@ -244,18 +249,14 @@ "type": "int" }, { + "default": "inf", "name": "under", - "type": [ - "float", - "null" - ] + "type": "float" }, { + "default": "-inf", "name": "over", - "type": [ - "float", - "null" - ] + "type": "float" }, { "default": 10, @@ -279,10 +280,12 @@ "type": "int" }, { + "default": "inf", "name": "percent_under", "type": "float" }, { + "default": "-inf", "name": "percent_over", "type": "float" }, @@ -315,6 +318,25 @@ "name": "set_position", "type": "record" }, + { + "fields": [ + { + "default": "localhost", + "name": "host", + "type": "string" + }, + { + "name": "port", + "type": "int" + }, + { + "name": "distance", + "type": "float" + } + ], + "name": "set_relative", + "type": "record" + }, { "fields": [ { @@ -361,4 +383,4 @@ "type": "record" } ] -} \ No newline at end of file +} diff --git a/yaqd_watchdog/watchdog.toml b/yaqd_watchdog/watchdog.toml index e858305..8ff8ef1 100644 --- a/yaqd_watchdog/watchdog.toml +++ b/yaqd_watchdog/watchdog.toml @@ -22,8 +22,8 @@ type = "record" name = "check_position_absolute" fields = [{"name"="host", "type"="string", "default"="localhost"}, {"name"="port", "type"="int"}, - {"name"="under", "type"=["float", "null"], default="__null__"}, - {"name"="over", "type"=["float", "null"], default="__null__"}, + {"name"="under", "type"="float", default="inf"}, + {"name"="over", "type"="float", default="-inf"}, {"name"="timeout", "type"="int", "default"=10, "doc"="seconds"}] [[types]] @@ -31,8 +31,8 @@ type = "record" name = "check_position_percentage" fields = [{"name"="host", "type"="string", "default"="localhost"}, {"name"="port", "type"="int"}, - {"name"="percent_under", "type"=["float", "null"], default="__null__"}, - {"name"="percent_over", "type"=["float", "null"], default="__null__"}, + {"name"="percent_under", "type"="float", default="inf"}, + {"name"="percent_over", "type"="float", default="-inf"}, {"name"="timeout", "type"="int", "default"=10, "doc"="seconds"}] [[types]]