Question

Monitor RHEL servers

  • 1 September 2023
  • 8 replies
  • 133 views

Badge +3

How  do I monitor RHEL servers , CPU , memory disk usage, critical services etc.

Request your help,please share any articles for the same .Thanks.


8 replies

Userlevel 5
Badge +17

Easiest is https://docs.centreon.com/docs/getting-started/monitor-linux-server-with-snmp/ but you can also use one of these methods:

Badge +3

Hi Rchauvel,

currently i a m using RHEL 7.9.

Regards

Krishnakumar

 

 

Badge +3

Hi 

unable to install packages as mentioend in Linux NRPE3 URL.

Refer below for the error. Help me to resolve this issue. 

dnf install centreon-nrpe3-daemon.x86_64 centreon-plugin-Operatingsystems-Linux-Local.noarch
Updating Subscription Management repositories.
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Centreon open source software repository.                                                                                     27 MB/s | 3.0 MB     00:00
Centreon open source software repository.                                                                                    3.7 MB/s | 275 kB     00:00
Error:
 Problem: package centreon-plugin-Operatingsystems-Linux-Local-20230912-083720.el8.noarch requires perl(JSON::XS), but none of the providers can be installed
  - cannot install the best candidate for the job
  - nothing provides perl(:MODULE_COMPAT_5.16.3) needed by perl-JSON-XS-1:3.01-2.el7.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

 

Userlevel 4
Badge +12

Hi @krishnakumar 

Sorry, the NRPE3 procedure has been in the process of rewriting for a while.

In the meantime I recommend you to use Linux SNMP, which does not require you to install our plugin on your monitored servers. You just need to configure SNMP on it. 

The procedures are here or here (for more details).

PS: on EL7 environments, one generally uses yum, not dnf to install packages. I think this is why you’re getting “Configuration: OptionBinding with id "failovermethod" does not exist” messages.

 

Badge +3

below is the error - monitoring the RHEL server via snmp; Please help

Centreon-PROD plugins]# /usr/lib/centreon/plugins//centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=load --hostname=172.24.21.56 --snmp-version='1' --snmp-community='capexROpub'  --warning='4,3,2' --critical='6,5,4'
UNKNOWN: SNMP GET Request: Cant get a single value.
 

Thanks,

Userlevel 3
Badge +8

Hi,

  1. check /etc/snmp/snmpd.conf:

Do you have :

agentAddress udp:161,udp6:[::1]:161 OR agentAddress udp:161 ?

 

if ipv6 is disable on your centreon, then the first one will not work, you have to replace it by the other, then restart snmpd

  1. check /etc/default/snmpd

In the line

SNMPDOPTS='-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid'

If you have 127.0.0.1 at the end ( present by default with old package ), then remove it and restart snmpd.

  1. In your check command

--snmp-version=’2

 

If if doesn’t work, check your firewall, perhaps it’s blocked.

 

Badge +3

Hi 

montiored host is RHEL 8 , refer below error.

 

dnf install centreon-nrpe3-daemon.x86_64 centreon-plugin-Operatingsystems-Linux-Local.noarch
Updating Subscription Management repositories.
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel-testing.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Last metadata expiration check: 1:19:00 ago on Mon 18 Sep 2023 10:11:26 AM IST.
Error:
 Problem: package centreon-plugin-Operatingsystems-Linux-Local-20230912-083720.el8.noarch requires perl(JSON::XS), but none of the providers can be installed
  - cannot install the best candidate for the job
  - nothing provides perl(:MODULE_COMPAT_5.16.3) needed by perl-JSON-XS-1:3.01-2.el7.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
 

Badge +3

Hi MichaelW,

there is no file in server  like -/etc/default/snmpd.

Even after modifying the version 2c- still it is not working same error.

-Centreon-PROD default]# centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=load --hostname=172.24.21.56 --snmp-version='2c' --snmp-community='apeROpub' --warning='4,3,2' --critical='6,5,4'
-bash: centreon_linux_snmp.pl: command not found
 

 

Reply