ncpa process output not generate graph
Opened this issue · 1 comments
Hi,
i 'm, using check_ncpa.py for monitoring process Iperius.exe in windows server.
In my monitoring program (LibreNMS) i can see the output in service
OK: Process count for processes named iperius.exe was 1
but it doesn't generated graph for process_count, cpu, memory, ecc.
If i do a check from commandline i have this result:
librenms:/opt/librenms# /data/monitoring-plugins/check_ncpa.py -H 10.10.X.X -t xxxxxxxxxxxxxxxx -P 5693 -M 'processes' -q 'name=Iperius.exe' -c 1 -vD
Connecting to: https://10.10.X.X:5693/api/processes/?token=xxxxxxxxxxxxxxxx &critical=1&check=1&name=Iperius.exe
File returned contained:
{"returncode": 0, "stdout": "OK: Process count for processes named iperius.exe was 1 | 'process_count'=1;;1; 'cpu'=0.0%;;; 'memory'=0.67%;;; 'memory_vms'=0.03GB;;; 'memory_rss'=0.06GB;;;\nProcesses Matched\nPID: Name: Username: Exe: Memory: CPU\n-----------------------------------\n10200: Iperius.exe: xx\xxxx: 0.67 % (VMS 0.03 GB, RSS 0.06 GB): 0.00 %\n\nTotal Memory: 0.67 % (VMS 0.03 GB, RSS 0.06 GB)\nTotal CPU: 0.00 %\n"}
OK: Process count for processes named iperius.exe was 1 | 'process_count'=1;;1; 'cpu'=0.0%;;; 'memory'=0.67%;;; 'memory_vms'=0.03GB;;; 'memory_rss'=0.06GB;;;
Processes Matched
PID: Name: Username: Exe: Memory: CPU
-----------------------------------
10200: Iperius.exe: xx\xxxx: 0.67 % (VMS 0.03 GB, RSS 0.06 GB): 0.00 %
Total Memory: 0.67 % (VMS 0.03 GB, RSS 0.06 GB)
Total CPU: 0.00 %**
I think that problem could be the output, the rrdtool can't parse text after \nProcesses Matched\n.........
Is it possible to trim the output?
If not, is it possible to do a script for personalize the output until to memory_rss?
OK: Process count for processes named iperius.exe was 1 | 'process_count'=1;;1; 'cpu'=0.0%;;; 'memory'=0.65%;;; 'memory_vms'=0.03GB;;; 'memory_rss'=0.06GB;;;
I have tried to do a powershell script but is very difficult obtain a correct percentual of CPU.
Thanks.
It looks like the extra output is being added at the end of the output, when it should be added before the |
character. I'll fix this in the coming update.