| 1 | { |
| 2 | "mapping": { |
| 3 | "eqptSlotPowerStatus": { |
| 4 | "1": "powerUp", |
| 5 | "2": "powerDown" |
| 6 | }, |
| 7 | "eqptBoardAdminStatus": { |
| 8 | "1": "unlock", |
| 9 | "2": "lock" |
| 10 | }, |
| 11 | "eqptBoardOperStatus": { |
| 12 | "1": "operUp", |
| 13 | "2": "operDown" |
| 14 | }, |
| 15 | "eqptBoardOperError": { |
| 16 | "1": "no-error", |
| 17 | "2": "type-mismatch", |
| 18 | "3": "board-missing", |
| 19 | "4": "board-installation-missing", |
| 20 | "5": "no-planned-board", |
| 21 | "6": "waiting-for-sw", |
| 22 | "7": "init-boot-failed", |
| 23 | "8": "init-download-failed", |
| 24 | "9": "init-connection-failed", |
| 25 | "10": "init-configuration-failed", |
| 26 | "11": "board-reset-protection", |
| 27 | "12": "invalid-parameter", |
| 28 | "13": "temperature-alarm", |
| 29 | "14": "tempshutdown", |
| 30 | "15": "defense", |
| 31 | "16": "board-not-licensed", |
| 32 | "17": "sem-power-fail", |
| 33 | "18": "sem-ups-fail", |
| 34 | "19": "board-in-incompatible-slot", |
| 35 | "21": "download-ongoing", |
| 36 | "255": "unknown-error" |
| 37 | }, |
| 38 | "eqptBoardAvailStatus": { |
| 39 | "1": "available", |
| 40 | "2": "inTest", |
| 41 | "3": "failed", |
| 42 | "4": "powerOff", |
| 43 | "5": "notInstalled", |
| 44 | "6": "offLine", |
| 45 | "7": "dependency" |
| 46 | }, |
| 47 | "eqptBoardRestart": { |
| 48 | "1": "with-selftest", |
| 49 | "2": "without-selftest", |
| 50 | "5": "hot-restart", |
| 51 | "255": "initialValue" |
| 52 | }, |
| 53 | "eqptBoardLastRestartCause": { |
| 54 | "1": "poweron", |
| 55 | "2": "unknown", |
| 56 | "3": "watchdog", |
| 57 | "4": "coldreset", |
| 58 | "5": "warmreset", |
| 59 | "6": "hotreset", |
| 60 | "7": "hotreload", |
| 61 | "8": "cleandata", |
| 62 | "9": "emergencybuild", |
| 63 | "10": "poweronreset", |
| 64 | "11": "commitfailure", |
| 65 | "12": "timezonemodified" |
| 66 | }, |
| 67 | "eqptBoardContainerOffset": { |
| 68 | "0": "iont:1/1", |
| 69 | "1": "nt-a", |
| 70 | "2": "nt-b", |
| 71 | "3": "lt:1/1/1", |
| 72 | "4": "lt:1/1/2", |
| 73 | "5": "lt:1/1/3", |
| 74 | "6": "lt:1/1/4", |
| 75 | "7": "lt:1/1/5", |
| 76 | "8": "lt:1/1/6", |
| 77 | "9": "lt:1/1/7", |
| 78 | "10": "lt:1/1/8", |
| 79 | "11": "lt:1/1/12", |
| 80 | "12": "lt:1/1/13", |
| 81 | "13": "lt:1/1/14", |
| 82 | "14": "lt:1/1/15", |
| 83 | "15": "lt:1/1/16", |
| 84 | "16": "lt:1/1/17", |
| 85 | "17": "lt:1/1/18", |
| 86 | "18": "lt:1/1/19" |
| 87 | } |
| 88 | }, |
| 89 | "constants": { |
| 90 | "warningStatus": "operDown", |
| 91 | "filtereqptSlotPlannedType": "NOT_PLANNED" |
| 92 | }, |
| 93 | "snmp": { |
| 94 | "tables": [ |
| 95 | { |
| 96 | "name": "eqptBoardEntry", |
| 97 | "oid": ".1.3.6.1.4.1.637.61.1.23.3.1", |
| 98 | "used_instance": "\\.(\\d+)$", |
| 99 | "entries" :[ |
| 100 | { "name": "eqptSlotPlannedType", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.2" }, |
| 101 | { "name": "eqptSlotActualType", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.3" }, |
| 102 | { "name": "eqptSlotPowerStatus", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.4", "map": "eqptSlotPowerStatus" }, |
| 103 | { "name": "eqptBoardAdminStatus", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.5", "map": "eqptBoardAdminStatus" }, |
| 104 | { "name": "eqptBoardOperStatus", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.6", "map": "eqptBoardOperStatus" }, |
| 105 | { "name": "eqptBoardOperError", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.7", "map": "eqptBoardOperError" }, |
| 106 | { "name": "eqptBoardAvailStatus", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.8", "map": "eqptBoardAvailStatus" }, |
| 107 | { "name": "eqptBoardRestart", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.9", "map": "eqptBoardRestart" }, |
| 108 | { "name": "eqptBoardContainerOffset", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.12", "map": "eqptBoardContainerOffset" }, |
| 109 | { "name": "eqptBoardInventoryTypeName", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.14" }, |
| 110 | { "name": "eqptBoardInventoryPBACode", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.15" }, |
| 111 | { "name": "eqptBoardInventorySerialNumber", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.19" }, |
| 112 | { "name": "eqptBoardLastRestartCause", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.24", "map": "eqptBoardLastRestartCause" }, |
| 113 | { "name": "eqptBoardLastRestartTime", "oid": ".1.3.6.1.4.1.637.61.1.23.3.1.25" } |
| 114 | ] |
| 115 | }, |
| 116 | { |
| 117 | "name": "eqptBoardThermalSensorEntry", |
| 118 | "oid": ".1.3.6.1.4.1.637.61.1.23.10.1", |
| 119 | "used_instance": "\\.(\\d+\\.\\d+)$", |
| 120 | "entries" :[ |
| 121 | { "name": "eqptBoardThermalSensorId", "oid": ".1.3.6.1.4.1.637.61.1.23.10.1.1" }, |
| 122 | { "name": "eqptBoardThermalSensorActualTemperature", "oid": ".1.3.6.1.4.1.637.61.1.23.10.1.2" }, |
| 123 | { "name": "eqptBoardThermalSensorTcaThresholdLow", "oid": ".1.3.6.1.4.1.637.61.1.23.10.1.3" }, |
| 124 | { "name": "eqptBoardThermalSensorTcaThresholdHigh", "oid": ".1.3.6.1.4.1.637.61.1.23.10.1.4" }, |
| 125 | { "name": "eqptBoardThermalSensorShutdownThresholdLow", "oid": ".1.3.6.1.4.1.637.61.1.23.10.1.5" }, |
| 126 | { "name": "eqptBoardThermalSensorShutdownThresholdHigh", "oid": ".1.3.6.1.4.1.637.61.1.23.10.1.6" } |
| 127 | ], |
| 128 | "instance_entries": { |
| 129 | "re": "\\.(\\d+)\\.(\\d+)$", |
| 130 | "entries": [ |
| 131 | { "name": "slotId", "capture": "1" }, |
| 132 | { "name": "thermalSensorId", "capture": "2" } |
| 133 | ] |
| 134 | } |
| 135 | } |
| 136 | ] |
| 137 | |
| 138 | }, |
| 139 | "selection": [ |
| 140 | { |
| 141 | "name": "operUp", |
| 142 | "functions": [ |
| 143 | { |
| 144 | "type": "count", |
| 145 | "src": "%(snmp.tables.eqptBoardEntry)", |
| 146 | "filter": "%(src.eqptBoardOperStatus) eq %(name)", |
| 147 | "save": "%(numOperUp)" |
| 148 | } |
| 149 | ], |
| 150 | "perfdatas": [ |
| 151 | { |
| 152 | "nlabel": "isam.device.%(name).count", |
| 153 | "value": "%(numOperUp)", |
| 154 | "min": 0 |
| 155 | |
| 156 | } |
| 157 | ], |
| 158 | "formatting": { |
| 159 | "printf_msg": "Number of %s cards: %d", |
| 160 | "printf_var": [ |
| 161 | "%(name)", |
| 162 | "%(numOperUp)" |
| 163 | ], |
| 164 | "display_ok": false |
| 165 | } |
| 166 | }, |
| 167 | { |
| 168 | "name": "operDown", |
| 169 | "functions": [ |
| 170 | { |
| 171 | "type": "count", |
| 172 | "src": "%(snmp.tables.eqptBoardEntry)", |
| 173 | "filter": "%(src.eqptSlotPlannedType) ne %(constants.filtereqptSlotPlannedType) and %(src.eqptBoardOperStatus) eq %(name)", |
| 174 | "save": "%(numOperDown)" |
| 175 | } |
| 176 | ], |
| 177 | "perfdatas": [ |
| 178 | { |
| 179 | "nlabel": "isam.device.%(name).count", |
| 180 | "value": "%(numOperDown)", |
| 181 | "min": 0 |
| 182 | |
| 183 | } |
| 184 | ], |
| 185 | "formatting": { |
| 186 | "printf_msg": "Number of %s cards: %d", |
| 187 | "printf_var": [ |
| 188 | "%(name)", |
| 189 | "%(numOperDown)" |
| 190 | ], |
| 191 | "display_ok": false |
| 192 | } |
| 193 | } |
| 194 | ], |
| 195 | "selection_loop": [ |
| 196 | { |
| 197 | "name": "eqptBoardTable", |
| 198 | "source": "%(snmp.tables.eqptBoardEntry)", |
| 199 | "expand_table": { |
| 200 | "eqptBoardEntry": "%(snmp.tables.eqptBoardEntry.[%(eqptBoardEntry.instance)])" |
| 201 | }, |
| 202 | "warning": "%(eqptBoardEntry.eqptSlotPlannedType) ne %(constants.filtereqptSlotPlannedType) and %(eqptBoardEntry.eqptBoardOperStatus) eq %(constants.warningStatus)", |
| 203 | "filter": "%(eqptBoardEntry.eqptSlotPlannedType) ne %(constants.filtereqptSlotPlannedType)", |
| 204 | "formatting": { |
| 205 | "printf_msg": "Card %s (%s): status is %s (%s), power status is %s, planned is %s", |
| 206 | "printf_var": [ |
| 207 | "%(eqptBoardEntry.eqptSlotActualType)", |
| 208 | "%(eqptBoardEntry.eqptBoardContainerOffset)", |
| 209 | "%(eqptBoardEntry.eqptBoardOperStatus)", |
| 210 | "%(eqptBoardEntry.eqptBoardOperError)", |
| 211 | "%(eqptBoardEntry.eqptSlotPowerStatus)", |
| 212 | "%(eqptBoardEntry.eqptSlotPlannedType)" |
| 213 | ], |
| 214 | "display_ok": true |
| 215 | } |
| 216 | }, |
| 217 | { |
| 218 | "name": "eqptBoardThermalSensorTable", |
| 219 | "source": "%(snmp.tables.eqptBoardThermalSensorEntry)", |
| 220 | "expand_table": { |
| 221 | "eqptBoardThermalSensorEntry": "%(snmp.tables.eqptBoardThermalSensorEntry.[%(eqptBoardThermalSensorEntry.instance)])", |
| 222 | "eqptBoardEntry": "%(snmp.tables.eqptBoardEntry.[%(eqptBoardThermalSensorEntry.slotId)])" |
| 223 | }, |
| 224 | "perfdatas": [ |
| 225 | { |
| 226 | "nlabel": "%(eqptBoardEntry.eqptBoardContainerOffset).%(eqptBoardThermalSensorEntry.thermalSensorId).temp", |
| 227 | "instances": |
| 228 | [ |
| 229 | "%(eqptBoardEntry.eqptBoardContainerOffset)", |
| 230 | "%(eqptBoardThermalSensorEntry.thermalSensorId)" |
| 231 | ], |
| 232 | "value": "%(eqptBoardThermalSensorEntry.eqptBoardThermalSensorActualTemperature)", |
| 233 | "warning": "%(eqptBoardThermalSensorEntry.eqptBoardThermalSensorTcaThresholdLow)", |
| 234 | "critical": "%(eqptBoardThermalSensorEntry.eqptBoardThermalSensorShutdownThresholdLow)", |
| 235 | "min": 0, |
| 236 | "unit": "°C" |
| 237 | } |
| 238 | ], |
| 239 | "warning": "%(eqptBoardThermalSensorEntry.eqptBoardThermalSensorActualTemperature) > (%(eqptBoardThermalSensorEntry.eqptBoardThermalSensorShutdownThresholdLow) - %(eqptBoardThermalSensorEntry.eqptBoardThermalSensorShutdownThresholdLow) * 0.10)", |
| 240 | "critical": "%(eqptBoardThermalSensorEntry.eqptBoardThermalSensorActualTemperature) > (%(eqptBoardThermalSensorEntry.eqptBoardThermalSensorShutdownThresholdLow) - %(eqptBoardThermalSensorEntry.eqptBoardThermalSensorShutdownThresholdLow) * 0.05)", |
| 241 | "formatting": { |
| 242 | "printf_msg": "Card %s (%s): sensor #%s temperature is %s°C (shutdown at %s°C)\n", |
| 243 | "printf_var": [ |
| 244 | "%(eqptBoardEntry.eqptSlotActualType)", |
| 245 | "%(eqptBoardEntry.eqptBoardContainerOffset)", |
| 246 | "%(eqptBoardThermalSensorEntry.thermalSensorId)", |
| 247 | "%(eqptBoardThermalSensorEntry.eqptBoardThermalSensorActualTemperature)", |
| 248 | "%(eqptBoardThermalSensorEntry.eqptBoardThermalSensorShutdownThresholdLow)" |
| 249 | ], |
| 250 | "display_ok": false |
| 251 | } |
| 252 | } |
| 253 | ], |
| 254 | "formatting": { |
| 255 | "custom_message_global": "All ISAM Boards are OK", |
| 256 | "separator": "-" |
| 257 | } |
| 258 | } |