Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Biba <andrew.biba@zabbix.com>2022-03-31 18:13:44 +0300
committerAndrew Biba <andrew.biba@zabbix.com>2022-03-31 18:13:44 +0300
commit0bd9b27984eec776924bd84fa1a01ff5facb2156 (patch)
tree03fd5f1d0147bc318c3f48fe4f778ea076ba9e8a /templates
parent4506ce66a3805e2a1ea352af5f332c27156036a8 (diff)
...G.....T [ZBXNEXT-7559] updated smart.disk.discovery, smart.disk.get metrics for Zabbix agent 2 and S.M.A.R.T passive and active templates
Diffstat (limited to 'templates')
-rw-r--r--templates/module/smart_agent2/README.md46
-rw-r--r--templates/module/smart_agent2/template_module_smart_agent2.yaml597
-rw-r--r--templates/module/smart_agent2_active/README.md46
-rw-r--r--templates/module/smart_agent2_active/template_module_smart_agent2_active.yaml600
4 files changed, 969 insertions, 320 deletions
diff --git a/templates/module/smart_agent2/README.md b/templates/module/smart_agent2/README.md
index f77dc0b12ef..96208355bf4 100644
--- a/templates/module/smart_agent2/README.md
+++ b/templates/module/smart_agent2/README.md
@@ -6,9 +6,8 @@
For Zabbix version: 6.2 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 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.
+Disk discovery LLD rule finds all HDD, SSD, NVMe disks with S.M.A.R.T. enabled. Attribute discovery LLD rule have pre-defined Vendor Specific Attributes
+for each disk, and will be discovered if attribute is present.
This template was tested on:
@@ -30,12 +29,8 @@ No specific Zabbix configuration is required.
|Name|Description|Default|
|----|-----------|-------|
-|{$SMART.ATTRIBUTE.ID.MATCHES} |<p>This macro is used in the filter of attribute discovery for filtering IDs. It can be overridden on the host or linked on the template level.</p> |`^.*$` |
-|{$SMART.ATTRIBUTE.ID.NOT_MATCHES} |<p>This macro is used in the filter of attribute discovery for filtering IDs. It can be overridden on the host or linked on the template level.</p> |`CHANGE_IF_NEEDED` |
|{$SMART.DISK.NAME.MATCHES} |<p>This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.</p> |`^.*$` |
|{$SMART.DISK.NAME.NOT_MATCHES} |<p>This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.</p> |`CHANGE_IF_NEEDED` |
-|{$SMART.RAW.ATTRIBUTE.ID.MATCHES} |<p>This macro is used for the creation of the integer items instead of the text ones and also triggers for some raw values.</p> |`^(?:5|187|188|196|197|198|199)$` |
-|{$SMART.RAW.ATTRIBUTE.MAX.CRIT} |<p>The threshold for raw values.</p> |`0` |
|{$SMART.TEMPERATURE.MAX.CRIT} |<p>This macro is used for trigger expression. It can be overridden on the host or linked on the template level.</p> |`65` |
|{$SMART.TEMPERATURE.MAX.WARN} |<p>This macro is used for trigger expression. It can be overridden on the host or linked on the template level.</p> |`50` |
@@ -47,25 +42,32 @@ There are no template links in this template.
|Name|Description|Type|Key and additional info|
|----|-----------|----|----|
-|Attribute discovery |<p>Discovery SMART Vendor Specific Attributes of disks.</p> |ZABBIX_PASSIVE |smart.attribute.discovery<p>**Filter**:</p>AND <p>- {#NAME} MATCHES_REGEX `{$SMART.DISK.NAME.MATCHES}`</p><p>- {#NAME} NOT_MATCHES_REGEX `{$SMART.DISK.NAME.NOT_MATCHES}`</p><p>- {#ID} MATCHES_REGEX `{$SMART.ATTRIBUTE.ID.MATCHES}`</p><p>- {#ID} NOT_MATCHES_REGEX `{$SMART.ATTRIBUTE.ID.NOT_MATCHES}`</p><p>**Overrides:**</p><p>ID filter for Raw trigger<br> - {#ID} NOT_MATCHES_REGEX `{$SMART.RAW.ATTRIBUTE.ID.MATCHES}`<br> - TRIGGER_PROTOTYPE LIKE `Attribute raw value` - NO_DISCOVER</p> |
-|Disk discovery |<p>Discovery SMART disks.</p> |ZABBIX_PASSIVE |smart.disk.discovery<p>**Filter**:</p>AND <p>- {#NAME} MATCHES_REGEX `{$SMART.DISK.NAME.MATCHES}`</p><p>- {#NAME} NOT_MATCHES_REGEX `{$SMART.DISK.NAME.NOT_MATCHES}`</p><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> |
+|Disk discovery |<p>Discovery SMART disks.</p> |ZABBIX_PASSIVE |smart.disk.discovery<p>**Filter**:</p>AND <p>- {#NAME} MATCHES_REGEX `{$SMART.DISK.NAME.MATCHES}`</p><p>- {#NAME} NOT_MATCHES_REGEX `{$SMART.DISK.NAME.NOT_MATCHES}`</p><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><p>Raw_Read_Error_Rate<br> - {#ATTRIBUTES} MATCHES_REGEX `Raw_Read_Error_Rate`<br> - ITEM_PROTOTYPE REGEXP `Raw_Read_Error_Rate` - DISCOVER</p><p>Spin_Up_Time<br> - {#ATTRIBUTES} MATCHES_REGEX `Spin_Up_Time`<br> - ITEM_PROTOTYPE REGEXP `Spin_Up_Time` - DISCOVER</p><p>Start_Stop_Count<br> - {#ATTRIBUTES} MATCHES_REGEX `Start_Stop_Count`<br> - ITEM_PROTOTYPE REGEXP `Start_Stop_Count` - DISCOVER</p><p>Power_Cycle_Count<br> - {#ATTRIBUTES} MATCHES_REGEX `Power_Cycle_Count`<br> - ITEM_PROTOTYPE REGEXP `Power_Cycle_Count` - DISCOVER</p><p>Reported_Uncorrect<br> - {#ATTRIBUTES} MATCHES_REGEX `Reported_Uncorrect`<br> - ITEM_PROTOTYPE REGEXP `Reported_Uncorrect` - DISCOVER</p><p>Seek_Error_Rate<br> - {#ATTRIBUTES} MATCHES_REGEX `Seek_Error_Rate`<br> - ITEM_PROTOTYPE REGEXP `Seek_Error_Rate` - DISCOVER</p><p>Bad_Block_Rate<br> - {#ATTRIBUTES} MATCHES_REGEX `Bad_Block_Rate`<br> - ITEM_PROTOTYPE REGEXP `Bad_Block_Rate` - DISCOVER</p><p>Program_Fail_Count_Chip<br> - {#ATTRIBUTES} MATCHES_REGEX `Program_Fail_Count_Chip`<br> - ITEM_PROTOTYPE REGEXP `Program_Fail_Count_Chip` - DISCOVER</p><p>Reallocated_Sector_Ct<br> - {#ATTRIBUTES} MATCHES_REGEX `Reallocated_Sector_Ct`<br> - ITEM_PROTOTYPE REGEXP `Reallocated_Sector_Ct` - DISCOVER</p> |
## Items collected
|Group|Name|Description|Type|Key and additional info|
|-----|----|-----------|----|---------------------|
-|Zabbix raw items |SMART: Get attributes |<p>-</p> |ZABBIX_PASSIVE |smart.disk.get |
-|Zabbix raw items |SMART [{#NAME}]: Device model |<p>-</p> |DEPENDENT |smart.disk.model[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].model_name.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
-|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><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}]: Exit status |<p>The exit statuses of smartctl are defined by a bitmask but in decimal value. The eight different bits in the exit status have the following meanings for ATA disks; some of these values may also be returned for SCSI disks.</p><p>Bit 0: Command line did not parse.</p><p>Bit 1: Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode (see '-n' option above).</p><p>Bit 2: Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure (see '-b' option above).</p><p>Bit 3: SMART status check returned "DISK FAILING".</p><p>Bit 4: We found prefail Attributes <= threshold.</p><p>Bit 5: SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.</p><p>Bit 6: The device error log contains records of errors.</p><p>Bit 7: The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.</p> |DEPENDENT |smart.disk.es[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].smartctl.exit_status.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> |
+|Zabbix raw items |SMART [{#NAME}]: Smartctl error |<p>This metric will contain smartctl errors.</p> |DEPENDENT |smart.disk.error[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.error`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Get disk attributes |<p>-</p> |ZABBIX_PASSIVE |smart.disk.get[{#PATH},"{#RAIDTYPE}"] |
+|Zabbix raw items |SMART [{#NAME}]: Device model |<p>-</p> |DEPENDENT |smart.disk.model[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.model_name`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Serial number |<p>-</p> |DEPENDENT |smart.disk.sn[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.serial_number`</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: `$.self_test_passed`</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: `$.temperature`</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: `$.power_on_time`</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: `$.percentage_used`</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: `$.critical_warning`</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: `$.media_errors`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Exit status |<p>The exit statuses of smartctl are defined by a bitmask but in decimal value. The eight different bits in the exit status have the following meanings for ATA disks; some of these values may also be returned for SCSI disks.</p><p>Bit 0: Command line did not parse.</p><p>Bit 1: Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode (see '-n' option above).</p><p>Bit 2: Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure (see '-b' option above).</p><p>Bit 3: SMART status check returned "DISK FAILING".</p><p>Bit 4: We found prefail Attributes <= threshold.</p><p>Bit 5: SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.</p><p>Bit 6: The device error log contains records of errors.</p><p>Bit 7: The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.</p> |DEPENDENT |smart.disk.es[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.exit_status`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Raw_Read_Error_Rate |<p>Stores data related to the rate of hardware read errors that occurred when reading data from a disk surface. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.</p> |DEPENDENT |smart.disk.attribute.raw_read_error_rate[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.raw_read_error_rate.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Spin_Up_Time |<p>Average time of spindle spin up (from zero RPM to fully operational [milliseconds]).</p> |DEPENDENT |smart.disk.attribute.spin_up_time[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.spin_up_time.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Start_Stop_Count |<p>A tally of spindle start/stop cycles. The spindle turns on, and hence the count is increased, both when the hard disk is turned on after having before been turned entirely off (disconnected from power source) and when the hard disk returns from having previously been put to sleep mode.</p> |DEPENDENT |smart.disk.attribute.start_stop_count[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.start_stop_count.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Power_Cycle_Count |<p>This attribute indicates the count of full hard disk power on/off cycles.</p> |DEPENDENT |smart.disk.attribute.power_cycle_count[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.power_cycle_count.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Reported_Uncorrect |<p>The count of errors that could not be recovered using hardware ECC.</p> |DEPENDENT |smart.disk.attribute.reported_uncorrect[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.reported_uncorrect.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Seek_Error_Rate |<p>Rate of seek errors of the magnetic heads. If there is a partial failure in the mechanical positioning system, then seek errors will arise. Such a failure may be due to numerous factors, such as damage to a servo, or thermal widening of the hard disk. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.</p> |DEPENDENT |smart.disk.attribute.seek_error_rate[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.seek_error_rate.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Bad_Block_Rate |<p>Percentage of used reserve blocks divided by total reserve blocks.</p> |DEPENDENT |smart.disk.attribute.bad_block_rate[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.bad_block_rate.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Program_Fail_Count_Chip |<p>The total number of flash program operation failures since the drive was deployed.</p> |DEPENDENT |smart.disk.attribute.program_fail_count_chip[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.program_fail_count_chip.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Reallocated_Sector_Ct |<p>Disk discovered attribute.</p> |DEPENDENT |smart.disk.attribute.reallocated_sector_ct[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.reallocated_sector_ct.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
## Triggers
@@ -84,8 +86,6 @@ There are no template links in this template.
|SMART [{#NAME}]: Some Attributes have been <= threshold |<p>SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.</p> |`( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),32) = 32 ) or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),32) = 32 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),32) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),32) )` |HIGH |<p>Manual close: YES</p> |
|SMART [{#NAME}]: Error log contains records |<p>The device error log contains records of errors.</p> |`( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),64) = 64 ) or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),64) = 64 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),64) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),64) )` |HIGH |<p>Manual close: YES</p> |
|SMART [{#NAME}]: Self-test log contains records |<p>The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.</p> |`( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),128) = 128 ) or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),128) = 128 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),128) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),128) )` |HIGH |<p>Manual close: YES</p> |
-|SMART [{#NAME}]: Attribute {#ID} {#ATTRNAME} is failed |<p>The value should be greater than THRESH.</p> |`last(/SMART by Zabbix agent 2/smart.disk.error[{#NAME},{#ID}]) <= {#THRESH}` |WARNING | |
-|SMART [{#NAME}]: Attribute raw value {#ID} {#ATTRNAME} is greater than {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} |<p>The value should not be more {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"}</p> |`( count(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}],#2) = 1 and last(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}]) > {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} ) or ( last(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}]) > {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} and last(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}]) > last(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}],#2) )` |AVERAGE |<p>Manual close: YES</p> |
## Feedback
diff --git a/templates/module/smart_agent2/template_module_smart_agent2.yaml b/templates/module/smart_agent2/template_module_smart_agent2.yaml
index 14b3d1d88be..fa3f1350ef0 100644
--- a/templates/module/smart_agent2/template_module_smart_agent2.yaml
+++ b/templates/module/smart_agent2/template_module_smart_agent2.yaml
@@ -1,6 +1,6 @@
zabbix_export:
version: '6.0'
- date: '2022-02-13T07:13:24Z'
+ date: '2022-03-29T17:42:43Z'
groups:
-
uuid: 57b7ae836ca64446ba2c296389c009b7
@@ -11,7 +11,7 @@ zabbix_export:
template: 'SMART by Zabbix agent 2'
name: 'SMART by Zabbix agent 2'
description: |
- 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 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.
+ 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 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 have pre-defined Vendor Specific Attributes for each disk, and will be discovered if attribute is present.
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/415662-discussion-thread-for-official-zabbix-smart-disk-monitoring
@@ -19,26 +19,11 @@ zabbix_export:
groups:
-
name: Templates/Modules
- items:
- -
- uuid: 2e5275a0b4174632ace850cdf6586cb9
- name: 'SMART: Get attributes'
- key: smart.disk.get
- history: '0'
- trends: '0'
- value_type: TEXT
- tags:
- -
- tag: component
- value: raw
- -
- tag: component
- value: storage
discovery_rules:
-
- uuid: c5aede547c19434c90f72e43276fe1d7
- name: 'Attribute discovery'
- key: smart.attribute.discovery
+ uuid: 4575af2717ec4bf78645edb84a966c84
+ name: 'Disk discovery'
+ key: smart.disk.discovery
delay: 1h
filter:
evaltype: AND
@@ -46,46 +31,40 @@ zabbix_export:
-
macro: '{#NAME}'
value: '{$SMART.DISK.NAME.MATCHES}'
- formulaid: C
+ formulaid: A
-
macro: '{#NAME}'
value: '{$SMART.DISK.NAME.NOT_MATCHES}'
operator: NOT_MATCHES_REGEX
- formulaid: D
- -
- macro: '{#ID}'
- value: '{$SMART.ATTRIBUTE.ID.MATCHES}'
- formulaid: A
- -
- macro: '{#ID}'
- value: '{$SMART.ATTRIBUTE.ID.NOT_MATCHES}'
- operator: NOT_MATCHES_REGEX
formulaid: B
- description: 'Discovery SMART Vendor Specific Attributes of disks.'
+ description: 'Discovery SMART disks.'
item_prototypes:
-
- uuid: 04718ade5247478da0450f1cd497b782
- name: 'SMART [{#NAME}]: ID {#ID} {#ATTRNAME} raw value'
+ uuid: 643de316ae644f6d8fd92d1f03ae0360
+ name: 'SMART [{#NAME}]: Bad_Block_Rate'
type: DEPENDENT
- key: 'smart.disk.attr.raw[{#NAME},{#ID}]'
+ key: 'smart.disk.attribute.bad_block_rate[{#NAME}]'
delay: '0'
history: 7d
- trends: '0'
- value_type: CHAR
+ discover: NO_DISCOVER
+ description: 'Percentage of used reserve blocks divided by total reserve blocks.'
preprocessing:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].ata_smart_attributes.table[?(@.id=={#ID})].raw.string.first()'
+ - $.bad_block_rate.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
+ value: attribute
+ -
+ tag: component
value: storage
-
tag: diskname
@@ -93,42 +72,65 @@ zabbix_export:
-
tag: disktype
value: '{#DISKTYPE}'
- trigger_prototypes:
+ -
+ uuid: 2a055383835247bc83745c84fdc5dea9
+ name: 'SMART [{#NAME}]: Power_Cycle_Count'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.power_cycle_count[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'This attribute indicates the count of full hard disk power on/off cycles.'
+ preprocessing:
-
- uuid: b2cbd7450bdd48bf845136c5a0d63c5f
- expression: |
- ( count(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}],#2) = 1 and last(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}]) > {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} )
- or ( last(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}]) > {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} and last(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}]) > last(/SMART by Zabbix agent 2/smart.disk.attr.raw[{#NAME},{#ID}],#2) )
- recovery_mode: NONE
- name: 'SMART [{#NAME}]: Attribute raw value {#ID} {#ATTRNAME} is greater than {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"}'
- priority: AVERAGE
- description: 'The value should not be more {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"}'
- manual_close: 'YES'
- tags:
- -
- tag: scope
- value: notice
+ type: JSONPATH
+ parameters:
+ - $.power_cycle_count.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
-
- uuid: 2af3d630a99a4989b94e2afd782a3f78
- name: 'SMART [{#NAME}]: ID {#ID} {#ATTRNAME}'
+ uuid: e1fbae7fe66c453997d9aa6e6eb3b5cb
+ name: 'SMART [{#NAME}]: Program_Fail_Count_Chip'
type: DEPENDENT
- key: 'smart.disk.error[{#NAME},{#ID}]'
+ key: 'smart.disk.attribute.program_fail_count_chip[{#NAME}]'
delay: '0'
history: 7d
+ discover: NO_DISCOVER
+ description: 'The total number of flash program operation failures since the drive was deployed.'
preprocessing:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].ata_smart_attributes.table[?(@.id=={#ID})].value.first()'
+ - $.program_fail_count_chip.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
+ value: attribute
+ -
+ tag: component
value: storage
-
tag: diskname
@@ -136,54 +138,204 @@ zabbix_export:
-
tag: disktype
value: '{#DISKTYPE}'
- trigger_prototypes:
+ -
+ uuid: abb098035cbd4c5b9e2d15c1e95d8e34
+ name: 'SMART [{#NAME}]: Raw_Read_Error_Rate'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.raw_read_error_rate[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'Stores data related to the rate of hardware read errors that occurred when reading data from a disk surface. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
+ preprocessing:
-
- uuid: 686066892ab94b86a97ba1902d361f97
- expression: 'last(/SMART by Zabbix agent 2/smart.disk.error[{#NAME},{#ID}]) <= {#THRESH}'
- name: 'SMART [{#NAME}]: Attribute {#ID} {#ATTRNAME} is failed'
- priority: WARNING
- description: 'The value should be greater than THRESH.'
- tags:
- -
- tag: scope
- value: notice
- overrides:
+ type: JSONPATH
+ parameters:
+ - $.raw_read_error_rate.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
-
- name: 'ID filter for Raw trigger'
- step: '1'
- filter:
- conditions:
- -
- macro: '{#ID}'
- value: '{$SMART.RAW.ATTRIBUTE.ID.MATCHES}'
- operator: NOT_MATCHES_REGEX
- formulaid: A
- operations:
+ uuid: 5601bfa6a38940b6b8d695bf029f534c
+ name: 'SMART [{#NAME}]: Reallocated_Sector_Ct'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.reallocated_sector_ct[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'Disk discovered attribute.'
+ preprocessing:
-
- operationobject: TRIGGER_PROTOTYPE
- operator: LIKE
- value: 'Attribute raw value'
- status: ENABLED
- discover: NO_DISCOVER
- -
- uuid: 4575af2717ec4bf78645edb84a966c84
- name: 'Disk discovery'
- key: smart.disk.discovery
- delay: 1h
- filter:
- evaltype: AND
- conditions:
- -
- macro: '{#NAME}'
- value: '{$SMART.DISK.NAME.MATCHES}'
- formulaid: A
- -
- macro: '{#NAME}'
- value: '{$SMART.DISK.NAME.NOT_MATCHES}'
- operator: NOT_MATCHES_REGEX
- formulaid: B
- description: 'Discovery SMART disks.'
- item_prototypes:
+ type: JSONPATH
+ parameters:
+ - $.reallocated_sector_ct.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: f538f4708280451eb30d20433d133012
+ name: 'SMART [{#NAME}]: Reported_Uncorrect'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.reported_uncorrect[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'The count of errors that could not be recovered using hardware ECC.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.reported_uncorrect.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: 70ac7d6cdf29431cacf02fc716c8ab0c
+ name: 'SMART [{#NAME}]: Seek_Error_Rate'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.seek_error_rate[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'Rate of seek errors of the magnetic heads. If there is a partial failure in the mechanical positioning system, then seek errors will arise. Such a failure may be due to numerous factors, such as damage to a servo, or thermal widening of the hard disk. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.seek_error_rate.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: 6e08c65d77ca4155b396c9615b2f45b3
+ name: 'SMART [{#NAME}]: Spin_Up_Time'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.spin_up_time[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'Average time of spindle spin up (from zero RPM to fully operational [milliseconds]).'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.spin_up_time.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: e428eb3368e94dbc955f2bebf8feb202
+ name: 'SMART [{#NAME}]: Start_Stop_Count'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.start_stop_count[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'A tally of spindle start/stop cycles. The spindle turns on, and hence the count is increased, both when the hard disk is turned on after having before been turned entirely off (disconnected from power source) and when the hard disk returns from having previously been put to sleep mode.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.start_stop_count.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
-
uuid: c186f7ce1b8d4311997c84fd5c239819
name: 'SMART [{#NAME}]: Critical warning'
@@ -196,13 +348,44 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].nvme_smart_health_information_log.critical_warning.first()'
+ - $.critical_warning
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: 72f16a701cee4119b0b1865671fd448d
+ name: 'SMART [{#NAME}]: Smartctl error'
+ type: DEPENDENT
+ key: 'smart.disk.error[{#NAME}]'
+ delay: '0'
+ history: 7d
+ trends: '0'
+ value_type: TEXT
+ description: 'This metric will contain smartctl errors.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.error
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 1h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -234,13 +417,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].smartctl.exit_status.first()'
+ - $.exit_status
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -373,6 +556,20 @@ zabbix_export:
tag: scope
value: notice
-
+ uuid: 805e1d6f91e741ac93e87bd7d62860d5
+ name: 'SMART [{#NAME}]: Get disk attributes'
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ history: '0'
+ trends: '0'
+ value_type: TEXT
+ tags:
+ -
+ tag: component
+ value: raw
+ -
+ tag: component
+ value: storage
+ -
uuid: 365f9642f2764116923bb3e014eefa22
name: 'SMART [{#NAME}]: Power on hours'
type: DEPENDENT
@@ -384,13 +581,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].power_on_time.hours.first()'
+ - $.power_on_time
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -413,13 +610,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].nvme_smart_health_information_log.media_errors.first()'
+ - $.media_errors
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -443,13 +640,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].model_name.first()'
+ - $.model_name
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -473,13 +670,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].nvme_smart_health_information_log.percentage_used.first()'
+ - $.percentage_used
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -513,13 +710,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].serial_number.first()'
+ - $.serial_number
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -555,13 +752,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].temperature.current.first()'
+ - $.temperature
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -609,13 +806,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].ata_smart_data.self_test.status.passed.first()'
+ - $.self_test_passed
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -638,6 +835,22 @@ zabbix_export:
value: notice
overrides:
-
+ name: Bad_Block_Rate
+ step: '9'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Bad_Block_Rate
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Bad_Block_Rate
+ status: ENABLED
+ discover: DISCOVER
+ -
name: 'Not NVMe'
step: '2'
filter:
@@ -655,6 +868,102 @@ zabbix_export:
status: ENABLED
discover: NO_DISCOVER
-
+ name: Power_Cycle_Count
+ step: '6'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Power_Cycle_Count
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Power_Cycle_Count
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Program_Fail_Count_Chip
+ step: '10'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Program_Fail_Count_Chip
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Program_Fail_Count_Chip
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Raw_Read_Error_Rate
+ step: '3'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Raw_Read_Error_Rate
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Raw_Read_Error_Rate
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Reallocated_Sector_Ct
+ step: '11'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Reallocated_Sector_Ct
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Reallocated_Sector_Ct
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Reported_Uncorrect
+ step: '7'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Reported_Uncorrect
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Reported_Uncorrect
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Seek_Error_Rate
+ step: '8'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Seek_Error_Rate
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Seek_Error_Rate
+ status: ENABLED
+ discover: DISCOVER
+ -
name: Self-test
step: '1'
filter:
@@ -670,16 +979,40 @@ zabbix_export:
value: Self-test
status: ENABLED
discover: NO_DISCOVER
+ -
+ name: Spin_Up_Time
+ step: '4'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Spin_Up_Time
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Spin_Up_Time
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Start_Stop_Count
+ step: '5'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Start_Stop_Count
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Start_Stop_Count
+ status: ENABLED
+ discover: DISCOVER
macros:
-
- macro: '{$SMART.ATTRIBUTE.ID.MATCHES}'
- value: '^.*$'
- description: 'This macro is used in the filter of attribute discovery for filtering IDs. It can be overridden on the host or linked on the template level.'
- -
- macro: '{$SMART.ATTRIBUTE.ID.NOT_MATCHES}'
- value: CHANGE_IF_NEEDED
- description: 'This macro is used in the filter of attribute discovery for filtering IDs. It can be overridden on the host or linked on the template level.'
- -
macro: '{$SMART.DISK.NAME.MATCHES}'
value: '^.*$'
description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
@@ -688,14 +1021,6 @@ zabbix_export:
value: CHANGE_IF_NEEDED
description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
-
- macro: '{$SMART.RAW.ATTRIBUTE.ID.MATCHES}'
- value: '^(?:5|187|188|196|197|198|199)$'
- description: 'This macro is used for the creation of the integer items instead of the text ones and also triggers for some raw values.'
- -
- macro: '{$SMART.RAW.ATTRIBUTE.MAX.CRIT}'
- value: '0'
- description: 'The threshold for raw values.'
- -
macro: '{$SMART.TEMPERATURE.MAX.CRIT}'
value: '65'
description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
diff --git a/templates/module/smart_agent2_active/README.md b/templates/module/smart_agent2_active/README.md
index d53acde1ef3..17a40ae9053 100644
--- a/templates/module/smart_agent2_active/README.md
+++ b/templates/module/smart_agent2_active/README.md
@@ -6,9 +6,8 @@
For Zabbix version: 6.2 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 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.
+Disk discovery LLD rule finds all HDD, SSD, NVMe disks with S.M.A.R.T. enabled. Attribute discovery LLD rule have pre-defined Vendor Specific Attributes
+for each disk, and will be discovered if attribute is present.
This template was tested on:
@@ -30,12 +29,8 @@ No specific Zabbix configuration is required.
|Name|Description|Default|
|----|-----------|-------|
-|{$SMART.ATTRIBUTE.ID.MATCHES} |<p>This macro is used in the filter of attribute discovery for filtering IDs. It can be overridden on the host or linked on the template level.</p> |`^.*$` |
-|{$SMART.ATTRIBUTE.ID.NOT_MATCHES} |<p>This macro is used in the filter of attribute discovery for filtering IDs. It can be overridden on the host or linked on the template level.</p> |`CHANGE_IF_NEEDED` |
|{$SMART.DISK.NAME.MATCHES} |<p>This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.</p> |`^.*$` |
|{$SMART.DISK.NAME.NOT_MATCHES} |<p>This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.</p> |`CHANGE_IF_NEEDED` |
-|{$SMART.RAW.ATTRIBUTE.ID.MATCHES} |<p>This macro is used for the creation of the integer items instead of the text ones and also triggers for some raw values.</p> |`^(?:5|187|188|196|197|198|199)$` |
-|{$SMART.RAW.ATTRIBUTE.MAX.CRIT} |<p>The threshold for raw values.</p> |`0` |
|{$SMART.TEMPERATURE.MAX.CRIT} |<p>This macro is used for trigger expression. It can be overridden on the host or linked on the template level.</p> |`65` |
|{$SMART.TEMPERATURE.MAX.WARN} |<p>This macro is used for trigger expression. It can be overridden on the host or linked on the template level.</p> |`50` |
@@ -47,25 +42,32 @@ There are no template links in this template.
|Name|Description|Type|Key and additional info|
|----|-----------|----|----|
-|Attribute discovery |<p>Discovery SMART Vendor Specific Attributes of disks.</p> |ZABBIX_ACTIVE |smart.attribute.discovery<p>**Filter**:</p>AND <p>- {#NAME} MATCHES_REGEX `{$SMART.DISK.NAME.MATCHES}`</p><p>- {#NAME} NOT_MATCHES_REGEX `{$SMART.DISK.NAME.NOT_MATCHES}`</p><p>- {#ID} MATCHES_REGEX `{$SMART.ATTRIBUTE.ID.MATCHES}`</p><p>- {#ID} NOT_MATCHES_REGEX `{$SMART.ATTRIBUTE.ID.NOT_MATCHES}`</p><p>**Overrides:**</p><p>ID filter for Raw trigger<br> - {#ID} NOT_MATCHES_REGEX `{$SMART.RAW.ATTRIBUTE.ID.MATCHES}`<br> - TRIGGER_PROTOTYPE LIKE `Attribute raw value` - NO_DISCOVER</p> |
-|Disk discovery |<p>Discovery SMART disks.</p> |ZABBIX_ACTIVE |smart.disk.discovery<p>**Filter**:</p>AND <p>- {#NAME} MATCHES_REGEX `{$SMART.DISK.NAME.MATCHES}`</p><p>- {#NAME} NOT_MATCHES_REGEX `{$SMART.DISK.NAME.NOT_MATCHES}`</p><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> |
+|Disk discovery |<p>Discovery SMART disks.</p> |ZABBIX_ACTIVE |smart.disk.discovery<p>**Filter**:</p>AND <p>- {#NAME} MATCHES_REGEX `{$SMART.DISK.NAME.MATCHES}`</p><p>- {#NAME} NOT_MATCHES_REGEX `{$SMART.DISK.NAME.NOT_MATCHES}`</p><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><p>Raw_Read_Error_Rate<br> - {#ATTRIBUTES} MATCHES_REGEX `Raw_Read_Error_Rate`<br> - ITEM_PROTOTYPE REGEXP `Raw_Read_Error_Rate` - DISCOVER</p><p>Spin_Up_Time<br> - {#ATTRIBUTES} MATCHES_REGEX `Spin_Up_Time`<br> - ITEM_PROTOTYPE REGEXP `Spin_Up_Time` - DISCOVER</p><p>Start_Stop_Count<br> - {#ATTRIBUTES} MATCHES_REGEX `Start_Stop_Count`<br> - ITEM_PROTOTYPE REGEXP `Start_Stop_Count` - DISCOVER</p><p>Power_Cycle_Count<br> - {#ATTRIBUTES} MATCHES_REGEX `Power_Cycle_Count`<br> - ITEM_PROTOTYPE REGEXP `Power_Cycle_Count` - DISCOVER</p><p>Reported_Uncorrect<br> - {#ATTRIBUTES} MATCHES_REGEX `Reported_Uncorrect`<br> - ITEM_PROTOTYPE REGEXP `Reported_Uncorrect` - DISCOVER</p><p>Seek_Error_Rate<br> - {#ATTRIBUTES} MATCHES_REGEX `Seek_Error_Rate`<br> - ITEM_PROTOTYPE REGEXP `Seek_Error_Rate` - DISCOVER</p><p>Bad_Block_Rate<br> - {#ATTRIBUTES} MATCHES_REGEX `Bad_Block_Rate`<br> - ITEM_PROTOTYPE REGEXP `Bad_Block_Rate` - DISCOVER</p><p>Program_Fail_Count_Chip<br> - {#ATTRIBUTES} MATCHES_REGEX `Program_Fail_Count_Chip`<br> - ITEM_PROTOTYPE REGEXP `Program_Fail_Count_Chip` - DISCOVER</p><p>Reallocated_Sector_Ct<br> - {#ATTRIBUTES} MATCHES_REGEX `Reallocated_Sector_Ct`<br> - ITEM_PROTOTYPE REGEXP `Reallocated_Sector_Ct` - DISCOVER</p> |
## Items collected
|Group|Name|Description|Type|Key and additional info|
|-----|----|-----------|----|---------------------|
-|Zabbix raw items |SMART: Get attributes |<p>-</p> |ZABBIX_ACTIVE |smart.disk.get |
-|Zabbix raw items |SMART [{#NAME}]: Device model |<p>-</p> |DEPENDENT |smart.disk.model[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].model_name.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
-|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><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}]: Exit status |<p>The exit statuses of smartctl are defined by a bitmask but in decimal value. The eight different bits in the exit status have the following meanings for ATA disks; some of these values may also be returned for SCSI disks.</p><p>Bit 0: Command line did not parse.</p><p>Bit 1: Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode (see '-n' option above).</p><p>Bit 2: Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure (see '-b' option above).</p><p>Bit 3: SMART status check returned "DISK FAILING".</p><p>Bit 4: We found prefail Attributes <= threshold.</p><p>Bit 5: SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.</p><p>Bit 6: The device error log contains records of errors.</p><p>Bit 7: The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.</p> |DEPENDENT |smart.disk.es[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.disk_name=='{#NAME}')].smartctl.exit_status.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> |
+|Zabbix raw items |SMART [{#NAME}]: Smartctl error |<p>This metric will contain smartctl errors.</p> |DEPENDENT |smart.disk.error[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.error`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Get disk attributes |<p>-</p> |ZABBIX_ACTIVE |smart.disk.get[{#PATH},"{#RAIDTYPE}"] |
+|Zabbix raw items |SMART [{#NAME}]: Device model |<p>-</p> |DEPENDENT |smart.disk.model[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.model_name`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Serial number |<p>-</p> |DEPENDENT |smart.disk.sn[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.serial_number`</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: `$.self_test_passed`</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: `$.temperature`</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: `$.power_on_time`</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: `$.percentage_used`</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: `$.critical_warning`</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: `$.media_errors`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Exit status |<p>The exit statuses of smartctl are defined by a bitmask but in decimal value. The eight different bits in the exit status have the following meanings for ATA disks; some of these values may also be returned for SCSI disks.</p><p>Bit 0: Command line did not parse.</p><p>Bit 1: Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode (see '-n' option above).</p><p>Bit 2: Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure (see '-b' option above).</p><p>Bit 3: SMART status check returned "DISK FAILING".</p><p>Bit 4: We found prefail Attributes <= threshold.</p><p>Bit 5: SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.</p><p>Bit 6: The device error log contains records of errors.</p><p>Bit 7: The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.</p> |DEPENDENT |smart.disk.es[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.exit_status`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Raw_Read_Error_Rate |<p>Stores data related to the rate of hardware read errors that occurred when reading data from a disk surface. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.</p> |DEPENDENT |smart.disk.attribute.raw_read_error_rate[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.raw_read_error_rate.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Spin_Up_Time |<p>Average time of spindle spin up (from zero RPM to fully operational [milliseconds]).</p> |DEPENDENT |smart.disk.attribute.spin_up_time[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.spin_up_time.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Start_Stop_Count |<p>A tally of spindle start/stop cycles. The spindle turns on, and hence the count is increased, both when the hard disk is turned on after having before been turned entirely off (disconnected from power source) and when the hard disk returns from having previously been put to sleep mode.</p> |DEPENDENT |smart.disk.attribute.start_stop_count[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.start_stop_count.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Power_Cycle_Count |<p>This attribute indicates the count of full hard disk power on/off cycles.</p> |DEPENDENT |smart.disk.attribute.power_cycle_count[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.power_cycle_count.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Reported_Uncorrect |<p>The count of errors that could not be recovered using hardware ECC.</p> |DEPENDENT |smart.disk.attribute.reported_uncorrect[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.reported_uncorrect.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Seek_Error_Rate |<p>Rate of seek errors of the magnetic heads. If there is a partial failure in the mechanical positioning system, then seek errors will arise. Such a failure may be due to numerous factors, such as damage to a servo, or thermal widening of the hard disk. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.</p> |DEPENDENT |smart.disk.attribute.seek_error_rate[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.seek_error_rate.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Bad_Block_Rate |<p>Percentage of used reserve blocks divided by total reserve blocks.</p> |DEPENDENT |smart.disk.attribute.bad_block_rate[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.bad_block_rate.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Program_Fail_Count_Chip |<p>The total number of flash program operation failures since the drive was deployed.</p> |DEPENDENT |smart.disk.attribute.program_fail_count_chip[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.program_fail_count_chip.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
+|Zabbix raw items |SMART [{#NAME}]: Reallocated_Sector_Ct |<p>Disk discovered attribute.</p> |DEPENDENT |smart.disk.attribute.reallocated_sector_ct[{#NAME}]<p>**Preprocessing**:</p><p>- JSONPATH: `$.reallocated_sector_ct.value`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> |
## Triggers
@@ -84,8 +86,6 @@ There are no template links in this template.
|SMART [{#NAME}]: Some Attributes have been <= threshold |<p>SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.</p> |`( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),32) = 32 ) or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),32) = 32 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),32) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),32) )` |HIGH |<p>Manual close: YES</p> |
|SMART [{#NAME}]: Error log contains records |<p>The device error log contains records of errors.</p> |`( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),64) = 64 ) or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),64) = 64 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),64) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),64) )` |HIGH |<p>Manual close: YES</p> |
|SMART [{#NAME}]: Self-test log contains records |<p>The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.</p> |`( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),128) = 128 ) or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),128) = 128 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),128) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),128) )` |HIGH |<p>Manual close: YES</p> |
-|SMART [{#NAME}]: Attribute {#ID} {#ATTRNAME} is failed |<p>The value should be greater than THRESH.</p> |`last(/SMART by Zabbix agent 2 active/smart.disk.error[{#NAME},{#ID}]) <= {#THRESH}` |WARNING | |
-|SMART [{#NAME}]: Attribute raw value {#ID} {#ATTRNAME} is greater than {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} |<p>The value should not be more {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"}</p> |`( count(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}],#2) = 1 and last(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}]) > {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} ) or ( last(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}]) > {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} and last(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}]) > last(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}],#2) )` |AVERAGE |<p>Manual close: YES</p> |
## Feedback
diff --git a/templates/module/smart_agent2_active/template_module_smart_agent2_active.yaml b/templates/module/smart_agent2_active/template_module_smart_agent2_active.yaml
index acbccb67c98..61d1869b4b5 100644
--- a/templates/module/smart_agent2_active/template_module_smart_agent2_active.yaml
+++ b/templates/module/smart_agent2_active/template_module_smart_agent2_active.yaml
@@ -1,6 +1,6 @@
zabbix_export:
version: '6.0'
- date: '2022-02-13T07:13:21Z'
+ date: '2022-03-29T17:42:45Z'
groups:
-
uuid: 57b7ae836ca64446ba2c296389c009b7
@@ -11,7 +11,7 @@ zabbix_export:
template: 'SMART by Zabbix agent 2 active'
name: 'SMART by Zabbix agent 2 active'
description: |
- 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 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.
+ 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 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 have pre-defined Vendor Specific Attributes for each disk, and will be discovered if attribute is present.
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/415662-discussion-thread-for-official-zabbix-smart-disk-monitoring
@@ -19,28 +19,12 @@ zabbix_export:
groups:
-
name: Templates/Modules
- items:
- -
- uuid: feba508d76b845039b434f62d9e62d54
- name: 'SMART: Get attributes'
- type: ZABBIX_ACTIVE
- key: smart.disk.get
- history: '0'
- trends: '0'
- value_type: TEXT
- tags:
- -
- tag: component
- value: raw
- -
- tag: component
- value: storage
discovery_rules:
-
- uuid: 3b19696e4d8f4f98acb40481adfa7513
- name: 'Attribute discovery'
+ uuid: 0a56a348d4a446938beae1eae5ec8993
+ name: 'Disk discovery'
type: ZABBIX_ACTIVE
- key: smart.attribute.discovery
+ key: smart.disk.discovery
delay: 1h
filter:
evaltype: AND
@@ -48,46 +32,40 @@ zabbix_export:
-
macro: '{#NAME}'
value: '{$SMART.DISK.NAME.MATCHES}'
- formulaid: C
+ formulaid: A
-
macro: '{#NAME}'
value: '{$SMART.DISK.NAME.NOT_MATCHES}'
operator: NOT_MATCHES_REGEX
- formulaid: D
- -
- macro: '{#ID}'
- value: '{$SMART.ATTRIBUTE.ID.MATCHES}'
- formulaid: A
- -
- macro: '{#ID}'
- value: '{$SMART.ATTRIBUTE.ID.NOT_MATCHES}'
- operator: NOT_MATCHES_REGEX
formulaid: B
- description: 'Discovery SMART Vendor Specific Attributes of disks.'
+ description: 'Discovery SMART disks.'
item_prototypes:
-
- uuid: 5c09ba32ad72321bce5042d5f4dc59d2
- name: 'SMART [{#NAME}]: ID {#ID} {#ATTRNAME} raw value'
+ uuid: b3891b80915c4e2488f2f87cb173474a
+ name: 'SMART [{#NAME}]: Bad_Block_Rate'
type: DEPENDENT
- key: 'smart.disk.attr.raw[{#NAME},{#ID}]'
+ key: 'smart.disk.attribute.bad_block_rate[{#NAME}]'
delay: '0'
history: 7d
- trends: '0'
- value_type: CHAR
+ discover: NO_DISCOVER
+ description: 'Percentage of used reserve blocks divided by total reserve blocks.'
preprocessing:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].ata_smart_attributes.table[?(@.id=={#ID})].raw.string.first()'
+ - $.bad_block_rate.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
+ value: attribute
+ -
+ tag: component
value: storage
-
tag: diskname
@@ -95,42 +73,65 @@ zabbix_export:
-
tag: disktype
value: '{#DISKTYPE}'
- trigger_prototypes:
+ -
+ uuid: 512c44706bff48fda2ef444713d93b29
+ name: 'SMART [{#NAME}]: Power_Cycle_Count'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.power_cycle_count[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'This attribute indicates the count of full hard disk power on/off cycles.'
+ preprocessing:
-
- uuid: 91d59e7054f440298a6515cd32b83410
- expression: |
- ( count(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}],#2) = 1 and last(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}]) > {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} )
- or ( last(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}]) > {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"} and last(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}]) > last(/SMART by Zabbix agent 2 active/smart.disk.attr.raw[{#NAME},{#ID}],#2) )
- recovery_mode: NONE
- name: 'SMART [{#NAME}]: Attribute raw value {#ID} {#ATTRNAME} is greater than {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"}'
- priority: AVERAGE
- description: 'The value should not be more {$SMART.RAW.ATTRIBUTE.MAX.CRIT:"{#ID}"}'
- manual_close: 'YES'
- tags:
- -
- tag: scope
- value: notice
+ type: JSONPATH
+ parameters:
+ - $.power_cycle_count.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
-
- uuid: 498a4f1b4b7442b5a38c52400646cc47
- name: 'SMART [{#NAME}]: ID {#ID} {#ATTRNAME}'
+ uuid: 0ab9412116924ca2a9561b44e4c9d6da
+ name: 'SMART [{#NAME}]: Program_Fail_Count_Chip'
type: DEPENDENT
- key: 'smart.disk.error[{#NAME},{#ID}]'
+ key: 'smart.disk.attribute.program_fail_count_chip[{#NAME}]'
delay: '0'
history: 7d
+ discover: NO_DISCOVER
+ description: 'The total number of flash program operation failures since the drive was deployed.'
preprocessing:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].ata_smart_attributes.table[?(@.id=={#ID})].value.first()'
+ - $.program_fail_count_chip.value
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
+ value: attribute
+ -
+ tag: component
value: storage
-
tag: diskname
@@ -138,55 +139,204 @@ zabbix_export:
-
tag: disktype
value: '{#DISKTYPE}'
- trigger_prototypes:
+ -
+ uuid: f794dc07c88a4690be8512e029f0b50c
+ name: 'SMART [{#NAME}]: Raw_Read_Error_Rate'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.raw_read_error_rate[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'Stores data related to the rate of hardware read errors that occurred when reading data from a disk surface. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
+ preprocessing:
-
- uuid: 26a3e4a0b79340b1bb753ec23c07c79b
- expression: 'last(/SMART by Zabbix agent 2 active/smart.disk.error[{#NAME},{#ID}]) <= {#THRESH}'
- name: 'SMART [{#NAME}]: Attribute {#ID} {#ATTRNAME} is failed'
- priority: WARNING
- description: 'The value should be greater than THRESH.'
- tags:
- -
- tag: scope
- value: notice
- overrides:
+ type: JSONPATH
+ parameters:
+ - $.raw_read_error_rate.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
-
- name: 'ID filter for Raw trigger'
- step: '1'
- filter:
- conditions:
- -
- macro: '{#ID}'
- value: '{$SMART.RAW.ATTRIBUTE.ID.MATCHES}'
- operator: NOT_MATCHES_REGEX
- formulaid: A
- operations:
+ uuid: 643276ac0dab47b8974e849a1574ac2a
+ name: 'SMART [{#NAME}]: Reallocated_Sector_Ct'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.reallocated_sector_ct[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'Disk discovered attribute.'
+ preprocessing:
-
- operationobject: TRIGGER_PROTOTYPE
- operator: LIKE
- value: 'Attribute raw value'
- status: ENABLED
- discover: NO_DISCOVER
- -
- uuid: 0a56a348d4a446938beae1eae5ec8993
- name: 'Disk discovery'
- type: ZABBIX_ACTIVE
- key: smart.disk.discovery
- delay: 1h
- filter:
- evaltype: AND
- conditions:
- -
- macro: '{#NAME}'
- value: '{$SMART.DISK.NAME.MATCHES}'
- formulaid: A
- -
- macro: '{#NAME}'
- value: '{$SMART.DISK.NAME.NOT_MATCHES}'
- operator: NOT_MATCHES_REGEX
- formulaid: B
- description: 'Discovery SMART disks.'
- item_prototypes:
+ type: JSONPATH
+ parameters:
+ - $.reallocated_sector_ct.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: fa253069f1c74a0b9ee3dca5eafef17a
+ name: 'SMART [{#NAME}]: Reported_Uncorrect'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.reported_uncorrect[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'The count of errors that could not be recovered using hardware ECC.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.reported_uncorrect.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: 99df8858bc6d4fb4a9fb4abd29b6c852
+ name: 'SMART [{#NAME}]: Seek_Error_Rate'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.seek_error_rate[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'Rate of seek errors of the magnetic heads. If there is a partial failure in the mechanical positioning system, then seek errors will arise. Such a failure may be due to numerous factors, such as damage to a servo, or thermal widening of the hard disk. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.seek_error_rate.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: 422ba65b87444329b5a23d03ce89dda7
+ name: 'SMART [{#NAME}]: Spin_Up_Time'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.spin_up_time[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'Average time of spindle spin up (from zero RPM to fully operational [milliseconds]).'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.spin_up_time.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: eee36c13fc6248f6894188102d215638
+ name: 'SMART [{#NAME}]: Start_Stop_Count'
+ type: DEPENDENT
+ key: 'smart.disk.attribute.start_stop_count[{#NAME}]'
+ delay: '0'
+ history: 7d
+ discover: NO_DISCOVER
+ description: 'A tally of spindle start/stop cycles. The spindle turns on, and hence the count is increased, both when the hard disk is turned on after having before been turned entirely off (disconnected from power source) and when the hard disk returns from having previously been put to sleep mode.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.start_stop_count.value
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 6h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: attribute
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
-
uuid: ad6a9f6f7293495c916bb0aac0bc9729
name: 'SMART [{#NAME}]: Critical warning'
@@ -199,13 +349,44 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].nvme_smart_health_information_log.critical_warning.first()'
+ - $.critical_warning
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ tags:
+ -
+ tag: component
+ value: storage
+ -
+ tag: diskname
+ value: '{#NAME}'
+ -
+ tag: disktype
+ value: '{#DISKTYPE}'
+ -
+ uuid: b96b496a854f4165a44662bd93400b27
+ name: 'SMART [{#NAME}]: Smartctl error'
+ type: DEPENDENT
+ key: 'smart.disk.error[{#NAME}]'
+ delay: '0'
+ history: 7d
+ trends: '0'
+ value_type: TEXT
+ description: 'This metric will contain smartctl errors.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - $.error
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 1h
+ master_item:
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -237,13 +418,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].smartctl.exit_status.first()'
+ - $.exit_status
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -376,6 +557,21 @@ zabbix_export:
tag: scope
value: notice
-
+ uuid: b26489a8ba12495dbb9687ef52ab1396
+ name: 'SMART [{#NAME}]: Get disk attributes'
+ type: ZABBIX_ACTIVE
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
+ history: '0'
+ trends: '0'
+ value_type: TEXT
+ tags:
+ -
+ tag: component
+ value: raw
+ -
+ tag: component
+ value: storage
+ -
uuid: e5bbd606e330469389bf081588b88d17
name: 'SMART [{#NAME}]: Power on hours'
type: DEPENDENT
@@ -387,13 +583,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].power_on_time.hours.first()'
+ - $.power_on_time
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -416,13 +612,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].nvme_smart_health_information_log.media_errors.first()'
+ - $.media_errors
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -446,13 +642,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].model_name.first()'
+ - $.model_name
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -476,13 +672,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].nvme_smart_health_information_log.percentage_used.first()'
+ - $.percentage_used
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -516,13 +712,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].serial_number.first()'
+ - $.serial_number
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -558,13 +754,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].temperature.current.first()'
+ - $.temperature
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -612,13 +808,13 @@ zabbix_export:
-
type: JSONPATH
parameters:
- - '$[?(@.disk_name==''{#NAME}'')].ata_smart_data.self_test.status.passed.first()'
+ - $.self_test_passed
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 6h
master_item:
- key: smart.disk.get
+ key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
tags:
-
tag: component
@@ -641,6 +837,22 @@ zabbix_export:
value: notice
overrides:
-
+ name: Bad_Block_Rate
+ step: '9'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Bad_Block_Rate
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Bad_Block_Rate
+ status: ENABLED
+ discover: DISCOVER
+ -
name: 'Not NVMe'
step: '2'
filter:
@@ -658,6 +870,102 @@ zabbix_export:
status: ENABLED
discover: NO_DISCOVER
-
+ name: Power_Cycle_Count
+ step: '6'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Power_Cycle_Count
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Power_Cycle_Count
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Program_Fail_Count_Chip
+ step: '10'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Program_Fail_Count_Chip
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Program_Fail_Count_Chip
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Raw_Read_Error_Rate
+ step: '3'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Raw_Read_Error_Rate
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Raw_Read_Error_Rate
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Reallocated_Sector_Ct
+ step: '11'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Reallocated_Sector_Ct
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Reallocated_Sector_Ct
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Reported_Uncorrect
+ step: '7'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Reported_Uncorrect
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Reported_Uncorrect
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Seek_Error_Rate
+ step: '8'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Seek_Error_Rate
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Seek_Error_Rate
+ status: ENABLED
+ discover: DISCOVER
+ -
name: Self-test
step: '1'
filter:
@@ -673,16 +981,40 @@ zabbix_export:
value: Self-test
status: ENABLED
discover: NO_DISCOVER
+ -
+ name: Spin_Up_Time
+ step: '4'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Spin_Up_Time
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Spin_Up_Time
+ status: ENABLED
+ discover: DISCOVER
+ -
+ name: Start_Stop_Count
+ step: '5'
+ filter:
+ conditions:
+ -
+ macro: '{#ATTRIBUTES}'
+ value: Start_Stop_Count
+ formulaid: A
+ operations:
+ -
+ operationobject: ITEM_PROTOTYPE
+ operator: REGEXP
+ value: Start_Stop_Count
+ status: ENABLED
+ discover: DISCOVER
macros:
-
- macro: '{$SMART.ATTRIBUTE.ID.MATCHES}'
- value: '^.*$'
- description: 'This macro is used in the filter of attribute discovery for filtering IDs. It can be overridden on the host or linked on the template level.'
- -
- macro: '{$SMART.ATTRIBUTE.ID.NOT_MATCHES}'
- value: CHANGE_IF_NEEDED
- description: 'This macro is used in the filter of attribute discovery for filtering IDs. It can be overridden on the host or linked on the template level.'
- -
macro: '{$SMART.DISK.NAME.MATCHES}'
value: '^.*$'
description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
@@ -691,14 +1023,6 @@ zabbix_export:
value: CHANGE_IF_NEEDED
description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
-
- macro: '{$SMART.RAW.ATTRIBUTE.ID.MATCHES}'
- value: '^(?:5|187|188|196|197|198|199)$'
- description: 'This macro is used for the creation of the integer items instead of the text ones and also triggers for some raw values.'
- -
- macro: '{$SMART.RAW.ATTRIBUTE.MAX.CRIT}'
- value: '0'
- description: 'The threshold for raw values.'
- -
macro: '{$SMART.TEMPERATURE.MAX.CRIT}'
value: '65'
description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'