diff options
author | Bernd Müller <mueller@b1-systems.de> | 2019-07-24 17:46:50 +0200 |
---|---|---|
committer | Ben Kochie <superq@gmail.com> | 2019-07-24 17:46:50 +0200 |
commit | d2be72be4a69579c026c6be3eea31a6617ad10b2 (patch) | |
tree | 230c98e955f9d06466cb25662f616301b0d56945 /text_collector_examples | |
parent | 443072dfc340d802c15102bbf8a5c1e6eec2688f (diff) | |
download | prometheus_node_collector-d2be72be4a69579c026c6be3eea31a6617ad10b2.tar.bz2 prometheus_node_collector-d2be72be4a69579c026c6be3eea31a6617ad10b2.tar.xz prometheus_node_collector-d2be72be4a69579c026c6be3eea31a6617ad10b2.zip |
changed fields for disk write and read data of S.M.A.R.T, Signed-off-by: Bernd Mueller <mueller@b1-systems.de> (#1235)
Signed-off-by: Bernd Müller <mueller@b1-systems.de>
Diffstat (limited to 'text_collector_examples')
-rwxr-xr-x | text_collector_examples/smartmon.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/text_collector_examples/smartmon.sh b/text_collector_examples/smartmon.sh index 25ad7ed..8a75d29 100755 --- a/text_collector_examples/smartmon.sh +++ b/text_collector_examples/smartmon.sh | |||
@@ -87,7 +87,8 @@ parse_smartctl_scsi_attributes() { | |||
87 | case "${attr_type}" in | 87 | case "${attr_type}" in |
88 | number_of_hours_powered_up_) power_on="$(echo "${attr_value}" | awk '{ printf "%e\n", $1 }')" ;; | 88 | number_of_hours_powered_up_) power_on="$(echo "${attr_value}" | awk '{ printf "%e\n", $1 }')" ;; |
89 | Current_Drive_Temperature) temp_cel="$(echo ${attr_value} | cut -f1 -d' ' | awk '{ printf "%e\n", $1 }')" ;; | 89 | Current_Drive_Temperature) temp_cel="$(echo ${attr_value} | cut -f1 -d' ' | awk '{ printf "%e\n", $1 }')" ;; |
90 | Blocks_read_from_cache_and_sent_to_initiator_) lbas_read="$(echo ${attr_value} | awk '{ printf "%e\n", $1 }')" ;; | 90 | Blocks_sent_to_initiator_) lbas_read="$(echo ${attr_value} | awk '{ printf "%e\n", $1 }')" ;; |
91 | Blocks_received_from_initiator_) lbas_written="$(echo ${attr_value} | awk '{ printf "%e\n", $1 }')" ;; | ||
91 | Accumulated_start-stop_cycles) power_cycle="$(echo ${attr_value} | awk '{ printf "%e\n", $1 }')" ;; | 92 | Accumulated_start-stop_cycles) power_cycle="$(echo ${attr_value} | awk '{ printf "%e\n", $1 }')" ;; |
92 | Elements_in_grown_defect_list) grown_defects="$(echo ${attr_value} | awk '{ printf "%e\n", $1 }')" ;; | 93 | Elements_in_grown_defect_list) grown_defects="$(echo ${attr_value} | awk '{ printf "%e\n", $1 }')" ;; |
93 | esac | 94 | esac |
@@ -95,6 +96,7 @@ parse_smartctl_scsi_attributes() { | |||
95 | [ ! -z "$power_on" ] && echo "power_on_hours_raw_value{${labels},smart_id=\"9\"} ${power_on}" | 96 | [ ! -z "$power_on" ] && echo "power_on_hours_raw_value{${labels},smart_id=\"9\"} ${power_on}" |
96 | [ ! -z "$temp_cel" ] && echo "temperature_celsius_raw_value{${labels},smart_id=\"194\"} ${temp_cel}" | 97 | [ ! -z "$temp_cel" ] && echo "temperature_celsius_raw_value{${labels},smart_id=\"194\"} ${temp_cel}" |
97 | [ ! -z "$lbas_read" ] && echo "total_lbas_read_raw_value{${labels},smart_id=\"242\"} ${lbas_read}" | 98 | [ ! -z "$lbas_read" ] && echo "total_lbas_read_raw_value{${labels},smart_id=\"242\"} ${lbas_read}" |
99 | [ ! -z "$lbas_written" ] && echo "total_lbas_written_raw_value{${labels},smart_id=\"242\"} ${lbas_written}" | ||
98 | [ ! -z "$power_cycle" ] && echo "power_cycle_count_raw_value{${labels},smart_id=\"12\"} ${power_cycle}" | 100 | [ ! -z "$power_cycle" ] && echo "power_cycle_count_raw_value{${labels},smart_id=\"12\"} ${power_cycle}" |
99 | [ ! -z "$grown_defects" ] && echo "grown_defects_count_raw_value{${labels},smart_id=\"12\"} ${grown_defects}" | 101 | [ ! -z "$grown_defects" ] && echo "grown_defects_count_raw_value{${labels},smart_id=\"12\"} ${grown_defects}" |
100 | } | 102 | } |