node

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

node

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: node

Post 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"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: node

Post by fsodah »

I will try it and get back to you soon
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: node

Post by cdienger »

We'll wait for an update.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: node

Post 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).
You do not have the required permissions to view the files attached to this post.
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: node

Post 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;
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: node

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: node

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: node

Post by lmiltchev »

I am glad your issue has been resolved! I am closing this topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked