{"id":14984504,"url":"https://github.com/pawsanie/hp_raid-battery_status_monitoring","last_synced_at":"2026-01-03T00:49:11.852Z","repository":{"id":158648151,"uuid":"597825112","full_name":"Pawsanie/HP_raid-battery_status_monitoring","owner":"Pawsanie","description":"A few scripts for monitoring of old HP storage servers with zabbix-agent. A few ansible roles in playbook for deployment scripts.","archived":false,"fork":false,"pushed_at":"2023-02-07T15:12:41.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T19:17:38.884Z","etag":null,"topics":["ansible","ansible-playbook","ansible-role","ansible-roles","bash","bash-script","hpe-storage","ilo","monitoring","ssacli","zabbix","zabbix-agent","zabbix-templates"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pawsanie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-05T18:45:50.000Z","updated_at":"2024-03-24T00:36:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3dfc411-772c-4560-9348-0e244d7e0f7b","html_url":"https://github.com/Pawsanie/HP_raid-battery_status_monitoring","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"e8172b00b7a33c24f76c0f74a9f05b70643df2ca"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pawsanie%2FHP_raid-battery_status_monitoring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pawsanie%2FHP_raid-battery_status_monitoring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pawsanie%2FHP_raid-battery_status_monitoring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pawsanie%2FHP_raid-battery_status_monitoring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pawsanie","download_url":"https://codeload.github.com/Pawsanie/HP_raid-battery_status_monitoring/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243918630,"owners_count":20368745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-playbook","ansible-role","ansible-roles","bash","bash-script","hpe-storage","ilo","monitoring","ssacli","zabbix","zabbix-agent","zabbix-templates"],"created_at":"2024-09-24T14:09:10.755Z","updated_at":"2026-01-03T00:49:11.812Z","avatar_url":"https://github.com/Pawsanie.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HP raid/battery status monitoring.\n\nMonitoring scripts solve the problem of not being able to otherwise get the necessary data on some old [HP-iLO](https://www.hpe.com/emea_europe/en/hpe-integrated-lights-out-ilo.html) servers.\n\nIt's specifically about:\n* :atm:A status of the raids of physical disks.\n* :abacus:Status of logical disks.\n* :battery:Motherboard battery status.\n\n## Disclaimer:\n:warning:**Using** some or all of the elements of this code, **You** assume **responsibility for any consequences!**\u003cbr\u003e\n\n:warning:The **licenses** for the technologies on which the code **depends** are subject to **change by their authors**.\u003cbr\u003e\n\n:warning:Please note that these monitoring scripts are intended for servers **Hewlett Packard** and uses the **\"hpssacli\"** utility.\u003cbr\u003e\n:warning:This means that you **may need a paid subscription or license or their equivalent** to use HP software on your machines.\u003cbr\u003e\u003cbr\u003e\n\n___\n\n## Required:\nThe monitoring code is written in bash and obviously depends on it.\u003cbr\u003e\n**Bash** [GPL-3.0 license]:\n* :octocat:[Bash GitHub](https://github.com/gitGNU/gnu_bash)\n* :bookmark_tabs:[Bash internet page](https://www.gnu.org/software/bash/)\n\n## Required Applications:\n**Zabbix** [GPL-2.0 license]:\n* :octocat:[Zabbix GitHub](https://github.com/zabbix/zabbix)\n* :bookmark_tabs:[Zabbix internet page](https://www.zabbix.com/)\n\nDespite the fact that you can easily change the work of scripts for any kind of monitoring, \u003cbr\u003e\nthe configurations and templates in the repository are designed to work with Zabbix.\n\n**HPE Smart Storage Administrator Client (HP-ssacli)**:\n* :bookmark_tabs:[Hewlett Packard Enterprise internet page](https://www.hpe.com/)\n* :bookmark_tabs:[HPE-ssacli internet page](https://support.hpe.com/connect/s/product?language=en_US\u0026kmpmoid=5409145\u0026tab=driversAndSoftware)\n\nMonitoring is based on parsing output to the terminal from the \"hpssacli\" application.\u003cbr\u003e\n**Without this application**, the work of scripts is **not possible**.\u003cbr\u003e\n:warning:**Additional charges may apply** to use the app.:warning:\u003cbr\u003e\nRead more on the manufacturer's [official website](https://www.hpe.com/)\n\n**Ansible** [GPL-3.0 license / proprietary (See developer site)]:\n* :octocat:[Ansible GitHub](https://github.com/ansible/ansible)\n* :bookmark_tabs:[Ansible internet page](https://www.ansible.com/)\n\nFor deployment with ansible, if necessary.\n\n## Preparing Zabbix agent for monitoring:\n1) Copy the files from the \"Scripts\" folder to the specified folder on your monitored node.\n```text\n/etc/zabbix/zabbix_agentd.d/scripts/\n```\n2) Copy the files from the \"Zabbix-Agent_configs\" folder to the specified folder on your monitored node.\n```text\n/etc/zabbix/zabbix_agentd.d/\n```\n3) Restart the zabbix agent on the monitored node.\u003cbr\u003e\n**As an example with bash on CenOs7 servers:**\u003cbr\u003e\n```bash\nsystemctl restart zabbix-agent\n```\n## Preparing Zabbix server for monitoring:\nApply template \"zbx_raid_battery_templates.xml\" to Zabbix server.\u003cbr\u003e\n**File location:**\u003cbr\u003e\n**./**:open_file_folder:HP_raid-battery_status_monitoring\u003cbr\u003e\n   └── :file_folder:Zabbix-Server_Template\u003cbr\u003e\n            └── :page_facing_up:zbx_raid_battery_templates.xml\n\nYou can read more about this in the [official documentation](https://www.zabbix.com/documentation/6.0/en/manual/xml_export_import/templates#importing).\n\n## Deployment monitoring with Ansible:\nCopy the contents of folders \"**Scripts**\" and \"**Zabbix-Agent_configs**\" to \"files\" folder of \"**copying-monitoring-scripts**\" ansible role.\u003cbr\u003e\n**\"files\" folder of role location:**\u003cbr\u003e\n**./**:open_file_folder:HP_raid-battery_status_monitoring\u003cbr\u003e\n   └── :file_folder:Ansible-Playbook\u003cbr\u003e\n            └── :file_folder:roles\u003cbr\u003e\n                     └── :file_folder:copying-monitoring-scripts\u003cbr\u003e\n                              └── :file_folder:files\u003cbr\u003e\n\nThen fill in the hosts file for the ansible playbook with the actual data.\u003cbr\u003e\n**\"hosts\" file location:**\u003cbr\u003e\n**./**:open_file_folder:HP_raid-battery_status_monitoring\u003cbr\u003e\n   └── :file_folder:Ansible-Playbook\u003cbr\u003e\n            └── :file_folder:Inventory\u003cbr\u003e\n                     └── :page_facing_up:hosts\u003cbr\u003e\n**Example of hosts file in 'Inventory' folder':**\n```text\n[group_hpraid_search]\n0.0.0.0\nyour.dns_name.domen\n\n[group_hpraid_search:vars]\nansible_user=user_name\nansible_ssh_pass=user_password\n```\nRun the ansible playbook:\u003cbr\u003e\n```bash\nansible-playbook raid-battary_zabbix.yml\n```\n\n### List of Ansible roles in the playbook:\n* **copying-monitoring-scripts**:\u003cbr\u003e\nCopies configurations for zabbix-agent to the folder '/etc/zabbix/zabbix_agentd.d/'.\u003cbr\u003e\nCopies monitoring scripts to the folder '/etc/zabbix/zabbix_agentd.d/scripts/'.\n* **debian-sudo-install**:\u003cbr\u003e\nInstalls 'sudo' on a debian machine using the 'apt' module.\u003cbr\u003e\nWithout 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.\n* **sudo-scripts-settings**:\u003cbr\u003e\nCopies the configuration sudo include in '/etc/sudoers.d/' folder.\u003cbr\u003e\nThis configuration implies the right to execute only 'hpssacli', and only with the 'ctrl all show config detail' key, on any machine.\u003cbr\u003e\nSudo is required to execute the desired command.\n* **zabbix-agent-restart**:\u003cbr\u003e\nRestarts the zabbix-agent on the node.\n\n***\n\n**Thank you** for your interest in my work.\u003cbr\u003e\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawsanie%2Fhp_raid-battery_status_monitoring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpawsanie%2Fhp_raid-battery_status_monitoring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawsanie%2Fhp_raid-battery_status_monitoring/lists"}