Advertisement
Guest User

Telegraf_config

a guest
Aug 24th, 2021
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Config:
  2.  
  3. [[inputs.exec]]
  4.  
  5. ## Timeout for each request.
  6. timeout = "5s"
  7.  
  8. ## Commands array
  9. commands = [
  10. "/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",
  11. "/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",
  12. ....
  13. ]
  14. name_override = "ups_temp"
  15.  
  16. ## Data format to consume.
  17. data_format = "json"
  18.  
  19. ## List of tag names to extract from top-level of JSON server response
  20. tag_keys = [
  21. "ups_name"
  22. ]
  23.  
  24.  
  25. Output from the script is as per below:
  26.  
  27. {
  28. "temp": 19,
  29. "state": 0,
  30. "ups_name": "NAME_2"
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement