Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Config:
- [[inputs.exec]]
- ## Timeout for each request.
- timeout = "5s"
- ## Commands array
- commands = [
- "/usr/local/nagios/libexec/custom-plugins/check_ups_temperature_json -H 192.168.2.155 -o 1.3.6.1.2.1.33.1.2.7.0 -v1 -C public -w 28 -c 31 -t MTH-OFFICE-UPS1",
- "/usr/local/nagios/libexec/custom-plugins/check_ups_temperature_json -H 192.168.x.x -o 1.3.6.1.2.1.33.1.2.7.0 -v1 -C public -w 28 -c 31 -t NAME_1",
- ....
- ]
- name_override = "ups_temp"
- ## Data format to consume.
- data_format = "json"
- ## List of tag names to extract from top-level of JSON server response
- tag_keys = [
- "ups_name"
- ]
- Output from the script is as per below:
- {
- "temp": 19,
- "state": 0,
- "ups_name": "NAME_2"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement