Nagios monitors dell server hardware
We have mentioned earlier that omsa is used to monitor dell servers, but it must be accessed through web. This time we use nagios + check_openmanage to monitor the hardware of dell servers.
First, let's look at the figure below:
We can see that there are two ways to achieve monitoring:
1. The nagios server check_nrpe calls the check_openmanage of the monitored server. This method requires omsa and check_openmanage to be installed on the monitored server.
2. the nagios server directly uses check_openmanage for remote monitoring. In this way, perl-Net-SNMP must be installed on the nagios server, omsa and snmp must be installed on the monitored server, and the snmp service must be installed first, then install omsa, so that omsa will automatically change the snmp configuration file for monitoring.
My personal feeling: The second method is more convenient, and you only need to install it. The first method also needs to configure the nagios client. In addition, check_nrpe will consume server performance; therefore, the following is implemented using snmp.
1. Configure the nagios Server
1. Install check_openmanage on the nagios Server
wget http://folk.uio.no/trondham/software/files/check_openmanage-3.7.12.tar.gz tar -xvf check_openmanage-3.7.12.tar.gz cd check_openmanage-3.7.12 cp check_openmanage /usr/local/nagios/libexec chown nagios.nagios /usr/local/nagios/libexec/check_openmanage cp man/check_openmanage.8 /usr/share/man/man8 cp man/check_openmanage.conf.5 /usr/share/man/man5
2. Install perl-Net-snmp on the nagios Server
Centos5 wget http://mirrors.zju.edu.cn/epel/5/i386/epel-release-5-4.noarch.rpm rpm -ivh epel-release-5-4.noarch.rpm Centos6 wget http://mirrors.zju.edu.cn/epel/6/i386/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm yum install perl-Net-SNMP perl-Config-Tiny
In SNMP monitoring mode, check_openmanage requires perl-Net-SNMP support. Otherwise, the following error occurs:
ERROR: You need perl module Net: SNMP to run check_openmanage in SNMP mode
Now our nagios server has been installed
2. Configure the monitored end
1. Install the snmp service
Yum-y install net-snmp-devel net-snmp-utils
2. Install omsa
The wget-q-O-http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
Yum install srvadmin-all
3. Start the omsa Service
/Opt/dell/srvadmin/sbin/srvadmin-services.sh start
4. view the port
Netstat-ntlp | grep: 1311
If this port is available, it indicates that our srvadmin has been successfully installed. If it is not available, it may be due to an installation problem; in addition, we start with/opt/dell/srvadmin/sbin/srvadmin-services.sh start for the first time after installation, otherwise start with service dataeng start may be problematic, resulting in omsa not fully started.
Note:
(1) be sure to install the snmp service before installing omsa, so that omsa will automatically configure your snmp service. If the order is reversed, an error may be reported:
ERROR: (SNMP) OpenManage is not installed or is not working correctly
This is because our/etc/snmp/snmpd. conf configuration file is missing, mainly including the following)
View all supported ded. 1
Access notConfigGroup "" any noauth exact all none
Smuxpeer. 1.3.6.1.4.1.674.10892.1
(2) If the error "snmp critical: No response from remote host 'x. X. X. x'" is reported, the snmp service is not installed on the monitored end.
3. Configure monitoring items
1. Configure command
# Check the storage device define command {command_name check_storage command_line $ USER1 $/check_openmanage-H $ HOSTADDRESS $ -- only storage-p-s-B ctrl_fw = 0} # Check cpudefine command {command_name check_cpu command_line $ USER1 $/check_openmanage-H $ HOSTADDRESS $ -- only cpu-p-s-B ctrl_fw = 0} # Check memory define command {command_name check_memory command_line $ USER1 $/check_openmanage-H $ HOSTADDRESS $ -- only memory-p-s-B ctrl_fw = 0} # Check power define command {command_name check_power command_line $ USER1 $/check_openmanage-H $ HOSTADDRESS $ -- only power-p -s-B ctrl_fw = 0} # check the temperature define command {command_name check_temp command_line $ USER1 $/check_openmanage-H $ HOSTADDRESS $ -- only temp-p-s-w $ ARG1 $- c $ ARG2 $-B ctrl_fw = 0}
Here, -- only refers to monitoring only one item,-p is for drawing,-s is for status description, and-B is for blacklist, because our server firmware version is low, to remove other metrics from the blacklist.
2. Configure the Monitoring Service Group
define servicegroup { servicegroup_name dell-openmanage alias Dell server health status}
3. Configure the Monitoring Service
define service{ use local-service host_name usvr-131,usvr-119,usvr-70,usvr-71,usvr-72,usvr-73,usvr-82,usvr-83,usvr-84,usvr-85,usvr-86,usvr-87 service_description omsa_storage check_command check_storage service_groups dell-openmanage notifications_enabled 1 } define service{ use local-service host_name usvr-131,usvr-119,usvr-70,usvr-71,usvr-72,usvr-73,usvr-82,usvr-83,usvr-84,usvr-85,usvr-86,usvr-87 service_description omsa_cpu check_command check_cpu service_groups dell-openmanage notifications_enabled 1 } define service{ use local-service host_name usvr-131,usvr-119,usvr-70,usvr-71,usvr-72,usvr-73,usvr-82,usvr-83,usvr-84,usvr-85,usvr-86,usvr-87 service_description omsa_memory check_command check_memory service_groups dell-openmanage notifications_enabled 1 } define service{ use local-service host_name usvr-131,usvr-119,usvr-70,usvr-71,usvr-72,usvr-73,usvr-82,usvr-83,usvr-84,usvr-85,usvr-86,usvr-87 service_description omsa_power check_command check_power service_groups dell-openmanage notifications_enabled 1 } define service{ use local-service host_name usvr-131,usvr-119,usvr-70,usvr-71,usvr-72,usvr-73,usvr-82,usvr-83,usvr-84,usvr-85,usvr-86,usvr-87 service_description omsa_temp check_command check_temp!"0=30/15"!"0=40/10" service_groups dell-openmanage notifications_enabled 1 }
4. Check the configuration file and reload the configuration file.
Nagioscheck
Service nagios reload
Iv. Firewall Configuration
We use SNMP for monitoring. Therefore, we need to enable the snmp port udp 161 on the nagios server on the monitored side.
/Sbin/iptables-a input-I em1-p udp-s 10.10.5.89 -- dport 161-m comment -- comment "nagios snmp"-j ACCEPT
OK. Now the dell server hardware monitoring configuration is complete.