In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces you how to carry out dell physical server hardware disk monitoring, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Physical server hardware disk monitoring:
First: install Megacli and zabbix_sender
MegaCli
Reference: http://tenderrain.blog.51cto.com/9202912/1639865
Rpm-ivh megacli-8.02.21-1-mdv2012.0.x86_64.rpm
View the installation path (different installation package paths may be different)
Rpm-ql megacli-8.02.21-1.x86_64
/ sbin/megacli
/ usr/share/doc/megacli
/ usr/share/doc/megacli/8.02.21_MegaCLI.txt
Zabbix_sender
It is installed by default. If you do not have this command, you can copy it from another server.
Second:
# deployment script
File one: / usr/local/raid_and_disk_check.sh
# / bin/bash
# Function:
# 1.check raid Degraded
# 2.check Failed Disks
Zabbix_sender-c / etc/zabbix/zabbix_agentd.conf-k "raid_degraded"-o `sudo megacli-AdpAllInfo-aALL-NoLog | grep "Degraded" | awk'{print $NF}'`- r
Zabbix_sender-c / etc/zabbix/zabbix_agentd.conf-k "raid_failed_disks"-o `sudo megacli-AdpAllInfo-aALL-NoLog | grep "Failed Disks" | awk'{print $NF}'`- r
Chown zabbix.zabbix / usr/local/raid_and_disk_check.sh
Chmod + x / usr/local/raid_and_disk_check.sh
File 2: / usr/local/disk_id_discover.sh
#! / bin/bash
# Function:
# 1.check Disk of Slot Number
Num=0
RAID_stats () {
DISK= ($(sudo megacli-pdlist-aALL | grep "Slot Number" | awk-F ":"'{print $2}'))
Printf'{\ n\ t "data": [\ n'
For key in ${DISK [@]}; do
If [["${# DISK [@]}"-gt "$num" & & "$num"-ne "$((${# DISK [@]}-1)"]; then
Printf "\ t\" {# RAID_ID}\ ":\" $key\ ",\ n"
Let "num++"
Elif [["$((${# DISK [@]}-1))"-eq "$num"]]; then
Printf "\ t\" {# RAID_ID}\ ":\" $key\ "}\ n"
Fi
Done
Printf'\ t]\ n}\ n'
}
RAID_stats
Chown zabbix.zabbix / usr/local/disk_id_discover.sh
Chmod + x / usr/local/disk_id_discover.sh
Note:
-megacli: change to the correct path
-make sure the zabbix user has permission to use this command
-the data generated by disk_id_discover.sh is in dictionary format
Third, modify the configuration file of zabbix:
Backup:
\ cp-r / etc/zabbix/zabbix_agentd.conf / etc/zabbix/zabbix_agentd.conf.bak
Modify:
Cat > > / etc/zabbix/zabbix_agentd.conf > / etc/sudoers
Sed-I's / ^ defaults. * .roomretty / # Defaults requiretty/' / etc/sudoers
Fifth:
Restart the zabbix service
Sixth: add to crontab
Echo "01 02 * root / usr/local/raid_and_disk_check.sh > / dev/null 2 > & 1" > > / etc/crontab
Echo "01 02 * root / usr/local/disk_id_discover.sh > / dev/null 2 > & 1" > > / etc/crontab
Seventh: zabbix template settings, omitted here, add the template reference attachment RAID_and_disk_check_for_dell (may need to be slightly modified)
Attachment: http://down.51cto.com/data/2366642
On how to carry out dell physical server hardware disk monitoring is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.