Page 1 of 1

check_ncpa.py - ugly output

Posted: Wed May 06, 2020 3:53 am
by christimpaler
Hi,
we are currently moving from NRPE to NCPA.
When using check_ncpa.py I thing the output is a little ugly:

Code: Select all

./check_ncpa.py -H <HOST> --token=<TOKEN> -M 'memory/virtual/used' -u G
b"OK: Used was 61.98 GB | 'used'=61.98GB;;;"
As you can see the output is prefixed with b' which is really annoying.

Do you face the same issue? Is this intended?
Thanks.
Regards
C.I.

Re: check_ncpa.py - ugly output

Posted: Wed May 06, 2020 1:03 pm
by jbrunkow
I just ran a test on my own server and I am not getting the b" preceding the output. See my output below.

Code: Select all

OK: Used was 0.19 GB | 'used'=0.19GB;;;
We could take a look at your check_ncpa.py script to see if we can discern why it is doing this. You could send the script to me so that I can examine it, or you could look at it yourself (if you know BASH) with a text editor.

Re: check_ncpa.py - ugly output

Posted: Thu May 07, 2020 12:59 am
by christimpaler
Hello.
To get check_ncpa.py to work on RHEL8 I changed the Shebang-line from

Code: Select all

#!/usr/bin/env python
to

Code: Select all

#!/usr/bin/env python3
Now I changed the first line of check_ncpa.py back to

Code: Select all

#!/usr/bin/env python
, because I am now running on RHEL7.
And it works!!!

Strange.
Case can be closed.
Thx for your help.

Re: check_ncpa.py - ugly output

Posted: Thu May 07, 2020 3:36 pm
by benjaminsmith
HI,
Strange.
Case can be closed.
Thx for your help
Super. Thanks for posting the solution!