Page 1 of 1

node

Posted: Wed Nov 27, 2019 8:52 am
by fsodah
how can i monitor this process, since am using the nrpe with check_process, i want to check if the node process is always up

Code: Select all

[root@xxx ~]# ps -ef | grep node
root      3858  3778  0 15:48 pts/0    00:00:00 grep --color=auto node
root      7410     1  0 Oct24 ?        00:00:00 /usr/sbin/mcelog --ignorenodev --daemon --syslog
weblogic 17505 17504  0 Nov24 ?        00:00:00 /bin/sh /u01/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/bin/startWebLogic.sh nodebug noderby
weblogic 26167     1  0 Nov04 ?        00:00:48 node index.js
[root@xxxx ~]# ps -ef | grep node


i want only to catch up the 2x process with now ... what argument should i pass to check_process

Re: node

Posted: Wed Nov 27, 2019 12:03 pm
by cdienger
Give this a shot and let us know if it does what you're looking for:

Code: Select all

/usr/local/nagios/libexec/check_procs -c 2: --ereg-argument-array="nodebug|node index.js"

Re: node

Posted: Wed Nov 27, 2019 12:08 pm
by fsodah
I will try it and get back to you soon

Re: node

Posted: Wed Nov 27, 2019 12:18 pm
by cdienger
We'll wait for an update.

Re: node

Posted: Wed Nov 27, 2019 1:41 pm
by fsodah
it works on linux command

Code: Select all

[root@xxxxxuat plugins]# /usr/lib64/nagios/plugins/check_procs -c 2: --ereg-argument-array="nodebug|node index.js"
PROCS OK: 2 processes with regex args 'nodebug,node index.js' | procs=2;;2:;0;
but via nagios configuration i get

Code: Select all

CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

Re: node

Posted: Wed Nov 27, 2019 2:09 pm
by fsodah
i tried this also ... not working

Code: Select all

/usr/lib64/nagios/plugins/check_procs --ereg-argument-array 'nodebug|node index.js' -c 2:2
PROCS OK: 2 processes with regex args 'nodebug,index.js' | procs=2;;2:2;0;

Re: node

Posted: Wed Nov 27, 2019 2:37 pm
by lmiltchev
You cannot pass a pipe ("|") in the arguments with NRPE. This has been disabled for security reasons as it could make your system vulnerable to various attacks.

You could however hardcode the arguments in your command on the client.

Example:

On the client

Code: Select all

command[check_procs_args]=/usr/lib64/nagios/plugins/check_procs -c 2: --ereg-argument-array="nodebug|node index.js"
On the Nagios XI server

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <client ip> -c check_procs_args

Re: node

Posted: Wed Nov 27, 2019 2:41 pm
by fsodah
Done .... i will do what you suggested ... however i made split command to get this running ... many thanks master please close the ticket.

Re: node

Posted: Wed Nov 27, 2019 2:54 pm
by lmiltchev
I am glad your issue has been resolved! I am closing this topic.