5.02021-11-21T21:32:10ZTemplatesGluster StorageGluster Storage## Overview
This project was created to monitor Gluster Storage with Zabbix. In this repository there are two files. One python script that calls [gstatus](https://github.com/gluster/gstatus), discovering gluster volumes and print data we want, according to the arguments given. You have to install gstatus [gstatus](https://github.com/gluster/gstatus)
You should save the script in any directory you want, in order to do it executable from zabbix user using sudo. You have to create a file in /etc/zabbix/zabbix\_server.conf.d/ and add UserParameters:
* You should save the script in any directory you want, do it executable from zabbix user using sudo.
* You have to create a file in /etc/zabbix/zabbix\_server.conf.d/ and add UserParameters: ... UserParameter=gluster\_volume\_info[*],sudo /path/gstatus\_discovery.py $1 $2 UserParameter=gluster\_storage\_info[*],sudo /path/gstatus\_discovery.py $1 UserParameter=gluster\_volume\_info,sudo /path/gstatus\_discovery.py
* The last one shoud be import zabbix\_template.xml in zabbix
You can check my [github repository](https://github.com/MrCirca/zabbix-glusterfs)
## Author
MrCirca
Templates- Gluster Storage % Free SpaceCALCULATEDgluster_storage_free_space2m%100*((last("gluster_storage_info[\"usable_capacity\"]")-last("gluster_storage_info[\"used_capacity\"]"))/last("gluster_storage_info[\"usable_capacity\"]"))
- Gluster Storage Active Nodesgluster_storage_info["nodes_active"]2m
- Gluster Storage Nodesgluster_storage_info["node_count"]2m
- Gluster Storage raw capacitygluster_storage_info["raw_capacity"]2mb
- Gluster Storage Self Heal Activegluster_storage_info["sh_active"]2m
- Gluster Storage Self Heal Enabledgluster_storage_info["sh_enabled"]2m
- Gluster Storage Snapshotsgluster_storage_info["snapshot_count"]2m
- Gluster Storage statusgluster_storage_info["status"]2m0TEXT{str(healthy)}=0Gluster volume status is UnhealthyWARNING
- Gluster Storage Total Sizegluster_storage_info["usable_capacity"]2mb
- Gluster Storage Used Sizegluster_storage_info["used_capacity"]2mb
- Gluster Storage Volume Numbergluster_storage_info["volume_count"]2m
Gluster Volume Names Discoverygluster_volume_name.discovery30sGluster Volume % Free Space {#VOLUME_NAME}CALCULATEDgluster_volume_free_space[{#VOLUME_NAME}]30s%100*((last("gluster_volume_info[\"usable_capacity\",{#VOLUME_NAME}]")-last("gluster_volume_info[\"used_capacity\",{#VOLUME_NAME}]"))/last("gluster_volume_info[\"usable_capacity\",{#VOLUME_NAME}]")){last(,5m)}<20Gluster Volume Free Space is less than 20%WARNINGGluster Volume snapshot_count on {#VOLUME_NAME}gluster_volume_info["snapshot_count",{#VOLUME_NAME}]30sGluster Volume state on {#VOLUME_NAME}gluster_volume_info["state",{#VOLUME_NAME}]30s0TEXT{str(up)}=0Gluster Volume state in {#VOLUME_NAME} is downWARNINGGluster Volume Total Size on {#VOLUME_NAME}gluster_volume_info["usable_capacity",{#VOLUME_NAME}]30sbGluster Volume Used Size on {#VOLUME_NAME}gluster_volume_info["used_capacity",{#VOLUME_NAME}]30sb{Gluster Storage:gluster_storage_info["nodes_active"].last()} < {Gluster Storage:gluster_storage_info["node_count"].last()}Gluster storage nodes is not onlineINFO