Giter Site home page Giter Site logo

pawsanie / hp_raid-battery_status_monitoring Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 25 KB

A few scripts for monitoring of old HP storage servers with zabbix-agent. A few ansible roles in playbook for deployment scripts.

License: BSD Zero Clause License

Shell 100.00%
bash bash-script hpe-storage ilo monitoring ssacli zabbix zabbix-agent zabbix-templates ansible

hp_raid-battery_status_monitoring's Introduction

HP raid/battery status monitoring.

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.

Disclaimer:

โš ๏ธUsing some or all of the elements of this code, You assume responsibility for any consequences!

โš ๏ธThe licenses for the technologies on which the code depends are subject to change by their authors.

โš ๏ธPlease note that these monitoring scripts are intended for servers Hewlett Packard and uses the "hpssacli" utility.
โš ๏ธThis means that you may need a paid subscription or license or their equivalent to use HP software on your machines.


Required:

The monitoring code is written in bash and obviously depends on it.
Bash [GPL-3.0 license]:

Required Applications:

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.
โš ๏ธAdditional charges may apply to use the app.:warning:
Read more on the manufacturer's official website

Ansible [GPL-3.0 license / proprietary (See developer site)]:

For deployment with ansible, if necessary.

Preparing Zabbix agent for monitoring:

  1. Copy the files from the "Scripts" folder to the specified folder on your monitored node.
/etc/zabbix/zabbix_agentd.d/scripts/
  1. Copy the files from the "Zabbix-Agent_configs" folder to the specified folder on your monitored node.
/etc/zabbix/zabbix_agentd.d/
  1. Restart the zabbix agent on the monitored node.
    As an example with bash on CenOs7 servers:
systemctl restart zabbix-agent

Preparing Zabbix server for monitoring:

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.

Deployment monitoring with Ansible:

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

List of Ansible roles in the playbook:

  • 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.

hp_raid-battery_status_monitoring's People

Contributors

pawsanie avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.