Page 2 of 2

Re: NMHeapDump.hprof

Posted: Mon Jun 18, 2018 8:16 am
by mcapra
nms_system_support wrote:Could you please tell me how check_services is working?
check_services is a NRPE command definition that exists in your NRPE configuration file. In your provided example:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -t 30 -c check_services -a '/NMHeapDump.hprof'
check_services is a command definition passed to the remote NRPE server via the -c argument. If you were to rename this command in your nrpe.cfg file to check_something_else, you could execute it remotely via check_nrpe from your Nagios Core machine like so:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -t 30 -c check_something_else -a '/NMHeapDump.hprof'
What you pass to check_nrpe via the -c argument has nothing to do with any Nagios Core side configuration or plugins. It is completely user-defined.

As such, we have no way of knowing exactly what that command is referencing which is why I requested the nrpe.cfg file from the remote machine. We could make guesses at what this command is defined as, but not much else.
mcapra wrote: If you could share the remote machine's nrpe.cfg file, that might be helpful.
It would also be useful to know what plugin/script the NRPE command definition is referencing. Executing that plugin/script from the CLI of the remote machine should give us enough information. If it is not a compiled binary, attaching a copy of the plugin would also be helpful.

Re: NMHeapDump.hprof

Posted: Mon Jun 18, 2018 11:11 am
by cdienger
check_services is a script found on the remote machine running the nrpe agent. There is some logic which determines which commands to run to verify if a service is running depending on the OS so I would recommend just reviewing the script to answer your question.. The check_services script is usually in /usr/lib/nagios/plugins/.