Page 1 of 1

Configure customable NRPE services

Posted: Mon Jul 14, 2025 8:01 am
by mandar18
HEllo all,
I am trying to configure the check disk, memory and CPU in custom way, but not able to do so. I am using certificates binding for security purpose
can someone help me please?

Re: Configure customable NRPE services

Posted: Mon Jul 14, 2025 10:42 am
by MaterazziSan
Hi,

Have you create it Services?

Best regards

Re: Configure customable NRPE services

Posted: Mon Jul 14, 2025 11:02 am
by mandar18
Yes created its service and commands
I want to check memory at W95 C98
but somehow its taking the inbuild inputs and giving the output as "OK: committed = 5.798GB, physical = 5.405GB " and I want output as" Memory usage: total:7167.55 MB - used: 4009.50 MB (56%) - free: 3158.05 MB (44%) "

Re: Configure customable NRPE services

Posted: Mon Jul 14, 2025 10:04 pm
by kg2857
I think you'll need to post the service and command. As far as I know nrpe doesn't check memory, it runs commands, that run plugins that do so. Here's a kb article that may belp.
https://support.nagios.com/kb/article.php?id=774

Re: Configure customable NRPE services

Posted: Wed Jul 16, 2025 8:01 am
by mandar18
my service is as
define service{
use generic-service
host_name PM-COMP-34
service_description CPU Load
is_volatile 0
check_period 24x7
max_check_attempts 3
check_interval 5
retry_interval 1
contact_groups admins
notification_interval 60
notification_period 24x7
notification_options w,u,c,r
check_command check_nrpe_ssl!check_cpu
}

define service{
use generic-service
host_name PM-COMP-34
service_description C Drive
is_volatile 0
check_period 24x7
max_check_attempts 3
check_interval 5
retry_interval 1
contact_groups admins
notification_interval 60
notification_period 24x7
notification_options w,u,c,r
check_command check_nrpe!check_c
}

define service{
use generic-service
host_name PM-COMP-34
service_description Memory Usage
is_volatile 0
check_period 24x7
max_check_attempts 3
check_interval 5
retry_interval 1
contact_groups admins
notification_interval 60
notification_period 24x7
notification_options w,u,c,r
check_command check_nrpe!check_memory
}
and command is as
define command {
command_name check_nrpe_ssl
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -p 5666 -2 -C /etc/nagios/security/client-cert.pem -K /etc/nagios/security/client.key -A /etc/n>
}

define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
}

with all this I am able to check memory and CPU load, its not showing into percentage.