check_ncpa.py with error: " Warning: Return code of 13 for check of service 'Process Count'. "

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
nagios-mikep97
Posts: 5
Joined: Mon Dec 09, 2024 7:49 am

check_ncpa.py with error: " Warning: Return code of 13 for check of service 'Process Count'. "

Post by nagios-mikep97 »

Hello,

New to nagios core and need some help trying to install/configure the check_ncpa.py script.

I am getting the error below :

“ Warning: Return code of 13 for check of service 'Process Count' on host 'mds-rocky-01' was out of bounds. “

I tried changing the ownership and permissions of the file.

sudo chown nagios:nagios /usr/lib64/nagios/plugins/check_ncpa.py
sudo chmod 750 /usr/lib64/nagios/plugins/check_ncpa.py

I am also able to run the check_ncpa.py script from the CLI as the nagios user.

Can someone point me in the right direction ?

Thanks, mp
gwesterman
Posts: 268
Joined: Wed Aug 23, 2023 11:29 am

Re: check_ncpa.py with error: " Warning: Return code of 13 for check of service 'Process Count'. "

Post by gwesterman »

Hi @nagios-mikep97,

What version of Nagios Core and Nagios Plugins do you have installed?
bbahn
Posts: 382
Joined: Thu Jan 12, 2023 5:42 pm

Re: check_ncpa.py with error: " Warning: Return code of 13 for check of service 'Process Count'. "

Post by bbahn »

Hello @nagios-mikep97,

It seems that there have been several issues that have caused a return code 13 issue. One was the permissions issue, but another was a windows line ending issue. If you could try checking your check_ncpa.py version with the -V option and use the -v option when running your check to get verbose output, we can help get to the bottom of this more easily.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
nagios-mikep97
Posts: 5
Joined: Mon Dec 09, 2024 7:49 am

Re: check_ncpa.py with error: " Warning: Return code of 13 for check of service 'Process Count'. "

Post by nagios-mikep97 »

Thanks for the help

Nagios Core Version = 4.4.14
check_ncpa.py version = 1.2.5

*My first NCPA client is a rocky_9 host. a

Below is the output froming check_ncpa.py as nagios user.


[nagios@nag-01 ~]$ /usr/lib64/nagios/plugins/check_ncpa.py -t XXXXXX -H 10.10.11.11 -P 5693 -v -M cpu/percent -w 20 -c 40 -q 'agg
regate=avg'
Connecting to: https://10.10.11.11:5693/api/cpu/percen ... regate=avg
File returned contained:
{"returncode": 0, "stdout": "OK: Percent was 1.00 % | 'percent'=1.00%;20;40;"}
OK: Percent was 1.00 % | 'percent'=1.00%;20;40;
bbahn
Posts: 382
Joined: Thu Jan 12, 2023 5:42 pm

Re: check_ncpa.py with error: " Warning: Return code of 13 for check of service 'Process Count'. "

Post by bbahn »

@nagios-mikep97

It seems your issue lies with the check 'Process Count'. What are the command and output (with -v) for this particular check?
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
nagios-mikep97
Posts: 5
Joined: Mon Dec 09, 2024 7:49 am

Re: check_ncpa.py with error: " Warning: Return code of 13 for check of service 'Process Count'. "

Post by nagios-mikep97 »

Bbahn,

Thanks. I am getting the same error on all of the NCPA checks. Below is the output of the proccess count request run as the nagios user.


============

[nagios@mds-nag-01 ~]$ /usr/lib64/nagios/plugins/check_ncpa.py -t mytoken -H 10.10.11.11 -P 5693 -M processes -w 150 -c 200 -v
Connecting to: https://10.10.11.11:5693/api/processes/ ... 00&check=1
File returned contained:
{"returncode": 2, "stdout": "CRITICAL: Process count was 363 | 'process_count'=363;150;200; 'cpu'=0.7%;;; 'memory'=63.900000000000006%;;; 'memory_vms'=84.35000000000005GB;;; 'memory_rss'=2.399999999999998GB;;;\nProcesses Matched\nPID: Name: Username: Exe: Memory: CPU\n-----------------------------------\n1: systemd: root: 0.45 % (VMS 0.18 GB, RSS 0.02 GB): 0.00 %\n2: kthreadd: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n3: rcu_gp: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n4: rcu_par_gp: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n5: slub_flushwq: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n6: netns: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n10: mm_percpu_wq: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n12: rcu_tasks_kthre: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n13: rcu_tasks_rude_: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n14: rcu_tasks_trace: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n15: ksoftirqd/0: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n16: pr/tty0: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n17: rcu_preempt: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n18: migration/0: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n19: idle_inject/0: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n21: cpuhp/0: root: 0.0 % (VMS 0.00 GB, RSS 0.00 GB): 0.00 %\n22: cpuhp/1: root: 0.0 % (VMS
Post Reply