Guest User

Untitled

a guest
Nov 18th, 2021
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 18.92 KB | None | 0 0
  1.  templates:
  2.     -
  3. -     template: 'Template Net Juniper SNMPv2'
  4. +     template: 'Juniper SNMP'
  5. -     name: 'Template Net Juniper SNMPv2'
  6. +     name: 'Juniper SNMP'
  7. -     description: "Template Net Juniper version: 0.15\r\nMIBs used:\r\nJUNIPER-ALARM-MIB\r\nJUNIPER-MIB\r\nSNMPv2-MIB"
  8. +     description: "Template Net Juniper\r\n\r\nMIBs used:\r\nJUNIPER-ALARM-MIB\r\nJUNIPER-MIB\r\nSNMPv2-MIB\r\n\r\nTemplate tooling version used: 0.38"
  9.       templates:
  10.         -
  11.           name: 'EtherLike-MIB SNMP'
  12.         -
  13.           name: 'Generic SNMP'
  14.         -
  15.           name: 'Interfaces SNMP'
  16.       macros:
  17. -       -
  18. -         macro: '{$CPU_UTIL_MAX}'
  19. -         value: '90'
  20. +       -
  21. +         macro: '{$CPU.UTIL.CRIT}'
  22. +         value: '90'
  23.         -
  24.           macro: '{$FAN_CRIT_STATUS}'
  25.           value: '6'
  26.         -
  27.           macro: '{$HEALTH_CRIT_STATUS}'
  28.           value: '3'
  29. -       -
  30. -         macro: '{$MEMORY_UTIL_MAX}'
  31. -         value: '90'
  32. +       -
  33. +         macro: '{$MEMORY.UTIL.MAX}'
  34. +         value: '90'
  35.         -
  36.           macro: '{$PSU_CRIT_STATUS}'
  37.           value: '6'
  38.         -
  39.           macro: '{$TEMP_CRIT}'
  40.           value: '60'
  41.         -
  42.           macro: '{$TEMP_CRIT:"Routing Engine"}'
  43.           value: '80'
  44.         -
  45.           macro: '{$TEMP_CRIT_LOW}'
  46.           value: '5'
  47.         -
  48.           macro: '{$TEMP_WARN}'
  49.           value: '50'
  50.         -
  51.           macro: '{$TEMP_WARN:"Routing Engine"}'
  52.           value: '70'
  53.       items:
  54. +       -
  55. +         name: 'Operating system'
  56. +         type: SNMP_AGENT
  57. +         snmp_oid: 1.3.6.1.2.1.1.1.0
  58. +         key: 'system.sw.os[sysDescr.0]'
  59. +         delay: 1h
  60. +         history: 2w
  61. +         trends: '0'
  62. +         value_type: CHAR
  63. +         description: 'MIB: SNMPv2-MIB'
  64. +         inventory_link: OS
  65. +         preprocessing:
  66. +           -
  67. +             type: REGEX
  68. +             parameters:
  69. +               - 'kernel (JUNOS [0-9a-zA-Z\.\-]+)'
  70. +               -
  71. +           -
  72. +             type: DISCARD_UNCHANGED_HEARTBEAT
  73. +             parameters:
  74. +               - 1d
  75. +         tags:
  76. +           -
  77. +             tag: Application
  78. +             value: Inventory
  79. +         triggers:
  80. +           -
  81. +             expression: 'last(/Juniper SNMP/system.sw.os[sysDescr.0],#1)<>last(/Juniper SNMP/system.sw.os[sysDescr.0],#2) and length(last(/Juniper SNMP/system.sw.os[sysDescr.0]))>0'
  82. +             name: 'Operating system description has changed'
  83. +             priority: INFO
  84. +             description: 'Operating system description has changed. Possible reasons that system has been updated or replaced. Ack to close.'
  85. +             manual_close: 'YES'
  86.         -
  87.           name: 'Hardware model name'
  88.           type: SNMP_AGENT
  89.           snmp_oid: 1.3.6.1.4.1.2636.3.1.2.0
  90.           key: system.hw.model
  91.           delay: 1h
  92.           history: 2w
  93.           trends: '0'
  94.           value_type: CHAR
  95.           description: "MIB: JUNIPER-MIB\r\nThe name, model, or detailed description of the box,indicating which product the box is about, for example 'M40'."
  96.           inventory_link: MODEL
  97.           tags:
  98.             -
  99.               tag: Application
  100.               value: Inventory
  101. +         preprocessing:
  102. +           -
  103. +             type: DISCARD_UNCHANGED_HEARTBEAT
  104. +             parameters:
  105. +               - 1d
  106.         -
  107.           name: 'Hardware serial number'
  108.           type: SNMP_AGENT
  109.           snmp_oid: 1.3.6.1.4.1.2636.3.1.3.0
  110.           key: system.hw.serialnumber
  111.           delay: 1h
  112.           history: 2w
  113.           trends: '0'
  114.           value_type: CHAR
  115.           description: "MIB: JUNIPER-MIB\r\nThe serial number of this subject, blank if unknown or unavailable."
  116.           inventory_link: SERIALNO_A
  117.           tags:
  118.             -
  119.               tag: Application
  120.               value: Inventory
  121. +         preprocessing:
  122. +           -
  123. +             type: DISCARD_UNCHANGED_HEARTBEAT
  124. +             parameters:
  125. +               - 1d
  126.           triggers:
  127.             -
  128. -             expression: '(last(/Template Net Juniper SNMPv2/system.hw.serialnumber,#1)<>last(/Template Net Juniper SNMPv2/system.hw.serialnumber,#2))=1 and length(last(/Template Net Juniper SNMPv2/system.hw.serialnumber))>0'
  129. +             expression: 'last(/Juniper SNMP/system.hw.serialnumber,#1)<>last(/Juniper SNMP/system.hw.serialnumber,#2) and length(last(/Juniper SNMP/system.hw.serialnumber))>0'
  130. -             recovery_mode: NONE
  131.               name: 'Device has been replaced (new serial number received)'
  132.               priority: INFO
  133. -             description: "Last value: {ITEM.LASTVALUE1}.\r\nDevice serial number has changed. Ack to close"
  134. +             description: 'Device serial number has changed. Ack to close'
  135.               manual_close: 'YES'
  136.         -
  137.           name: 'Overall system health status'
  138.           type: SNMP_AGENT
  139.           snmp_oid: 1.3.6.1.4.1.2636.3.4.2.3.1.0
  140.           key: 'system.status[jnxRedAlarmState.0]'
  141.           delay: 30s
  142.           history: 2w
  143.           trends: 0d
  144.           description: "MIB: JUNIPER-ALARM-MIB\r\nThe red alarm indication on the craft interface panel.\r\nThe red alarm is on when there is some system\r\nfailure or power supply failure or the system\r\nis experiencing a hardware malfunction or some\r\nthreshold is being exceeded.\r\n\r\nThis red alarm state could be turned off by the\r\nACO/LT (Alarm Cut Off / Lamp Test) button on the\r\nfront panel module."
  145.           valuemap:
  146.             name: 'JUNIPER-ALARM-MIB::jnxRedAlarmState'
  147.           tags:
  148.             -
  149.               tag: Application
  150.               value: Status
  151.           triggers:
  152.             -
  153. -             expression: 'count(/Template Net Juniper SNMPv2/system.status[jnxRedAlarmState.0],#1,"eq","{$HEALTH_CRIT_STATUS}")=1'
  154. +             expression: 'count(/Juniper SNMP/system.status[jnxRedAlarmState.0],#1,"eq","{$HEALTH_CRIT_STATUS}")=1'
  155.               name: 'System status is in critical state'
  156.               priority: HIGH
  157. -             description: "Last value: {ITEM.LASTVALUE1}.\r\nPlease check the device for errors"
  158. +             description: 'Please check the device for errors'
  159. -             tags:
  160. -               -
  161. -                 tag: type
  162. -                 value: Critical
  163. +             opdata: 'Current state: {ITEM.LASTVALUE1}'
  164.       discovery_rules:
  165.         -
  166.           name: 'CPU and Memory Discovery'
  167.           type: SNMP_AGENT
  168.           snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.2636.3.1.13.1.5]'
  169.           key: jnxOperatingTable.discovery
  170.           delay: 1h
  171.           filter:
  172.             conditions:
  173.               -
  174.                 macro: '{#SNMPVALUE}'
  175.                 value: 'Routing Engine.*'
  176.                 formulaid: A
  177.           description: "Scanning JUNIPER-MIB::jnxOperatingTable for CPU and Memory\r\nhttp://kb.juniper.net/InfoCenter/index?page=content&id=KB17526&actp=search. Filter limits results to Routing Engines"
  178.           item_prototypes:
  179. +           -
  180. +             name: '{#SNMPVALUE}: CPU utilization'
  181. +             type: SNMP_AGENT
  182. +             snmp_oid: '1.3.6.1.4.1.2636.3.1.13.1.8.{#SNMPINDEX}'
  183. +             key: 'system.cpu.util[jnxOperatingCPU.{#SNMPINDEX}]'
  184. +             history: 7d
  185. +             value_type: FLOAT
  186. +             units: '%'
  187. +             description: "MIB: JUNIPER-MIB\r\nThe CPU utilization in percentage of this subject. Zero if unavailable or inapplicable.\r\nReference: http://kb.juniper.net/library/CUSTOMERSERVICE/GLOBAL_JTAC/BK26199/SRX%20SNMP%20Monitoring%20Guide_v1.1.pdf"
  188. +             tags:
  189. +               -
  190. +                 tag: Application
  191. +                 value: CPU
  192. +             trigger_prototypes:
  193. +               -
  194. +                 expression: 'min(/Juniper SNMP/system.cpu.util[jnxOperatingCPU.{#SNMPINDEX}],5m)>{$CPU.UTIL.CRIT}'
  195. +                 name: '{#SNMPVALUE}: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
  196. +                 opdata: 'Current utilization: {ITEM.LASTVALUE1}'
  197. +                 priority: WARNING
  198. +                 description: 'CPU utilization is too high. The system might be slow to respond.'
  199. +           -
  200. +             name: '{#SNMPVALUE}: Memory utilization'
  201. +             type: SNMP_AGENT
  202. +             snmp_oid: '1.3.6.1.4.1.2636.3.1.13.1.11.{#SNMPINDEX}'
  203. +             key: 'vm.memory.util[jnxOperatingBuffer.{#SNMPINDEX}]'
  204. +             history: 7d
  205. +             value_type: FLOAT
  206. +             units: '%'
  207. +             description: "MIB: JUNIPER-MIB\r\nThe buffer pool utilization in percentage of this subject.  Zero if unavailable or inapplicable.\r\nReference: http://kb.juniper.net/library/CUSTOMERSERVICE/GLOBAL_JTAC/BK26199/SRX%20SNMP%20Monitoring%20Guide_v1.1.pdf"
  208. +             tags:
  209. +               -
  210. +                 tag: Application
  211. +                 value: Memory
  212. +             trigger_prototypes:
  213. +               -
  214. +                 expression: 'min(/Juniper SNMP/vm.memory.util[jnxOperatingBuffer.{#SNMPINDEX}],5m)>{$MEMORY.UTIL.MAX}'
  215. +                 name: '{#SNMPVALUE}: High memory utilization (>{$MEMORY.UTIL.MAX}% for 5m)'
  216. +                 priority: AVERAGE
  217. +                 description: 'The system is running out of free memory.'
  218.           graph_prototypes:
  219.             -
  220.               name: '{#SNMPVALUE}: CPU utilization'
  221.               ymin_type_1: FIXED
  222.               ymax_type_1: FIXED
  223.               graph_items:
  224. -               -
  225. -                 drawtype: GRADIENT_LINE
  226. -                 color: 1A7C11
  227. -                 item:
  228. -                   host: 'Template Net Juniper SNMPv2'
  229. -                   key: 'system.cpu.util[jnxOperating5MinLoadAvg.{#SNMPINDEX}]'
  230. +               -
  231. +                 drawtype: GRADIENT_LINE
  232. +                 color: 1A7C11
  233. +                 item:
  234. +                   host: 'Juniper SNMP'
  235. +                   key: 'system.cpu.util[jnxOperatingCPU.{#SNMPINDEX}]'
  236.             -
  237.               name: '{#SNMPVALUE}: Memory utilization'
  238.               ymin_type_1: FIXED
  239.               ymax_type_1: FIXED
  240.               graph_items:
  241. -               -
  242. -                 drawtype: GRADIENT_LINE
  243. -                 color: 1A7C11
  244. -                 item:
  245. -                   host: 'Template Net Juniper SNMPv2'
  246. -                   key: 'vm.memory.pused[jnxOperatingBuffer.{#SNMPINDEX}]'
  247. +               -
  248. +                 drawtype: GRADIENT_LINE
  249. +                 color: 1A7C11
  250. +                 item:
  251. +                   host: 'Juniper SNMP'
  252. +                   key: 'vm.memory.util[jnxOperatingBuffer.{#SNMPINDEX}]'
  253.         -
  254.           name: 'FAN Discovery'
  255.           type: SNMP_AGENT
  256.           snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.2636.3.1.13.1.5.4]'
  257.           key: jnxOperatingTable.discovery.fans
  258.           delay: 1h
  259.           description: 'Scanning JUNIPER-MIB::jnxOperatingTable for Fans'
  260.           item_prototypes:
  261.             -
  262.               name: '{#SNMPVALUE}: Fan status'
  263.               type: SNMP_AGENT
  264.               snmp_oid: '1.3.6.1.4.1.2636.3.1.13.1.6.4.{#SNMPINDEX}'
  265.               key: 'sensor.fan.status[jnxOperatingState.4.{#SNMPINDEX}]'
  266.               delay: 3m
  267.               history: 2w
  268.               trends: 0d
  269.               description: 'MIB: JUNIPER-MIB'
  270.               valuemap:
  271.                 name: 'JUNIPER-ALARM-MIB::jnxOperatingState'
  272.               tags:
  273.                 -
  274.                   tag: Application
  275.                   value: Fans
  276.               trigger_prototypes:
  277.                 -
  278. -                 expression: 'count(/Template Net Juniper SNMPv2/sensor.fan.status[jnxOperatingState.4.{#SNMPINDEX}],#1,"eq","{$FAN_CRIT_STATUS}")=1'
  279. +                 expression: 'count(/Juniper SNMP/sensor.fan.status[jnxOperatingState.4.{#SNMPINDEX}],#1,"eq","{$FAN_CRIT_STATUS}")=1'
  280.                   name: '{#SNMPVALUE}: Fan is in critical state'
  281.                   priority: AVERAGE
  282. -                 description: "Last value: {ITEM.LASTVALUE1}.\r\nPlease check the fan unit"
  283. +                 description: 'Please check the fan unit'
  284. +                 opdata: 'Current state: {ITEM.LASTVALUE1}'
  285.         -
  286.           name: 'PSU Discovery'
  287.           type: SNMP_AGENT
  288.           snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.2636.3.1.13.1.5.2]'
  289.           key: jnxOperatingTable.discovery.psu
  290.           delay: 1h
  291.           description: 'Scanning JUNIPER-MIB::jnxOperatingTable for Power Supplies'
  292.           item_prototypes:
  293.             -
  294.               name: '{#SNMPVALUE}: Power supply status'
  295.               type: SNMP_AGENT
  296.               snmp_oid: '1.3.6.1.4.1.2636.3.1.13.1.6.2.{#SNMPINDEX}'
  297.               key: 'sensor.psu.status[jnxOperatingState.2.{#SNMPINDEX}]'
  298.               delay: 3m
  299.               history: 2w
  300.               trends: 0d
  301.               description: "MIB: JUNIPER-MIB\r\nIf they are using DC power supplies there is a known issue on PR 1064039 where the fans do not detect the temperature correctly and fail to cool the power supply causing the shutdown to occur.\r\nThis is fixed in Junos 13.3R7 https://forums.juniper.net/t5/Routing/PEM-0-not-OK-MX104/m-p/289644#M14122"
  302.               valuemap:
  303.                 name: 'JUNIPER-ALARM-MIB::jnxOperatingState'
  304.               tags:
  305.                 -
  306.                   tag: Application
  307.                   value: 'Power supply'
  308.               trigger_prototypes:
  309.                 -
  310. -                 expression: 'count(/Template Net Juniper SNMPv2/sensor.psu.status[jnxOperatingState.2.{#SNMPINDEX}],#1,"eq","{$PSU_CRIT_STATUS}")=1'
  311. +                 expression: 'count(/Juniper SNMP/sensor.psu.status[jnxOperatingState.2.{#SNMPINDEX}],#1,"eq","{$PSU_CRIT_STATUS}")=1'
  312.                   name: '{#SNMPVALUE}: Power supply is in critical state'
  313.                   priority: AVERAGE
  314. -                 description: "Last value: {ITEM.LASTVALUE1}.\r\nPlease check the power supply unit for errors"
  315. +                 description: 'Please check the power supply unit for errors'
  316. +                 opdata: 'Current state: {ITEM.LASTVALUE1}'
  317.         -
  318.           name: 'Temperature discovery'
  319.           type: SNMP_AGENT
  320.           snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.2636.3.1.13.1.7,{#SENSOR_INFO},1.3.6.1.4.1.2636.3.1.13.1.5]'
  321.           key: jnxOperatingTable.discovery.temp
  322.           delay: 1h
  323.           filter:
  324.             conditions:
  325.               -
  326.                 macro: '{#SNMPVALUE}'
  327.                 value: '[^0]+'
  328.                 formulaid: A
  329.           description: "Scanning JUNIPER-MIB::jnxOperatingTable for Temperature\r\nhttp://kb.juniper.net/InfoCenter/index?page=content&id=KB17526&actp=search. Filter limits results to Routing Engines"
  330.           item_prototypes:
  331.             -
  332.               name: '{#SENSOR_INFO}: Temperature'
  333.               type: SNMP_AGENT
  334.               snmp_oid: '1.3.6.1.4.1.2636.3.1.13.1.7.{#SNMPINDEX}'
  335.               key: 'sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}]'
  336.               delay: 3m
  337. -             history: 30d
  338.               value_type: FLOAT
  339.               units: °C
  340.               description: "MIB: JUNIPER-MIB\r\nThe temperature in Celsius (degrees C) of {#SENSOR_INFO}"
  341.               tags:
  342.                 -
  343.                   tag: Application
  344.                   value: Temperature
  345.               trigger_prototypes:
  346.                 -
  347. -                 expression: 'avg(/Template Net Juniper SNMPv2/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)>{$TEMP_CRIT:""}'
  348. +                 expression: 'avg(/Juniper SNMP/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)>{$TEMP_CRIT:""}'
  349.                   recovery_mode: RECOVERY_EXPRESSION
  350. -                 recovery_expression: 'max(/Template Net Juniper SNMPv2/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)<{$TEMP_CRIT:""}-3'
  351. +                 recovery_expression: 'max(/Juniper SNMP/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)<{$TEMP_CRIT:""}-3'
  352.                   name: '{#SENSOR_INFO}: Temperature is above critical threshold: >{$TEMP_CRIT:""}'
  353.                   priority: HIGH
  354. -                 description: "Last value: {ITEM.LASTVALUE1}.\r\nThis trigger uses temperature sensor values as well as temperature sensor status if available"
  355. +                 description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
  356. -                 tags:
  357. -                   -
  358. -                     tag: type
  359. -                     value: Critical
  360. +                 opdata: 'Current value: {ITEM.LASTVALUE1}'
  361.                 -
  362. -                 expression: 'avg(/Template Net Juniper SNMPv2/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)>{$TEMP_WARN:""}'
  363. +                 expression: 'avg(/Juniper SNMP/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)>{$TEMP_WARN:""}'
  364.                   recovery_mode: RECOVERY_EXPRESSION
  365. -                 recovery_expression: 'max(/Template Net Juniper SNMPv2/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)<{$TEMP_WARN:""}-3'
  366. +                 recovery_expression: 'max(/Juniper SNMP/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)<{$TEMP_WARN:""}-3'
  367.                   name: '{#SENSOR_INFO}: Temperature is above warning threshold: >{$TEMP_WARN:""}'
  368.                   priority: WARNING
  369. -                 description: "Last value: {ITEM.LASTVALUE1}.\r\nThis trigger uses temperature sensor values as well as temperature sensor status if available"
  370. +                 description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
  371.                   dependencies:
  372. -                   -
  373. -                     name: '{#SENSOR_INFO}: Temperature is above critical threshold: >{$TEMP_CRIT:""}'
  374. -                     expression: 'avg(/Template Net Juniper SNMPv2/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)>{$TEMP_CRIT:""}'
  375. -                     recovery_expression: 'max(/Template Net Juniper SNMPv2/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)<{$TEMP_CRIT:""}-3'
  376. +                   -
  377. +                     name: '{#SENSOR_INFO}: Temperature is above critical threshold: >{$TEMP_CRIT:""}'
  378. +                     expression: 'avg(/Juniper SNMP/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)>{$TEMP_CRIT:""}'
  379. +                     recovery_expression: 'max(/Juniper SNMP/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)<{$TEMP_CRIT:""}-3'
  380. +                 opdata: 'Current value: {ITEM.LASTVALUE1}'
  381.                 -
  382. -                 expression: 'avg(/Template Net Juniper SNMPv2/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)<{$TEMP_CRIT_LOW:""}'
  383. +                 expression: 'avg(/Juniper SNMP/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)<{$TEMP_CRIT_LOW:""}'
  384.                   recovery_mode: RECOVERY_EXPRESSION
  385. -                 recovery_expression: 'min(/Template Net Juniper SNMPv2/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)>{$TEMP_CRIT_LOW:""}+3'
  386. +                 recovery_expression: 'min(/Juniper SNMP/sensor.temp.value[jnxOperatingTemp.{#SNMPINDEX}],5m)>{$TEMP_CRIT_LOW:""}+3'
  387.                   name: '{#SENSOR_INFO}: Temperature is too low: <{$TEMP_CRIT_LOW:""}'
  388.                   priority: AVERAGE
  389. -                 description: 'Last value: {ITEM.LASTVALUE1}.'
  390. +                 opdata: 'Current value: {ITEM.LASTVALUE1}'
Advertisement
Add Comment
Please, Sign In to add comment