https://github.com/nicerath/zabbix-linuxha
Zabbix Template and Script to Monitor LinuxHA (CoroSync, Pacemaker, CRM)
https://github.com/nicerath/zabbix-linuxha
Last synced: 7 months ago
JSON representation
Zabbix Template and Script to Monitor LinuxHA (CoroSync, Pacemaker, CRM)
- Host: GitHub
- URL: https://github.com/nicerath/zabbix-linuxha
- Owner: NiceRath
- License: bsd-3-clause
- Created: 2024-05-15T12:12:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-15T14:54:22.000Z (about 2 years ago)
- Last Synced: 2024-12-28T10:36:20.801Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zabbix LinuxHA Monitoring
Tested on Debian.
## Install
* Copy the script `linuxha.py` to the target system (*executable by the zabbix user*)
* Copy the userparameter to the target system
* Add the `sudoers` privileges via `visudo -f /etc/sudoers.d/zabbix_linuxha`
* Restart the Zabbix Agent service
* Import the Template on your Zabbix Server
----
## Testing
On the target system:
```bash
root@SRV1:~$ su zabbix --login --shell /bin/bash
zabbix@SRV1:~$ python3 /usr/local/bin/zabbix/linuxha.py discover
> {"data": [{"{#LINHA_RES}": "resIP"}, {"{#LINHA_RES}": "resService"}]}
zabbix@SRV1:~$ python3 /usr/local/bin/zabbix/linuxha.py members
> 2
zabbix@SRV1:~$ python3 /usr/local/bin/zabbix/linuxha.py members_active
> 2
zabbix@SRV1:~$ python3 /usr/local/bin/zabbix/linuxha.py votes
> 1
zabbix@SRV1:~$ python3 /usr/local/bin/zabbix/linuxha.py quorum
> 1
zabbix@SRV1:~$ python3 /usr/local/bin/zabbix/linuxha.py resource resIP
> 1
zabbix@SRV1:~$ python3 /usr/local/bin/zabbix/linuxha.py resource_active resIP
> 1
```
----
## Usage
The script expects all resources to have a name that starts with a prefix. By default `res`. You can change it in the script.
----
## Items
* Count of Members in the Cluster
* Count of active Members
* Got all expected quorum votes
* Has quorum
* Resource Discovery
* Resource is active on any node
* Resource is active on the current node
### Triggers
* Not all Members online (*avg*)
* No quorum (*high*)
* Missing quorum votes (*avg*)
* Resource Discovery
* Resource offline (inactive on all nodes) (*disaster*)