osd: add common smartctl output to JSON output

Enables consumers like the dashboard to provide the regular smartctl
output to users.

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
This commit is contained in:
Patrick Seidensal 2019-09-16 15:44:53 +02:00
parent 14e73478b0
commit 44068fc941
2 changed files with 2 additions and 2 deletions

View File

@ -681,7 +681,7 @@ static int block_device_run_smartctl(const string& devname, int timeout,
"smartctl",
"-a",
//"-x",
"--json",
"--json=o",
device.c_str(),
NULL);

View File

@ -1,4 +1,4 @@
## allow ceph-osd (which runs as user ceph) to collect device health metrics
ceph ALL=NOPASSWD: /usr/sbin/smartctl -a --json /dev/*
ceph ALL=NOPASSWD: /usr/sbin/smartctl -a --json=o /dev/*
ceph ALL=NOPASSWD: /usr/sbin/nvme * smart-log-add --json /dev/*