aboutsummaryrefslogtreecommitdiff
path: root/text_collector_examples
diff options
context:
space:
mode:
authorShevchenko Vitaliy <vetal4444@gmail.com>2018-01-24 12:35:14 +0200
committerBen Kochie <superq@gmail.com>2018-01-24 11:35:14 +0100
commit4ed49e73fb76101d421f0488b644f88d3d541712 (patch)
treeb8762c6fc40a0922444fd28b10a1cc94be162878 /text_collector_examples
parent111e3af43700c041c3f0a30ff934406d7f411824 (diff)
downloadprometheus_node_collector-4ed49e73fb76101d421f0488b644f88d3d541712.tar.bz2
prometheus_node_collector-4ed49e73fb76101d421f0488b644f88d3d541712.tar.xz
prometheus_node_collector-4ed49e73fb76101d421f0488b644f88d3d541712.zip
Escape double quotes in device model family (#772)
Diffstat (limited to 'text_collector_examples')
-rwxr-xr-xtext_collector_examples/smartmon.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/text_collector_examples/smartmon.sh b/text_collector_examples/smartmon.sh
index ad6182e..61fdce3 100755
--- a/text_collector_examples/smartmon.sh
+++ b/text_collector_examples/smartmon.sh
@@ -74,7 +74,7 @@ parse_smartctl_info() {
74 local model_family='' device_model='' serial_number='' fw_version='' vendor='' product='' revision='' lun_id='' 74 local model_family='' device_model='' serial_number='' fw_version='' vendor='' product='' revision='' lun_id=''
75 while read line ; do 75 while read line ; do
76 info_type="$(echo "${line}" | cut -f1 -d: | tr ' ' '_')" 76 info_type="$(echo "${line}" | cut -f1 -d: | tr ' ' '_')"
77 info_value="$(echo "${line}" | cut -f2- -d: | sed 's/^ \+//g')" 77 info_value="$(echo "${line}" | cut -f2- -d: | sed 's/^ \+//g' | sed 's/"/\\"/')"
78 case "${info_type}" in 78 case "${info_type}" in
79 Model_Family) model_family="${info_value}" ;; 79 Model_Family) model_family="${info_value}" ;;
80 Device_Model) device_model="${info_value}" ;; 80 Device_Model) device_model="${info_value}" ;;