nagios_client: Fix the check_ipa_replication plugin
It looks like the data it retrieves is in bytes and thus needs to be decoded into a unicode string so we can use it as a regular string in our code later. Fixes https://pagure.io/fedora-infrastructure/issue/9372 Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
be88870830
commit
342c056ae4
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ except Exception as e:
|
||||||
for rhost in replication:
|
for rhost in replication:
|
||||||
plugin.add_summary("Replica %s Status: %s" % (rhost[1]['nsDS5ReplicaHost'][0], rhost[1]['nsds5replicaLastUpdateStatus'][0]))
|
plugin.add_summary("Replica %s Status: %s" % (rhost[1]['nsDS5ReplicaHost'][0], rhost[1]['nsds5replicaLastUpdateStatus'][0]))
|
||||||
|
|
||||||
status = rhost[1]['nsds5replicaLastUpdateStatus'][0]
|
status = rhost[1]['nsds5replicaLastUpdateStatus'][0].decode('utf-8')
|
||||||
code = status[:2]
|
code = status[:2]
|
||||||
if status.startswith('Error ('):
|
if status.startswith('Error ('):
|
||||||
# IPA >=4.4.0
|
# IPA >=4.4.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue