Template_App_systemd_Services.xml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <zabbix_export>
  3. <version>3.4</version>
  4. <date>2018-07-20T14:31:02Z</date>
  5. <groups>
  6. <group>
  7. <name>Templates/Applications</name>
  8. </group>
  9. </groups>
  10. <templates>
  11. <template>
  12. <template>Template App systemd Services</template>
  13. <name>Template App systemd Services</name>
  14. <description>Discovery enabled systemd services, checks status every 1m, and checks PID every 10m to determine if service has rebooted.</description>
  15. <groups>
  16. <group>
  17. <name>Templates/Applications</name>
  18. </group>
  19. </groups>
  20. <applications>
  21. <application>
  22. <name>systemd</name>
  23. </application>
  24. </applications>
  25. <items>
  26. <item>
  27. <name>System uptime</name>
  28. <type>0</type>
  29. <snmp_community/>
  30. <snmp_oid/>
  31. <key>systemd.uptime</key>
  32. <delay>10m</delay>
  33. <history>1d</history>
  34. <trends>1w</trends>
  35. <status>0</status>
  36. <value_type>3</value_type>
  37. <allowed_hosts/>
  38. <units>uptime</units>
  39. <snmpv3_contextname/>
  40. <snmpv3_securityname/>
  41. <snmpv3_securitylevel>0</snmpv3_securitylevel>
  42. <snmpv3_authprotocol>0</snmpv3_authprotocol>
  43. <snmpv3_authpassphrase/>
  44. <snmpv3_privprotocol>0</snmpv3_privprotocol>
  45. <snmpv3_privpassphrase/>
  46. <params/>
  47. <ipmi_sensor/>
  48. <authtype>0</authtype>
  49. <username/>
  50. <password/>
  51. <publickey/>
  52. <privatekey/>
  53. <port/>
  54. <description/>
  55. <inventory_link>0</inventory_link>
  56. <applications/>
  57. <valuemap/>
  58. <logtimefmt/>
  59. <preprocessing/>
  60. <jmx_endpoint/>
  61. <master_item/>
  62. </item>
  63. </items>
  64. <discovery_rules>
  65. <discovery_rule>
  66. <name>Service Discovery</name>
  67. <type>0</type>
  68. <snmp_community/>
  69. <snmp_oid/>
  70. <key>systemd.service.discovery</key>
  71. <delay>24h</delay>
  72. <status>0</status>
  73. <allowed_hosts/>
  74. <snmpv3_contextname/>
  75. <snmpv3_securityname/>
  76. <snmpv3_securitylevel>0</snmpv3_securitylevel>
  77. <snmpv3_authprotocol>0</snmpv3_authprotocol>
  78. <snmpv3_authpassphrase/>
  79. <snmpv3_privprotocol>0</snmpv3_privprotocol>
  80. <snmpv3_privpassphrase/>
  81. <params/>
  82. <ipmi_sensor/>
  83. <authtype>0</authtype>
  84. <username/>
  85. <password/>
  86. <publickey/>
  87. <privatekey/>
  88. <port/>
  89. <filter>
  90. <evaltype>0</evaltype>
  91. <formula/>
  92. <conditions/>
  93. </filter>
  94. <lifetime>1d</lifetime>
  95. <description/>
  96. <item_prototypes>
  97. <item_prototype>
  98. <name>{#SERVICE} PID</name>
  99. <type>0</type>
  100. <snmp_community/>
  101. <snmp_oid/>
  102. <key>systemd.service.PID[{#SERVICE}]</key>
  103. <delay>10m</delay>
  104. <history>30d</history>
  105. <trends>365d</trends>
  106. <status>0</status>
  107. <value_type>3</value_type>
  108. <allowed_hosts/>
  109. <units/>
  110. <snmpv3_contextname/>
  111. <snmpv3_securityname/>
  112. <snmpv3_securitylevel>0</snmpv3_securitylevel>
  113. <snmpv3_authprotocol>0</snmpv3_authprotocol>
  114. <snmpv3_authpassphrase/>
  115. <snmpv3_privprotocol>0</snmpv3_privprotocol>
  116. <snmpv3_privpassphrase/>
  117. <params/>
  118. <ipmi_sensor/>
  119. <authtype>0</authtype>
  120. <username/>
  121. <password/>
  122. <publickey/>
  123. <privatekey/>
  124. <port/>
  125. <description/>
  126. <inventory_link>0</inventory_link>
  127. <applications/>
  128. <valuemap/>
  129. <logtimefmt/>
  130. <preprocessing/>
  131. <jmx_endpoint/>
  132. <application_prototypes/>
  133. <master_item_prototype/>
  134. </item_prototype>
  135. <item_prototype>
  136. <name>{#SERVICE} Status</name>
  137. <type>0</type>
  138. <snmp_community/>
  139. <snmp_oid/>
  140. <key>systemd.service.status[{#SERVICE}]</key>
  141. <delay>1m</delay>
  142. <history>30d</history>
  143. <trends>365d</trends>
  144. <status>0</status>
  145. <value_type>3</value_type>
  146. <allowed_hosts/>
  147. <units/>
  148. <snmpv3_contextname/>
  149. <snmpv3_securityname/>
  150. <snmpv3_securitylevel>0</snmpv3_securitylevel>
  151. <snmpv3_authprotocol>0</snmpv3_authprotocol>
  152. <snmpv3_authpassphrase/>
  153. <snmpv3_privprotocol>0</snmpv3_privprotocol>
  154. <snmpv3_privpassphrase/>
  155. <params/>
  156. <ipmi_sensor/>
  157. <authtype>0</authtype>
  158. <username/>
  159. <password/>
  160. <publickey/>
  161. <privatekey/>
  162. <port/>
  163. <description>Returns the status of the</description>
  164. <inventory_link>0</inventory_link>
  165. <applications/>
  166. <valuemap/>
  167. <logtimefmt/>
  168. <preprocessing/>
  169. <jmx_endpoint/>
  170. <application_prototypes/>
  171. <master_item_prototype/>
  172. </item_prototype>
  173. </item_prototypes>
  174. <trigger_prototypes>
  175. <trigger_prototype>
  176. <expression>{Template App systemd Services:systemd.service.PID[{#SERVICE}].diff(0)}&lt;&gt;0 and {Template App systemd Services:systemd.uptime.last()}&gt;180</expression>
  177. <recovery_mode>0</recovery_mode>
  178. <recovery_expression/>
  179. <name>{#SERVICE} has restarted</name>
  180. <correlation_mode>0</correlation_mode>
  181. <correlation_tag/>
  182. <url/>
  183. <status>0</status>
  184. <priority>2</priority>
  185. <description>The Service has been restarted and is using a new PID</description>
  186. <type>0</type>
  187. <manual_close>1</manual_close>
  188. <dependencies/>
  189. <tags/>
  190. </trigger_prototype>
  191. <trigger_prototype>
  192. <expression>{Template App systemd Services:systemd.service.status[{#SERVICE}].last()}&lt;&gt;0</expression>
  193. <recovery_mode>0</recovery_mode>
  194. <recovery_expression/>
  195. <name>{#SERVICE} not running</name>
  196. <correlation_mode>0</correlation_mode>
  197. <correlation_tag/>
  198. <url/>
  199. <status>0</status>
  200. <priority>4</priority>
  201. <description/>
  202. <type>0</type>
  203. <manual_close>1</manual_close>
  204. <dependencies/>
  205. <tags/>
  206. </trigger_prototype>
  207. </trigger_prototypes>
  208. <graph_prototypes/>
  209. <host_prototypes/>
  210. <jmx_endpoint/>
  211. </discovery_rule>
  212. </discovery_rules>
  213. <httptests/>
  214. <macros/>
  215. <templates/>
  216. <screens/>
  217. </template>
  218. </templates>
  219. </zabbix_export>