Added ceph user to ceph commands
* oschecks-check_ceph_health example: oschecks-check_ceph_health client.monitoring_client * oschecks-check_ceph_df example: oschecks-check_ceph_df 80 90 client.monitoring_size Signed-off-by: Juan Badia Payno <jbadiapa@redhat.com> Change-Id: Icb986bac88b52a123c2f99941fadab8c9e233b22
This commit is contained in:
parent
9f8354bbfe
commit
16aeaf8b11
|
@ -81,7 +81,12 @@ def check_ceph_df():
|
|||
'Program entry point.'
|
||||
|
||||
try:
|
||||
res = subprocess.check_output(["ceph", "df", "--format=json"],
|
||||
ceph_args = ["ceph", "df", "--format=json"]
|
||||
if len(sys.argv) >= 4:
|
||||
ceph_args.append('-n')
|
||||
ceph_args.append(sys.argv[3])
|
||||
|
||||
res = subprocess.check_output(ceph_args,
|
||||
stderr=subprocess.STDOUT)
|
||||
exit_code, message = interpret_output_df(res)
|
||||
sys.stdout.write("%s\n" % message)
|
||||
|
@ -119,7 +124,12 @@ def check_ceph_health():
|
|||
'Program entry point.'
|
||||
|
||||
try:
|
||||
res = subprocess.check_output(["ceph", "health"],
|
||||
ceph_args = ["ceph", "health"]
|
||||
if len(sys.argv) >= 2:
|
||||
ceph_args.append('-n')
|
||||
ceph_args.append(sys.argv[1])
|
||||
|
||||
res = subprocess.check_output(ceph_args,
|
||||
stderr=subprocess.STDOUT)
|
||||
exit_code, message = interpret_output_health(res)
|
||||
sys.stdout.write(message)
|
||||
|
|
Loading…
Reference in New Issue