apcupsd.conf 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # you can disable an alarm notification by setting the 'to' line to: silent
  2. template: apcupsd_10min_ups_load
  3. on: apcupsd.load
  4. class: Utilization
  5. type: Power Supply
  6. component: UPS
  7. os: *
  8. hosts: *
  9. lookup: average -10m unaligned of percentage
  10. units: %
  11. every: 1m
  12. warn: $this > (($status >= $WARNING) ? (70) : (80))
  13. delay: down 10m multiplier 1.5 max 1h
  14. summary: APC UPS load
  15. info: APC UPS average load over the last 10 minutes
  16. to: sitemgr
  17. # Discussion in https://github.com/netdata/netdata/pull/3928:
  18. # Fire the alarm as soon as it's going on battery (99% charge) and clear only when full.
  19. template: apcupsd_ups_charge
  20. on: apcupsd.charge
  21. class: Errors
  22. type: Power Supply
  23. component: UPS
  24. os: *
  25. hosts: *
  26. lookup: average -60s unaligned of charge
  27. units: %
  28. every: 60s
  29. warn: $this < 100
  30. crit: $this < 40
  31. delay: down 10m multiplier 1.5 max 1h
  32. summary: APC UPS battery charge
  33. info: APC UPS average battery charge over the last minute
  34. to: sitemgr
  35. template: apcupsd_last_collected_secs
  36. on: apcupsd.load
  37. class: Latency
  38. type: Power Supply
  39. component: UPS device
  40. calc: $now - $last_collected_t
  41. every: 10s
  42. units: seconds ago
  43. warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
  44. delay: down 5m multiplier 1.5 max 1h
  45. summary: APC UPS last collection
  46. info: APC UPS number of seconds since the last successful data collection
  47. to: sitemgr
  48. #Send out a warning when SELFTEST code is BT or NG. Code descriptions can be found at:
  49. #http://www.apcupsd.org/manual/#:~:text=or%20N/A.-,SELFTEST,-The%20results%20of
  50. template: apcupsd_selftest_warning
  51. on: apcupsd.selftest
  52. lookup: max -1s unaligned match-names of BT,NG
  53. units: status
  54. every: 10s
  55. warn: $this == 1
  56. delay: up 0 down 15m multiplier 1.5 max 1h
  57. info: APC UPS self-test failed due to insufficient battery capacity or due to overload.
  58. to: sitemgr
  59. #Send out a warning when STATUS code is ONBATT,OVERLOAD,LOWBATT,REPLACEBATT,NOBATT,COMMLOST
  60. #https://man.archlinux.org/man/apcaccess.8.en#:~:text=apcupsd%20was%20started-,STATUS,-%3A%20UPS%20status.%20One
  61. template: apcupsd_status_onbatt
  62. on: apcupsd.status
  63. lookup: max -1s unaligned match-names of ONBATT
  64. units: status
  65. every: 10s
  66. warn: $this == 1
  67. delay: up 1m down 15m multiplier 1.5 max 1h
  68. info: APC UPS has switched to battery power because the input power has failed
  69. to: sitemgr
  70. template: apcupsd_status_overload
  71. on: apcupsd.status
  72. lookup: max -1s unaligned match-names of OVERLOAD
  73. units: status
  74. every: 10s
  75. warn: $this == 1
  76. delay: up 0 down 15m multiplier 1.5 max 1h
  77. info: APC UPS is overloaded and cannot supply enough power to the load
  78. to: sitemgr
  79. template: apcupsd_status_lowbatt
  80. on: apcupsd.status
  81. lookup: max -1s unaligned match-names of LOWBATT
  82. units: status
  83. every: 10s
  84. warn: $this == 1
  85. delay: up 0 down 15m multiplier 1.5 max 1h
  86. info: APC UPS battery is low and needs to be recharged
  87. to: sitemgr
  88. template: apcupsd_status_replacebatt
  89. on: apcupsd.status
  90. lookup: max -1s unaligned match-names of REPLACEBATT
  91. units: status
  92. every: 10s
  93. warn: $this == 1
  94. delay: up 0 down 15m multiplier 1.5 max 1h
  95. info: APC UPS battery has reached the end of its lifespan and needs to be replaced
  96. to: sitemgr
  97. template: apcupsd_status_nobatt
  98. on: apcupsd.status
  99. lookup: max -1s unaligned match-names of NOBATT
  100. units: status
  101. every: 10s
  102. warn: $this == 1
  103. delay: up 0 down 15m multiplier 1.5 max 1h
  104. info: APC UPS has no battery
  105. to: sitemgr
  106. template: apcupsd_status_commlost
  107. on: apcupsd.status
  108. lookup: max -1s unaligned match-names of COMMLOST
  109. units: status
  110. every: 10s
  111. warn: $this == 1
  112. delay: up 0 down 15m multiplier 1.5 max 1h
  113. info: APC UPS communication link is lost
  114. to: sitemgr