diff options
Diffstat (limited to 'templates/module/smart_agent2_active/README.md')
-rw-r--r-- | templates/module/smart_agent2_active/README.md | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/templates/module/smart_agent2_active/README.md b/templates/module/smart_agent2_active/README.md index e4779190e12..8961223cf43 100644 --- a/templates/module/smart_agent2_active/README.md +++ b/templates/module/smart_agent2_active/README.md @@ -5,7 +5,7 @@ For Zabbix version: 5.4 and higher The template for monitoring S.M.A.R.T. attributes of physical disk that works without any external scripts. -It collects metrics by Zabbix agent active 2 version 5.0 and later with Smartmontools version 7.1 and later. +It collects metrics by Zabbix agent 2 version 5.0 and later with Smartmontools version 7.1 and later. Disk discovery LLD rule finds all HDD, SSD, NVMe disks with S.M.A.R.T. enabled. Attribute discovery LLD rule finds all Vendor Specific Attributes for each disk. If you want to skip some attributes, please set regular expressions with disk names in {$SMART.DISK.NAME.MATCHES} and with attribute IDs in {$SMART.ATTRIBUTE.ID.MATCHES} macros on the host level. @@ -13,7 +13,6 @@ and with attribute IDs in {$SMART.ATTRIBUTE.ID.MATCHES} macros on the host level This template was tested on: -- Zabbix, version 5.4 and later - Smartmontools, version 7.1 and later ## Setup @@ -44,8 +43,8 @@ There are no template links in this template. |Name|Description|Type|Key and additional info| |----|-----------|----|----| -|Disk discovery |<p>Discovery SMART disks.</p> |ZABBIX_ACTIVE |smart.disk.discovery | -|Attribute discovery |<p>Discovery SMART Vendor Specific Attributes of disks.</p> |ZABBIX_ACTIVE |smart.attribute.discovery | +|Disk discovery |<p>Discovery SMART disks.</p> |ZABBIX_ACTIVE |smart.disk.discovery<p>**Overrides:**</p><p>Self-test<br> - {#DISKTYPE} MATCHES_REGEX `nvme`<br> - ITEM_PROTOTYPE LIKE `Self-test` - NO_DISCOVER</p><p>Not NVMe<br> - {#DISKTYPE} NOT_MATCHES_REGEX `nvme`<br> - ITEM_PROTOTYPE REGEXP `Media|Percentage|Critical` - NO_DISCOVER</p> | +|Attribute discovery |<p>Discovery SMART Vendor Specific Attributes of disks.</p> |ZABBIX_ACTIVE |smart.attribute.discovery<p>**Overrides:**</p><p>ID filter<br> - {#ID} MATCHES_REGEX `{$SMART.ATTRIBUTE.ID.MATCHES}` - {#NAME} MATCHES_REGEX `{$SMART.DISK.NAME.MATCHES}`<br> - ITEM_PROTOTYPE REGEXP `` - NO_DISCOVER</p> | ## Items collected @@ -56,22 +55,23 @@ There are no template links in this template. |Zabbix_raw_items |SMART [{#NAME}]: Serial number |<p>-</p> |DEPENDENT |smart.disk.sn[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].serial_number.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | |Zabbix_raw_items |SMART [{#NAME}]: Self-test passed |<p>The disk is passed the SMART self-test or not.</p> |DEPENDENT |smart.disk.test[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].ata_smart_data.self_test.status.passed.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | |Zabbix_raw_items |SMART [{#NAME}]: Temperature |<p>Current drive temperature.</p> |DEPENDENT |smart.disk.temperature[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].temperature.current.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | -|Zabbix_raw_items |SMART [{#NAME}]: Power on hours |<p>Count of hours in power-on state. The raw value of this attribute shows total count of hours (or minutes, or seconds, depending on manufacturer) in power-on state. "By default, the total expected lifetime of a hard disk in perfect condition is defined as 5 years (running every day and night on all days). This is equal to 1825 days in 24/7 mode or 43800 hours." On some pre-2005 drives, this raw value may advance erratically and/or "wrap around" (reset to zero periodically). https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes</p> |DEPENDENT |smart.disk.hours[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].power_on_time.hours.first()`</p> | +|Zabbix_raw_items |SMART [{#NAME}]: Power on hours |<p>Count of hours in power-on state. The raw value of this attribute shows total count of hours (or minutes, or seconds, depending on manufacturer) in power-on state. "By default, the total expected lifetime of a hard disk in perfect condition is defined as 5 years (running every day and night on all days). This is equal to 1825 days in 24/7 mode or 43800 hours." On some pre-2005 drives, this raw value may advance erratically and/or "wrap around" (reset to zero periodically). https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes</p> |DEPENDENT |smart.disk.hours[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].power_on_time.hours.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | |Zabbix_raw_items |SMART [{#NAME}]: Percentage used |<p>Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer’s prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).</p> |DEPENDENT |smart.disk.percentage_used[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].nvme_smart_health_information_log.percentage_used.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | |Zabbix_raw_items |SMART [{#NAME}]: Critical warning |<p>This field indicates critical warnings for the state of the controller.</p> |DEPENDENT |smart.disk.critical_warning[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].nvme_smart_health_information_log.critical_warning.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | |Zabbix_raw_items |SMART [{#NAME}]: Media errors |<p>Contains the number of occurrences where the controller detected an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC checksum failure, or LBA tag mismatch are included in this field.</p> |DEPENDENT |smart.disk.media_errors[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].nvme_smart_health_information_log.media_errors.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | |Zabbix_raw_items |SMART [{#NAME}]: ID {#ID} {#ATTRNAME} |<p>-</p> |DEPENDENT |smart.disk.error[{#NAME},{#ID}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].ata_smart_attributes.table[?(@.id=={#ID})].value.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | +|Zabbix_raw_items |SMART [{#NAME}]: ID {#ID} {#ATTRNAME} raw value |<p>-</p> |DEPENDENT |smart.disk.attr.raw[{#NAME},{#ID}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].ata_smart_attributes.table[?(@.id=={#ID})].raw.string.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | ## Triggers |Name|Description|Expression|Severity|Dependencies and additional info| |----|-----------|----|----|----| -|SMART [{#NAME}]: Disk has been replaced (new serial number received) |<p>Device serial number has changed. Ack to close.</p> |`{TEMPLATE_NAME:smart.disk.sn[{#NAME}].diff()}=1 and {TEMPLATE_NAME:smart.disk.sn[{#NAME}].strlen()}>0` |INFO |<p>Manual close: YES</p> | -|SMART [{#NAME}]: Disk self-test is not passed | |`{TEMPLATE_NAME:smart.disk.test[{#NAME}].last()}="false"` |HIGH | | -|SMART [{#NAME}]: Average disk temperature is too high (over {$SMART.TEMPERATURE.MAX.WARN}°C for 5m) | |`{TEMPLATE_NAME:smart.disk.temperature[{#NAME}].avg(5m)}>{$SMART.TEMPERATURE.MAX.WARN}` |WARNING |<p>**Depends on**:</p><p>- SMART [{#NAME}]: Average disk temperature is critical (over {$SMART.TEMPERATURE.MAX.CRIT}°C for 5m)</p> | -|SMART [{#NAME}]: Average disk temperature is critical (over {$SMART.TEMPERATURE.MAX.CRIT}°C for 5m) | |`{TEMPLATE_NAME:smart.disk.temperature[{#NAME}].avg(5m)}>{$SMART.TEMPERATURE.MAX.CRIT}` |AVERAGE | | -|SMART [{#NAME}]: NVMe disk percentage using is over 90% of estimated endurance | |`{TEMPLATE_NAME:smart.disk.percentage_used[{#NAME}].last()}>90` |AVERAGE | | -|SMART [{#NAME}]: Attribute {#ID} {#ATTRNAME} is failed |<p>The value should be greater than THRESH.</p> |`{TEMPLATE_NAME:smart.disk.error[{#NAME},{#ID}].last()} <= {#THRESH}` |WARNING | | +|SMART [{#NAME}]: Disk has been replaced (new serial number received) |<p>Device serial number has changed. Ack to close.</p> |`last(/SMART by Zabbix agent active 2/smart.disk.sn[{#NAME}],#1)<>last(/SMART by Zabbix agent active 2/smart.disk.sn[{#NAME}],#2) and length(last(/SMART by Zabbix agent active 2/smart.disk.sn[{#NAME}]))>0` |INFO |<p>Manual close: YES</p> | +|SMART [{#NAME}]: Disk self-test is not passed |<p>-</p> |`last(/SMART by Zabbix agent active 2/smart.disk.test[{#NAME}])="false"` |HIGH | | +|SMART [{#NAME}]: Average disk temperature is too high (over {$SMART.TEMPERATURE.MAX.WARN}°C for 5m) |<p>-</p> |`avg(/SMART by Zabbix agent active 2/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.WARN}` |WARNING |<p>**Depends on**:</p><p>- SMART [{#NAME}]: Average disk temperature is critical (over {$SMART.TEMPERATURE.MAX.CRIT}°C for 5m)</p> | +|SMART [{#NAME}]: Average disk temperature is critical (over {$SMART.TEMPERATURE.MAX.CRIT}°C for 5m) |<p>-</p> |`avg(/SMART by Zabbix agent active 2/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.CRIT}` |AVERAGE | | +|SMART [{#NAME}]: NVMe disk percentage using is over 90% of estimated endurance |<p>-</p> |`last(/SMART by Zabbix agent active 2/smart.disk.percentage_used[{#NAME}])>90` |AVERAGE | | +|SMART [{#NAME}]: Attribute {#ID} {#ATTRNAME} is failed |<p>The value should be greater than THRESH.</p> |`last(/SMART by Zabbix agent active 2/smart.disk.error[{#NAME},{#ID}]) <= {#THRESH}` |WARNING | | ## Feedback |