Collecting fake json script

This commit is contained in:
Горлов Максим 2020-10-27 23:30:05 +03:00
parent 7fa7a15525
commit 09cfdec25a
2 changed files with 7 additions and 1 deletions

6
collect_fake_json.sh Executable file
View file

@ -0,0 +1,6 @@
#! /bin/bash
for device in $(smartctl --scan | awk '{ print $1}')
do
smartctl --json --xall $device | jq > $(basename $device).json
done

View file

@ -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: