CentOS7 Hardware Monitoring for Zabbix enterprise applications
I have introduced how to deploy hardware monitoring on Dell servers in CentOS5, 6, Ubuntu, and Windows systems. Recently I have been testing Docker clusters. Many cluster software rely on systemd of CentOS7, so I studied how to deploy hardware monitoring in CentOS7 Based on the Dell server.
The following is the information of the previous Hardware Monitoring article:
CentOS 5, 6 and Ubuntu Systems
Windows
The following figure shows
The installation steps are as follows:
1. Synchronize the rsync source to the local device.
By default, it is a foreign dell source. It is very slow to install omsa in China. If multiple servers are deployed with hardware monitoring, it is recommended to make it a local yum source.
1234567891011121314151617181920212223 [root @ puppet other] # cat rsync_dell_repo.sh
#! /Bin/bash
# Author: Deng Lei
# Email: [email protected]
Bwlimit = '000000'
Centos_version = 7
Remote_dir = "rsync: // linux.dell.com/repo/hardware/latest/platform_independent/rh1_centos_version1_0_64 /"
Local_dir = "/mnt/DELL/Centos-$ {centos_version}/x86_64 /"
If [! -D $ rsync_dir]; then
Mkdir-p $ rsync_dir
Fi
Function check (){
If [$? -Eq 0]; then
Echo "'date' + % Y-% m-% d % t' rsync $1 to $2 is success! "
Else
Echo "'date' + % Y-% m-% d % t' rsync $1 to $2 is fail! "
Fi
}
For I in srvadmin-x86_64 srvadmin-x86_64-meta firmware-tools repodata
Do
Rsync-avrt -- delete -- no-iconv -- bwlimit = $ bwlimit $ {remote_dir }$ {I}/$ {local_dir} $ I
Check $ {remote_dir} $ I $ {local_dir} $ I
Done
For ease of use, I directly wrote a shell script. You can modify it as needed. The running method is sh rsync_dell_repo.sh.
The result is
[Root @ puppet other] # ll/mnt/DELL/Centos-7/x86_64/
Total 16
Drwxr-xr-x 2 3000044 3000044 4096 Apr 15 firmware-tools
Drwxr-xr-x 2 3000044 3000044 4096 Apr 17 repodata
Drwxr-xr-x 2 3000044 3000044 4096 Apr 17 srvadmin-x86_64
Drwxr-xr-x 2 3000044 3000044 4096 Apr 6 srvadmin-x86_64-meta
There are many official directories, but these four are useful.
2. repo of yum
# Cat CentOS7-Base-ChuKong.repo [root @ puppet repo_list] #
[DELL]
Name = CentOS-Dell-omsa $ basearch
Baseurl = http://yum-server-external.ops.xxx.net/dell/centos-7/?basearch
Enable = 1
Gpgcheck = 0
To prevent information leakage, I changed my domain name to xxx.
3. Install omsa
Yum-y install srvadmin-all
Then wait for the result.
I have encapsulated zabbix here and automatically installed it with one click, as shown below:
4. Enable and disable services
I have also written the configuration file of systemd and configured it automatically in my own script, as shown below:
[Root @ ip-10-10-125-8 ~] # Cat/usr/lib/systemd/system/zabbix_agentd.service
[Unit]
Description = Zabbix Agent
After1_syslog.tar get
Afterdomainnetwork.tar get
[Service]
Environment = "CONFFILE =/usr/local/zabbix/conf/zabbix_agentd.conf"
Type = forking
Restart = always
PIDFile =/var/log/zabbix/zabbix_agentd.pid
KillMode = process
ExecStart =/usr/local/zabbix/sbin/zabbix_agentd-c $ CONFFILE
ExecStop =/bin/sh-c "kill-9 'cat $ pidfile'; rm-rf $ PIDFile"
[Install]
Wantedbypolicmulti-user.tar get
Modify the information as needed
To address this problem, we suggest you change the signal set to one level. For database and web applications, the signal set is used a lot. The default 256 is not enough. I generally change it to 2048.
Kernel. sem = 250 32000 32 2048
If you have any questions, please leave a message and I will answer them in time.
Some Zabbix Tutorials:
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy Zabbix in CentOS 6.3
Zabbix distributed monitoring system practice
Under CentOS 6.3, Zabbix monitors apache server-status
Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3
Install Zabbix 2.0.6 in 64-bit CentOS 6.2
ZABBIX details: click here
ZABBIX: click here
This article permanently updates the link address: