]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: add common smartctl output to JSON output 30408/head
authorPatrick Seidensal <pseidensal@suse.com>
Mon, 16 Sep 2019 13:44:53 +0000 (15:44 +0200)
committerPatrick Seidensal <pseidensal@suse.com>
Wed, 18 Sep 2019 12:34:06 +0000 (14:34 +0200)
Enables consumers like the dashboard to provide the regular smartctl
output to users.

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
src/common/blkdev.cc
sudoers.d/ceph-osd-smartctl

index 2d34decb29993a76592e0775678f59bb9c0f5a69..4da2be6a4c37eb39b4e16cdce3a4c86406b42c10 100644 (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);
 
index ba788d6c0be4f1bca11c4e498d6fb4b8da6882ec..882e8b68121ba7763c41282484b97b34ce45f85d 100644 (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/*