| 1 | { |
| 2 | "mapping": { |
| 3 | "diStatus": { |
| 4 | "0": "Off", |
| 5 | "1": "On" |
| 6 | } |
| 7 | }, |
| 8 | "constants": { |
| 9 | "criticalStatus": "Off" |
| 10 | }, |
| 11 | "snmp": { |
| 12 | "tables": [ |
| 13 | { |
| 14 | "name": "diEntry", |
| 15 | "oid": ".1.3.6.1.4.1.8691.10.2210.10.1.1", |
| 16 | "used_instance": "\\.(\\d+)$", |
| 17 | "entries": [ |
| 18 | { "name": "diIndex", "oid": ".1.3.6.1.4.1.8691.10.2210.10.1.1.1"}, |
| 19 | { "name": "diStatus", "oid": ".1.3.6.1.4.1.8691.10.2210.10.1.1.4" , "map": "diStatus"} |
| 20 | ] |
| 21 | } |
| 22 | ] |
| 23 | }, |
| 24 | "selection_loop": [ |
| 25 | { |
| 26 | "name": "DI Channel identification", |
| 27 | "source": "%(snmp.tables.diEntry)", |
| 28 | "expand_tables": { |
| 29 | "diEntry": "%(snmp.tables.diEntry.[%(diEntry.instance)])" |
| 30 | }, |
| 31 | "critical": "%(diEntry.diStatus) =~ /%(constants.criticalStatus)/", |
| 32 | "formatting": { |
| 33 | "printf_msg": "Device '%s' status is '%s'", |
| 34 | "printf_var": [ |
| 35 | "%(diEntry.diIndex)", |
| 36 | "%(diEntry.diStatus)" |
| 37 | ], |
| 38 | "display_ok": true |
| 39 | } |
| 40 | } |
| 41 | ], |
| 42 | "formatting": { |
| 43 | "custom_message_global": "All DI Channels are OK", |
| 44 | "separator": "-" |
| 45 | } |
| 46 | } |