NCPA Issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mindspring
Posts: 117
Joined: Thu Jul 19, 2012 10:24 am

NCPA Issue

Post by mindspring »

Hi There,

I started getting this error message in monitoring an Artisan process using NCPA

Code: Select all

UNKNOWN: The node (process) requested does not exist. You may be trying to access the 'processes' node.
In the log file I can see the check running

Code: Select all

2021-07-05 09:00:29,478 8693 INFO ::ffff:<IPADDRESS> - - [2021-07-05 09:00:29] "GET /api/processes/?token=<PASSWPRD>&warning=40%3A&critical=20%3A&check=1&cmd=artisan&match=search HTTP/1.1" 200 3519 0.775105
Here is the configuration check from NagiosXI service configure:

Code: Select all

check_xi_ncpa!-t 'password' -P 5693 -M 'process/artisan/count' -w -50 -c -10!!!!!!!

Any ideas on this?
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: NCPA Issue

Post by dchurch »

Hi!

Can you please try changing the check to:

Code: Select all

check_xi_ncpa!-t 'password' -P 5693 -M 'processes/artisan/count' -w -50 -c -10!!!!!!!
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
mindspring
Posts: 117
Joined: Thu Jul 19, 2012 10:24 am

Re: NCPA Issue

Post by mindspring »

Ah thanks, i copied this from another service check and this seems to have worked:

check_xi_ncpa!-t 'password' -M 'processes' -w 4: -c 3: -q 'cmd=artisan,match=search' !!!!!!!

I wanted to tweak this alert a bit more by adding different checks for different artisan process types.

Code: Select all

root       603  0.0  0.0 113284  1380 pts/0    Ss+  Jul05   0:00 bash -c cd /var/www/html/api/;  while true; do php artisan queue:listen ; sleep 1 ; done; exec sh
root      9309  5.0  0.1 416284 36004 pts/0    S+   03:35   0:00 /usr/bin/php artisan queue:work --once --name=default --queue=default --backoff=0 --memory=128 --sleep=3 --tries=1
nginx     9316 11.0  0.1 416284 36012 ?        S    03:36   0:00 /usr/bin/php artisan queue:work --once --name=default --queue=default --backoff=0 --memory=128 --sleep=3 --tries=3
nginx     9317 11.0  0.1 416284 36016 ?        S    03:36   0:00 /usr/bin/php artisan queue:work --once --name=default --queue=default --backoff=0 --memory=128 --sleep=3 --tries=3
root      9362  0.0  0.0 112816   972 pts/1    S+   03:36   0:00 grep --color=auto artisan
nginx    22394  0.0  0.1 416280 35928 ?        S    Jul05   1:54 php /var/www/html/api/[b]artisan queue:listen[/b] --sleep=3 --tries=3
root     22409  0.0  0.1 416280 35924 pts/0    S+   Jul05   1:53 php artisan queue:listen
nginx    22410  0.0  0.1 416280 35928 ?        S    Jul05   1:52 php /var/www/html/api/artisan queue:listen --sleep=3 --tries=3

For example, this has the different types in bold above, artisan queue:listen and artisan queue:work
Could I do something like the below?

Thanks

check_xi_ncpa!-t 'password' -M 'processes' -w 4: -c 3: -q 'cmd=artisan queue:listen,match=search' !!!!!!!
check_xi_ncpa!-t 'password' -M 'processes' -w 4: -c 3: -q 'cmd=artisan queue:work,match=search' !!!!!!!


UPDATE:
I tried the above method but I can't tell if it's working properly or not. The output of on NagiosXI looks like below:

Code: Select all

Processes Matched
PID: Name: Username: Exe: Memory: CPU
-----------------------------------
695: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
1050: php: root: 0.12 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
2935: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
4096: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
4383: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
4756: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
5604: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
5862: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
7006: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
7023: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
28587: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %
42730: php: root: 0.11 % (VMS 0.45 GB, RSS 0.03 GB): 0.00 %

So it doesn't really show the full process. Any ideas?
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: NCPA Issue

Post by dchurch »

Your modification appears to be working when I labbed this up. Try shutting down the artisan queue workers and see if the check stays the same.

Here's how to execute it from the Nagios XI machine's command line:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H <your NCPA host IP> -t 'password' -M 'processes' -w 4: -c 3: -q 'cmd=artisan queue:work,match=search'
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
mindspring
Posts: 117
Joined: Thu Jul 19, 2012 10:24 am

Re: NCPA Issue

Post by mindspring »

Many thanks, yes this is working.
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: NCPA Issue

Post by dchurch »

Glad to hear you resolved it! Locking thread.

If you have any additional issues, feel free to make a new thread.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Locked