Configure customable NRPE services

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
mandar18
Posts: 31
Joined: Thu Feb 08, 2024 6:43 am

Configure customable NRPE services

Post 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?
User avatar
MaterazziSan
Posts: 30
Joined: Wed Apr 19, 2023 5:31 pm

Re: Configure customable NRPE services

Post by MaterazziSan »

Hi,

Have you create it Services?

Best regards
mandar18
Posts: 31
Joined: Thu Feb 08, 2024 6:43 am

Re: Configure customable NRPE services

Post 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%) "
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: Configure customable NRPE services

Post 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
mandar18
Posts: 31
Joined: Thu Feb 08, 2024 6:43 am

Re: Configure customable NRPE services

Post 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.
Post Reply