Thứ Năm, 18 tháng 6, 2020
Zabbix monitors Linux server hard disk status with HP vendor ssa tool
1, install ssacli package, rpm -ivh ssacli*.rpm
#Since the ssa tool is
officially customized for HP, it only supports installation on the HP server
(nonsense!!!);
Verify the installation: [root@localhost ~]# ssacli ctrl slot=0
pd all show status physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 900 GB): OK
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 900 GB): OK
2, install the
zabbix-agent client on the server, and configure the relevant settings (this
article does not elaborate, self-repair brain);
3. Edit the agent configuration
file [root@localhost /]# vim /etc/zabbix/zabbix_agentd.conf to enable the
function. And define the parameters. vim /etc/zabbix/zabbix_agentd.conf
4, use
the linux system's scheduled task function to execute the disk detection command
[root@localhost /]# crontab -l -u root 01 01 * * * /usr/sbin/ssacli ctrl slot=0
pd all show status | grep Failed|wc -l > /usr/local/sbin/diskinfo.txt
Description: Execute the command every day at 1:00 am and write the result
overlay to the txt file. Reason for using the task plan: If you write the ssacli
command directly to the script, you will find that zabbix always reports
permission errors when executing. Considering system security, it is not
recommended to modify the execution of the ssacli command. Permissions.
5, the
script content, in fact, is to read the command execution results.
[root@localhost /]# cat /usr/local/sbin/diskinfo_z.sh
Delete me#!/bin/bash
cat/usr/local/sbin/diskinfo.txt 6, add monitoring items
7, add trigger
8, add
graphics
Share This!
Đăng ký:
Đăng Nhận xét (Atom)
Không có nhận xét nào:
Đăng nhận xét