zabbix_export: version: '6.0' date: '2021-11-21T21:46:40Z' groups: - uuid: 08bb16f49592497b8d95a506bd494910 name: LSI templates: - uuid: d454a5e3223f49c0afbc5fd0cbf80dc5 template: 'LSI JSON discovery' name: 'LSI JSON discovery' description: | ## Overview Description ----------- This template is for discovering and monitoring LSI (Avago, Broadcom) storage controllers by using json outputs of storcli tool. Now it works only with zabbix 4.2 Main features ------------- * Discovery of controllers, logical discs, physical discs, batteries (bbu an cv) without scripts on servers side (it uses parsing of json and java scripts on zabbix side) * Monitoring controllers, logical, physical discs, batteries * Useful with OS, where storcli works * Comfortable changing of time intervals by macroses. Notes ----- * Please follow link for the newest version and instruction < groups: - name: LSI items: - uuid: 9dcf54820a494f5dba774e6e1f1185f0 name: 'All bbus info' key: lsi.bbusinfo delay: '{$ADAP_REQUEST_PERIOD}' history: '{$INTERNAL_ITEMS_HISTORY_PEIOD}' trends: '0' value_type: TEXT tags: - tag: Application value: 'LSI Internal items' - uuid: ccf7f0adc8534db880ba053269582a4b name: 'All Ctls info' key: lsi.ctlsinfo delay: '{$ADAP_REQUEST_PERIOD}' history: '{$INTERNAL_ITEMS_HISTORY_PEIOD}' trends: '0' value_type: TEXT tags: - tag: Application value: 'LSI Internal items' - uuid: 9108817b676c48ecb5632eb37795e0de name: 'All cvs info' key: lsi.cvsinfo delay: '{$ADAP_REQUEST_PERIOD}' history: '{$INTERNAL_ITEMS_HISTORY_PEIOD}' trends: '0' value_type: TEXT tags: - tag: Application value: 'LSI Internal items' - uuid: 8a15dda6daa14db998b0d3f0f43c937a name: 'All Lds info' key: lsi.ldsinfo delay: '{$LD_REQUEST_PERIOD}' history: '{$INTERNAL_ITEMS_HISTORY_PEIOD}' trends: '0' value_type: TEXT tags: - tag: Application value: 'LSI Internal items' - uuid: 966b669f1ae143f49ed8bcb5b08e5a6e name: 'All Pds info' key: lsi.pdsinfo delay: '{$PD_REQUEST_PERIOD}' history: '{$INTERNAL_ITEMS_HISTORY_PEIOD}' trends: '0' value_type: TEXT tags: - tag: Application value: 'LSI Internal items' discovery_rules: - uuid: aeb98068bbaa40beac06b211e62cc22e name: 'Controllers discovery' key: lsi.ctllld delay: '{$ADAP_DISCOVERY_PERIOD}' item_prototypes: - uuid: 0fc5adbccc0940df84d2bc3027160207 name: 'Controller "{#CTLID}" cache bbu data' type: DEPENDENT key: 'lsi.ctl.bbu.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][{#CTLID}]' - type: CHECK_REGEX_ERROR parameters: - '("Status"\s:\s"Failure")' - \1 - type: JSONPATH parameters: - '$[''Response Data'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: lsi.bbusinfo tags: - tag: Application value: 'LSI Internal items' - uuid: 6e97c6fc50c84d1999236297a051d3fb name: 'Controller "{#CTLID}" bbu low charge level' type: DEPENDENT key: 'lsi.ctl.bbulowcharge.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''BBU_Firmware_Status''][10][''Value'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: 'lsi.ctl.bbu.["{#CTLID}"]' tags: - tag: Application value: 'LSI battery' trigger_prototypes: - uuid: 0e190168c099453cb0faa330b1262b2d expression: 'find(/LSI JSON discovery/lsi.ctl.bbulowcharge.["{#CTLID}"],,"like","No")=0 and length(last(/LSI JSON discovery/lsi.ctl.bbulowcharge.["{#CTLID}"]))>0' name: 'LSI controller {#CTLID} battery charge level is low' priority: AVERAGE manual_close: 'YES' - uuid: 4e4cf25e6dfb44d3ab1bf7b6592454e6 name: 'Controller "{#CTLID}" bbu need to replace' type: DEPENDENT key: 'lsi.ctl.bbureplace.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''BBU_Firmware_Status''][9][''Value'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: 'lsi.ctl.bbu.["{#CTLID}"]' tags: - tag: Application value: 'LSI battery' trigger_prototypes: - uuid: 23c659f44ea449dea1a91316010e9ce5 expression: '(find(/LSI JSON discovery/lsi.ctl.bbureplace.["{#CTLID}"],,"like","No")=0 and length(last(/LSI JSON discovery/lsi.ctl.bbureplace.["{#CTLID}"]))>0)' name: 'LSI controller {#CTLID} bbu battery is need to be replaced' priority: AVERAGE manual_close: 'YES' - uuid: 3a1b47d171c440b5a17be8ae87e03491 name: 'Controller "{#CTLID}" bbu serial number' type: DEPENDENT key: 'lsi.ctl.bbusn.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''BBU_Design_Info''][4][''Value'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: 'lsi.ctl.bbu.["{#CTLID}"]' tags: - tag: Application value: 'LSI battery' trigger_prototypes: - uuid: 1b280e16f43c4082bfa7b1d1a212e4a3 expression: '((last(/LSI JSON discovery/lsi.ctl.bbusn.["{#CTLID}"],#1)<>last(/LSI JSON discovery/lsi.ctl.bbusn.["{#CTLID}"],#2))=1 and length(last(/LSI JSON discovery/lsi.ctl.bbusn.["{#CTLID}"]))>0)' recovery_mode: NONE name: 'LSI controller {#CTLID} bbu battery was replaced' priority: INFO manual_close: 'YES' - uuid: e4290dffadf5442e838528bd7a1f166c name: 'Controller "{#CTLID}" bbu state' type: DEPENDENT key: 'lsi.ctl.bbustate.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''BBU_Info''][4][''Value'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: 'lsi.ctl.bbu.["{#CTLID}"]' tags: - tag: Application value: 'LSI battery' trigger_prototypes: - uuid: c050726925cf4776986a5dfa9265f65b expression: '(find(/LSI JSON discovery/lsi.ctl.bbustate.["{#CTLID}"],,"like","Optimal")=0 and length(last(/LSI JSON discovery/lsi.ctl.bbustate.["{#CTLID}"]))>0)' name: 'LSI controller {#CTLID} bbu battery state is {ITEM.LASTVALUE}' priority: AVERAGE manual_close: 'YES' - uuid: ee8a41fd328d4fc5960404d629bbe2a6 name: 'Controller "{#CTLID}" bbu type' type: DEPENDENT key: 'lsi.ctl.bbutype.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''BBU_Info''][0][''Value'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: 'lsi.ctl.bbu.["{#CTLID}"]' tags: - tag: Application value: 'LSI battery' - uuid: c88b74ed529e4955b2a76640738f7e58 name: 'Controller "{#CTLID}" cache vault data' type: DEPENDENT key: 'lsi.ctl.cvdata.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][{#CTLID}]' - type: CHECK_REGEX_ERROR parameters: - '("Status"\s:\s"Failure")' - \1 - type: JSONPATH parameters: - '$[''Response Data'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: lsi.cvsinfo tags: - tag: Application value: 'LSI Internal items' - uuid: 539fe69860ff4355976e68e48a1d0d09 name: 'Controller "{#CTLID}" cache vault need to replace' type: DEPENDENT key: 'lsi.ctl.cvreplace.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Firmware_Status''][0][''Value'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: 'lsi.ctl.cvdata.["{#CTLID}"]' tags: - tag: Application value: 'LSI battery' trigger_prototypes: - uuid: 97c98fe8ebef425996d29afd24e149c1 expression: '(find(/LSI JSON discovery/lsi.ctl.cvreplace.["{#CTLID}"],,"like","No")=0 and length(last(/LSI JSON discovery/lsi.ctl.cvreplace.["{#CTLID}"]))>0)' name: 'LSI controller {#CTLID} cachevault battery is need to be replaced' priority: AVERAGE manual_close: 'YES' - uuid: 610bc133a3bb45a7a5adb1736905d564 name: 'Controller "{#CTLID}" cache vault serial number' type: DEPENDENT key: 'lsi.ctl.cvsn.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Design_Info''][1][''Value'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: 'lsi.ctl.cvdata.["{#CTLID}"]' tags: - tag: Application value: 'LSI battery' trigger_prototypes: - uuid: 65bb75964cbd44ba94938ec3329ecdaa expression: '((last(/LSI JSON discovery/lsi.ctl.cvsn.["{#CTLID}"],#1)<>last(/LSI JSON discovery/lsi.ctl.cvsn.["{#CTLID}"],#2))=1 and length(last(/LSI JSON discovery/lsi.ctl.cvsn.["{#CTLID}"]))>0)' recovery_mode: NONE name: 'LSI controller {#CTLID} cachevault battery was replaced' priority: INFO manual_close: 'YES' - uuid: d842ab6d77cd411eb8cd6d7a5a89695d name: 'Controller "{#CTLID}" cache vault state' type: DEPENDENT key: 'lsi.ctl.cvstate.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Cachevault_Info''][2][''Value'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: 'lsi.ctl.cvdata.["{#CTLID}"]' tags: - tag: Application value: 'LSI battery' trigger_prototypes: - uuid: 1d36d7f834c44bf08bc163c4c3c7355a expression: '(find(/LSI JSON discovery/lsi.ctl.cvstate.["{#CTLID}"],,"like","Optimal")=0 and length(last(/LSI JSON discovery/lsi.ctl.cvstate.["{#CTLID}"]))>0)' name: 'LSI controller {#CTLID} cachevault battery state is {ITEM.LASTVALUE}' priority: AVERAGE manual_close: 'YES' - uuid: b439fc6bb99746e8b402278c64034231 name: 'Controller "{#CTLID}" cache vault type' type: DEPENDENT key: 'lsi.ctl.cvtype.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Cachevault_Info''][0][''Value'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: 'lsi.ctl.cvdata.["{#CTLID}"]' tags: - tag: Application value: 'LSI battery' - uuid: 7b585cb557ac43ae9e7e0481c8a3a832 name: 'Controller "{#CTLID}" model' type: DEPENDENT key: 'lsi.ctl.model.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][{#CTLID}][''Response Data''][''Basics''][''Model'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: lsi.ctlsinfo tags: - tag: Application value: 'LSI controllers' - uuid: 58c73dc87de045ae8ad5d5a1e9e5df2f name: 'Controller "{#CTLID}" serial number' type: DEPENDENT key: 'lsi.ctl.sn.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][{#CTLID}][''Response Data''][''Basics''][''Serial Number'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: lsi.ctlsinfo tags: - tag: Application value: 'LSI controllers' trigger_prototypes: - uuid: ca0b4328577e4c088316b43754630206 expression: '(last(/LSI JSON discovery/lsi.ctl.sn.["{#CTLID}"],#1)<>last(/LSI JSON discovery/lsi.ctl.sn.["{#CTLID}"],#2))=1 and length(last(/LSI JSON discovery/lsi.ctl.sn.["{#CTLID}"]))>0' recovery_mode: NONE name: 'LSI controller {#CTLID} was replaced' priority: INFO manual_close: 'YES' - uuid: dddbf7fbcc4c4e808015b7bf7762642d name: 'Controller "{#CTLID}" state (health)' type: DEPENDENT key: 'lsi.ctl.state.["{#CTLID}"]' delay: '0' history: '{$ADAP_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][{#CTLID}][''Response Data''][''Status''][''Controller Status'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' master_item: key: lsi.ctlsinfo tags: - tag: Application value: 'LSI controllers' trigger_prototypes: - uuid: b53dc70fafea45d399701803572454ab expression: 'find(/LSI JSON discovery/lsi.ctl.state.["{#CTLID}"],,"like","Opt")=0' recovery_mode: RECOVERY_EXPRESSION recovery_expression: 'find(/LSI JSON discovery/lsi.ctl.state.["{#CTLID}"],,"like","Opt")=1' name: 'LSI controller {#CTLID} status is {ITEM.LASTVALUE}' priority: HIGH tags: - tag: RAID_CTL_STATE value: '{ITEM.LASTVALUE}' lld_macro_paths: - lld_macro: '{#CTLID}' path: $.Ctl preprocessing: - type: CHECK_JSON_ERROR parameters: - '$[''Controllers''][0][''Command Status''][''Detailed Status''][0][''ErrMsg'']' - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''System Overview'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$ADAP_THROTTLING_HB_PERIOD}' - uuid: cb22efa4399f4888b037d59bd821a467 name: 'Logical disks discovery' key: lsi.ldlld delay: '{$LD_DISCOVERY_PERIOD}' item_prototypes: - uuid: d5a5f4d2f4774d2888a153cc38c09f76 name: 'Logical disk "{#LDNAME}" (id {#LDID}) level' type: DEPENDENT key: 'lsi.ld.level.["{#LDID}"]' delay: '0' history: '{$LD_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''{#LDID}''][0][''TYPE'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$LD_THROTTLING_HB_PERIOD}' master_item: key: lsi.ldsinfo tags: - tag: Application value: 'LSI Logical disks' - uuid: df804a1b0c7f4eedb6006d0d3d0e9377 name: 'Logical disk "{#LDNAME}" (id {#LDID}) state' type: DEPENDENT key: 'lsi.ld.state.["{#LDID}"]' delay: '0' history: '{$LD_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''{#LDID}''][0][''State'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$LD_THROTTLING_HB_PERIOD}' - type: JAVASCRIPT parameters: - | switch(value) { case 'Optl': value='Optimal'; break; case 'OfLn': value='Offline'; break; case 'Pdgd': value='Partially degraded'; break; case 'Dgrd': value='Degraded'; break; } return value master_item: key: lsi.ldsinfo tags: - tag: Application value: 'LSI Logical disks' trigger_prototypes: - uuid: cd2e0754e6ed4c0594b11938b2119fc4 expression: 'find(/LSI JSON discovery/lsi.ld.state.["{#LDID}"],,"like","Optimal")=0' recovery_mode: RECOVERY_EXPRESSION recovery_expression: 'find(/LSI JSON discovery/lsi.ld.state.["{#LDID}"],,"like","Optimal")=1' name: 'LSI logical disk "{#LDNAME}" ("{#LDID}") state is "{ITEM.LASTVALUE}"' priority: HIGH tags: - tag: 'LD STATE' value: '{ITEM.LASTVALUE}' lld_macro_paths: - lld_macro: '{#LDID}' path: $.LDID - lld_macro: '{#LDNAME}' path: $.Name preprocessing: - type: JAVASCRIPT parameters: - | var JsonValue = JSON.parse(value); var ResponseStatus=JsonValue.Controllers[0]['Command Status']['Status']; var TxtValue=''; if (ResponseStatus.match(/Success/g)) { var ResponseData = JsonValue.Controllers[0]['Response Data']; var NeedData = []; var i=0; for (var key in ResponseData) { if (key.match(/\/c\d{1,}\/v\d{1,}/g)) { JsonValue.Controllers[0]['Response Data'][key][0]['LDID'] = key; NeedData[i] = JsonValue.Controllers[0]['Response Data'][key][0]; i = i + 1; } } TxtValue = JSON.stringify(NeedData); } else { TxtValue = JsonValue.Controllers[0]['Command Status']['Description']; } return TxtValue - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$LD_THROTTLING_HB_PERIOD}' - uuid: 9f3602307c2f412a8c1325d428229c9d name: 'Physical disks discovery' key: lsi.pdlld delay: '{$PD_DISCOVERY_PERIOD}' item_prototypes: - uuid: 1d7f4c2a91604b678cc0bc408f6e843a name: 'Physical disk "{#PDID}" media error count' type: DEPENDENT key: 'lsi.pd.merrcount.["{#PDID}"]' delay: '0' history: '{$PD_HISTORY_PERIOD}' trends: '{$PD_TRENDS_PERIOD}' preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''Drive {#PDID} - Detailed Information''][''Drive {#PDID} State''][''Media Error Count'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$PD_THROTTLING_HB_PERIOD}' master_item: key: lsi.pdsinfo tags: - tag: Application value: 'LSI Physical disks' trigger_prototypes: - uuid: 508a4c0a1b2d43e98b3044a3aa050f8f expression: 'last(/LSI JSON discovery/lsi.pd.merrcount.["{#PDID}"])>0' recovery_mode: RECOVERY_EXPRESSION recovery_expression: 'last(/LSI JSON discovery/lsi.pd.merrcount.["{#PDID}"])=0' name: 'LSI physical disk "{#PDID}" media error count is "{ITEM.LASTVALUE}"' priority: AVERAGE manual_close: 'YES' - uuid: bd95a40b42514611a5b5701b6498e6dc name: 'Physical disk "{#PDID}" model' type: DEPENDENT key: 'lsi.pd.model.["{#PDID}"]' delay: '0' history: '{$PD_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''Drive {#PDID}''][0][''Model'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$PD_THROTTLING_HB_PERIOD}' master_item: key: lsi.pdsinfo tags: - tag: Application value: 'LSI Physical disks' - uuid: 86bf3765518b4133ae070f3a8f65eb16 name: 'Physical disk "{#PDID}" other error count' type: DEPENDENT key: 'lsi.pd.otherrcount.["{#PDID}"]' delay: '0' history: '{$PD_HISTORY_PERIOD}' trends: '{$PD_TRENDS_PERIOD}' preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''Drive {#PDID} - Detailed Information''][''Drive {#PDID} State''][''Other Error Count'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$PD_THROTTLING_HB_PERIOD}' master_item: key: lsi.pdsinfo tags: - tag: Application value: 'LSI Physical disks' - uuid: 5fea1e8c61aa4656b94015b5306b1ebb name: 'Physical disk "{#PDID}" predictive failure count' type: DEPENDENT key: 'lsi.pd.predicterrcount.["{#PDID}"]' delay: '0' history: '{$PD_HISTORY_PERIOD}' trends: '{$PD_TRENDS_PERIOD}' preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''Drive {#PDID} - Detailed Information''][''Drive {#PDID} State''][''Predictive Failure Count'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$PD_THROTTLING_HB_PERIOD}' master_item: key: lsi.pdsinfo tags: - tag: Application value: 'LSI Physical disks' trigger_prototypes: - uuid: 299fd03b1c3d4183a39b22c302e379d4 expression: 'last(/LSI JSON discovery/lsi.pd.predicterrcount.["{#PDID}"])>0' recovery_mode: RECOVERY_EXPRESSION recovery_expression: 'last(/LSI JSON discovery/lsi.pd.predicterrcount.["{#PDID}"])=0' name: 'LSI physical disk "{#PDID}" predictive failure count is "{ITEM.LASTVALUE}"' priority: WARNING manual_close: 'YES' - uuid: b42000746b5d4070bcbbbf756a31b3ca expression: 'last(/LSI JSON discovery/lsi.pd.predicterrcount.["{#PDID}"])>0 and (last(/LSI JSON discovery/lsi.pd.predicterrcount.["{#PDID}"],#1)<>last(/LSI JSON discovery/lsi.pd.predicterrcount.["{#PDID}"],#2))=1' recovery_mode: RECOVERY_EXPRESSION recovery_expression: 'last(/LSI JSON discovery/lsi.pd.predicterrcount.["{#PDID}"])=0' name: 'LSI physical disk "{#PDID}" predictive failure count is "{ITEM.LASTVALUE}". Growing up' priority: WARNING manual_close: 'YES' dependencies: - name: 'LSI physical disk "{#PDID}" predictive failure count is "{ITEM.LASTVALUE}"' expression: 'last(/LSI JSON discovery/lsi.pd.predicterrcount.["{#PDID}"])>0' recovery_expression: 'last(/LSI JSON discovery/lsi.pd.predicterrcount.["{#PDID}"])=0' - uuid: 4342d5a1f6394262b3ad1e22a51a17cc name: 'Physical disk "{#PDID}" SMART flag' type: DEPENDENT key: 'lsi.pd.smartflag.["{#PDID}"]' delay: '0' history: '{$PD_HISTORY_PERIOD}' trends: '0' value_type: CHAR preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''Drive {#PDID} - Detailed Information''][''Drive {#PDID} State''][''S.M.A.R.T alert flagged by drive'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$PD_THROTTLING_HB_PERIOD}' master_item: key: lsi.pdsinfo tags: - tag: Application value: 'LSI Physical disks' trigger_prototypes: - uuid: 9fb8f0166fec42f69db2fa549d5edab4 expression: 'find(/LSI JSON discovery/lsi.pd.smartflag.["{#PDID}"],,"like","Yes")=1' recovery_mode: RECOVERY_EXPRESSION recovery_expression: 'find(/LSI JSON discovery/lsi.pd.smartflag.["{#PDID}"],,"like","No")=1' name: 'LSI physical disk: SMART flag was raised up on "{#PDID}"' priority: AVERAGE manual_close: 'YES' tags: - tag: 'PD SMART' value: '{ITEM.LASTVALUE}' - uuid: a2765a9dbd794a1dbb2ad6455f42d945 name: 'Physical disk "{#PDID}" serial number' type: DEPENDENT key: 'lsi.pd.sn.["{#PDID}"]' delay: '0' history: '{$PD_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''Drive {#PDID} - Detailed Information''][''Drive {#PDID} Device attributes''][''SN'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$PD_THROTTLING_HB_PERIOD}' master_item: key: lsi.pdsinfo tags: - tag: Application value: 'LSI Physical disks' trigger_prototypes: - uuid: a8bb72205b9045c69bce5b25c53f90ef expression: '(last(/LSI JSON discovery/lsi.pd.sn.["{#PDID}"],#1)<>last(/LSI JSON discovery/lsi.pd.sn.["{#PDID}"],#2))=1 and length(last(/LSI JSON discovery/lsi.pd.sn.["{#PDID}"],#2))>0' recovery_mode: NONE name: 'LSI physical disk "{#PDID}" was replaced by sn "{ITEM.LASTVALUE1}". Previous sn: "{ITEM.LASTVALUE2}"' priority: INFO manual_close: 'YES' tags: - tag: 'PD REPLACE' value: '{ITEM.LASTVALUE1}' - uuid: 1491c317e8044f6ea472c22db3c1f71c name: 'Physical disk "{#PDID}" state' type: DEPENDENT key: 'lsi.pd.state.["{#PDID}"]' delay: '0' history: '{$PD_HISTORY_PERIOD}' trends: '0' value_type: TEXT preprocessing: - type: JSONPATH parameters: - '$[''Controllers''][0][''Response Data''][''Drive {#PDID}''][0][''State'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$PD_THROTTLING_HB_PERIOD}' - type: JAVASCRIPT parameters: - | switch(value) { case 'Onln': value='Online'; break; case 'Ugood': value='Unconfigured-Good'; break; case 'Ubad': value='Unconfigured-Bad'; break; case 'Msng': value='Missing'; break; case 'Offln': value='Offline'; break; case 'F': value='Foreign'; break; case 'GHS': value='Global Hot Spare'; break; case 'DHS': value='Dedicated Hot Spare'; break; case 'Rbld': value='Rebuild'; break; } return value master_item: key: lsi.pdsinfo tags: - tag: Application value: 'LSI Physical disks' trigger_prototypes: - uuid: 952a6ec919734de18187529888180467 expression: '(find(/LSI JSON discovery/lsi.pd.state.["{#PDID}"],,"like","Unconfigured-Bad")=1 or find(/LSI JSON discovery/lsi.pd.state.["{#PDID}"],,"like","Unconfigured-Good")=1 or find(/LSI JSON discovery/lsi.pd.state.["{#PDID}"],,"like","Missing")=1 or find(/LSI JSON discovery/lsi.pd.state.["{#PDID}"],,"like","Offline")=1 or find(/LSI JSON discovery/lsi.pd.state.["{#PDID}"],,"like","Foreign")=1) and (last(/LSI JSON discovery/lsi.pd.state.["{#PDID}"],#1)<>last(/LSI JSON discovery/lsi.pd.state.["{#PDID}"],#2))=1 and length(last(/LSI JSON discovery/lsi.pd.state.["{#PDID}"]))>0' recovery_mode: RECOVERY_EXPRESSION recovery_expression: 'find(/LSI JSON discovery/lsi.pd.state.["{#PDID}"],,"like","Unconfigured-Good")=1 or find(/LSI JSON discovery/lsi.pd.state.["{#PDID}"],,"like","Online")=1' name: 'LSI physical disk "{#PDID}" is "{ITEM.LASTVALUE}"' priority: HIGH manual_close: 'YES' tags: - tag: 'PD STATE' value: '{ITEM.LASTVALUE}' lld_macro_paths: - lld_macro: '{#PDID}' path: $.PDID preprocessing: - type: JAVASCRIPT parameters: - | var JsonValue = JSON.parse(value); var ResponseStatus=JsonValue.Controllers[0]['Command Status']['Status']; var TxtValue=''; if (ResponseStatus.match(/Success/g)) { var ResponseData = JsonValue.Controllers[0]['Response Data']; var NeedData = []; var i=0; for (var key in ResponseData) { var KeySplitted = key.split(' '); if (KeySplitted.length === 2) { JsonValue.Controllers[0]['Response Data'][key][0]['PDID'] = KeySplitted[1]; NeedData[i] = JsonValue.Controllers[0]['Response Data'][key][0]; i = i + 1; } } TxtValue = JSON.stringify(NeedData); } else{ TxtValue = JsonValue.Controllers[0]['Description']; } return TxtValue - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - '{$PD_THROTTLING_HB_PERIOD}' macros: - macro: '{$ADAP_THROTTLING_HB_PERIOD}' value: '10800' - macro: '{$INTERNAL_ITEMS_HISTORY_PEIOD}' value: '0' - macro: '{$LD_THROTTLING_HB_PERIOD}' value: '10800' - macro: '{$PD_THROTTLING_HB_PERIOD}' value: '10800'