Monitoring scripts solve the problem of not being able to otherwise get the necessary data on some old HP-iLO servers.
It's specifically about:
- 🏧A status of the raids of physical disks.
- 🧮Status of logical disks.
- 🔋Motherboard battery status.
The monitoring code is written in bash and obviously depends on it.
Bash [GPL-3.0 license]:
Zabbix [GPL-2.0 license]:
Despite the fact that you can easily change the work of scripts for any kind of monitoring,
the configurations and templates in the repository are designed to work with Zabbix.
HPE Smart Storage Administrator Client (HP-ssacli):
Monitoring is based on parsing output to the terminal from the "hpssacli" application.
Without this application, the work of scripts is not possible.
Read more on the manufacturer's official website
Ansible [GPL-3.0 license / proprietary (See developer site)]:
For deployment with ansible, if necessary.
- Copy the files from the "Scripts" folder to the specified folder on your monitored node.
/etc/zabbix/zabbix_agentd.d/scripts/
- Copy the files from the "Zabbix-Agent_configs" folder to the specified folder on your monitored node.
/etc/zabbix/zabbix_agentd.d/
- Restart the zabbix agent on the monitored node.
As an example with bash on CenOs7 servers:
systemctl restart zabbix-agent
Apply template "zbx_raid_battery_templates.xml" to Zabbix server.
File location:
./📂HP_raid-battery_status_monitoring
└── 📁Zabbix-Server_Template
└── 📄zbx_raid_battery_templates.xml
You can read more about this in the official documentation.
Copy the contents of folders "Scripts" and "Zabbix-Agent_configs" to "files" folder of "copying-monitoring-scripts" ansible role.
"files" folder of role location:
./📂HP_raid-battery_status_monitoring
└── 📁Ansible-Playbook
└── 📁roles
└── 📁copying-monitoring-scripts
└── 📁files
Then fill in the hosts file for the ansible playbook with the actual data.
"hosts" file location:
./📂HP_raid-battery_status_monitoring
└── 📁Ansible-Playbook
└── 📁Inventory
└── 📄hosts
Example of hosts file in 'Inventory' folder':
[group_hpraid_search]
0.0.0.0
your.dns_name.domen
[group_hpraid_search:vars]
ansible_user=user_name
ansible_ssh_pass=user_password
Run the ansible playbook:
ansible-playbook raid-battary_zabbix.yml
- copying-monitoring-scripts:
Copies configurations for zabbix-agent to the folder '/etc/zabbix/zabbix_agentd.d/'.
Copies monitoring scripts to the folder '/etc/zabbix/zabbix_agentd.d/scripts/'. - debian-sudo-install:
Installs 'sudo' on a debian machine using the 'apt' module.
Without this modification, zabbix-agent will not collect the necessary information about disks and send it to the server, from machines running debian-based operating systems. - sudo-scripts-settings:
Copies the configuration sudo include in '/etc/sudoers.d/' folder.
This configuration implies the right to execute only 'hpssacli', and only with the 'ctrl all show config detail' key, on any machine.
Sudo is required to execute the desired command. - zabbix-agent-restart:
Restarts the zabbix-agent on the node.
Thank you for your interest in my work.