Page 1 of 1

check_ncpa and combined results

Posted: Wed Dec 23, 2015 12:11 pm
by vAJ
Scratching my head over this one, folks.

Trying to get combined values back using check_ncpa.py (0.3.5).

API call works great: /api/disk/logical/C:%7C?check=1&units=G

Code: Select all

{
  "value": {
    "returncode": 0, 
    "stdout": "OK: used_percent was 89% -- total_size was 64Gb -- used was 57Gb -- free was 7Gb | 'used_percent_0'=89%;;;"
  }
}
But I'm not able to get it to work in the script call.

Code: Select all

-t 'mytoken' -P 5693 -M 'disk/logical/C:|?check=1&&units=G'
Isn't cutting it.

Thoughts?

Re: check_ncpa and combined results

Posted: Wed Dec 23, 2015 1:36 pm
by vAJ
Aha. Leave it without defining a metric for disk and it defaults to used_percent. Set your unit to desired (B, M, G) and you're all set.

Code: Select all

-t 'mytoken' -P 5693 -M 'disk/logical/C:|/' -u M -w 80 -c 90

Re: check_ncpa and combined results

Posted: Wed Dec 23, 2015 1:46 pm
by lmiltchev
Yes, this should work:

Code: Select all

[root@localhost libexec]# ./check_ncpa.py -H x.x.x.x -t 'token' -P 5693 -M 'disk/logical/C:|/' -u M -w 80 -c 90
OK: used_percent was 38% -- total_size was 115394Mb -- used was 44087Mb -- free was 71307Mb | 'used_percent_0'=38%;80;90;
Let us know if it is safe to lock the thread.

Re: check_ncpa and combined results

Posted: Wed Dec 23, 2015 1:58 pm
by vAJ
Lock it up!