From 09cfdec25a83312b8923038fc51bc82c3a50e79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=BE=D1=80=D0=BB=D0=BE=D0=B2=20=D0=9C=D0=B0=D0=BA?= =?UTF-8?q?=D1=81=D0=B8=D0=BC?= Date: Tue, 27 Oct 2020 23:30:05 +0300 Subject: [PATCH] Collecting fake json script --- collect_fake_json.sh | 6 ++++++ smartctl_exporter.yaml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 collect_fake_json.sh diff --git a/collect_fake_json.sh b/collect_fake_json.sh new file mode 100755 index 0000000..87ed1c7 --- /dev/null +++ b/collect_fake_json.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +for device in $(smartctl --scan | awk '{ print $1}') +do + smartctl --json --xall $device | jq > $(basename $device).json +done diff --git a/smartctl_exporter.yaml b/smartctl_exporter.yaml index 7740083..798037b 100644 --- a/smartctl_exporter.yaml +++ b/smartctl_exporter.yaml @@ -1,7 +1,7 @@ smartctl_exporter: bind_to: "[::1]:9633" url_path: "/metrics" - fake_json: no + fake_json: yes smartctl_location: /usr/sbin/smartctl collect_not_more_than_period: 20s devices: