From 7409bdb1aae2d1337549797339f892200d34aacb Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Thu, 20 Jan 2022 15:48:56 +0530 Subject: [PATCH] feat: Rest sensor support for 9.10 and below --- conf/rest/9.10.0/sensor.yaml | 25 +++++++++++++++++++++++++ conf/rest/default.yaml | 1 + 2 files changed, 26 insertions(+) create mode 100644 conf/rest/9.10.0/sensor.yaml diff --git a/conf/rest/9.10.0/sensor.yaml b/conf/rest/9.10.0/sensor.yaml new file mode 100644 index 000000000..4c5dbe3cc --- /dev/null +++ b/conf/rest/9.10.0/sensor.yaml @@ -0,0 +1,25 @@ +name: Sensor +query: api/private/cli/system/node/environment/sensors +object: environment_sensor + +counters: + - ^^node => node + - ^^name => sensor + - ^type => type + - ^warn_hi => warning_high + - ^warn_low => warning_low + - ^discrete_state => discrete_state + - ^discrete_value => discrete_value + - ^state => threshold_state + - ^units => unit + - value => threshold_value + - crit_hi => critical_high + - crit_low => critical_low + +plugins: + - LabelAgent: + value_to_num: # metric label zapi_value rest_value `default_value` + - status threshold_state normal normal `0` + +export_options: + include_all_labels: true \ No newline at end of file diff --git a/conf/rest/default.yaml b/conf/rest/default.yaml index 931e1bc14..e530b135d 100644 --- a/conf/rest/default.yaml +++ b/conf/rest/default.yaml @@ -18,3 +18,4 @@ objects: Qtree: qtree.yaml Quota: quota.yaml Shelf: shelf.yaml + Sensor: sensor.yaml \ No newline at end of file