All Projects → pavlovdo → pystormon

pavlovdo / pystormon

Licence: other
Zabbix storage monitoring via CIM/WBEM

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to pystormon

zabbix-nvidia-smi-integration
The Zabbix template for monitoring Nvidia graphics cards.
Stars: ✭ 22 (+69.23%)
Mutual labels:  zabbix
zabbix-module-sockets
A Zabbix loadable module to monitor Linux Sockets
Stars: ✭ 16 (+23.08%)
Mutual labels:  zabbix
orazabbix
Oracle database Monitoring via Zabbix
Stars: ✭ 18 (+38.46%)
Mutual labels:  zabbix
unifiZabbix
Zabbix templates to monitor pretty much all Unifi devices
Stars: ✭ 66 (+407.69%)
Mutual labels:  zabbix
zabbix-review-export-import
Clone of zabbix-review-export with added import object(s) feature
Stars: ✭ 36 (+176.92%)
Mutual labels:  zabbix
rabe-zabbix
Collection of various Zabbix templates and helper scripts created or used by Radio Bern RaBe
Stars: ✭ 93 (+615.38%)
Mutual labels:  zabbix
collection-of-zabbix-templates
一堆zabbix模板和笔记
Stars: ✭ 90 (+592.31%)
Mutual labels:  zabbix
libzbxpgsql
Monitor PostgreSQL with Zabbix
Stars: ✭ 150 (+1053.85%)
Mutual labels:  zabbix
execute-engine
基于Ansible API的任务执行引擎,支持adhoc和playbook两种任务的执行
Stars: ✭ 18 (+38.46%)
Mutual labels:  zabbix
weixin-alert
企业微信告警发送
Stars: ✭ 51 (+292.31%)
Mutual labels:  zabbix
zabbixapi-php
Zabbix API client for PHP with session cache and SSL management
Stars: ✭ 32 (+146.15%)
Mutual labels:  zabbix
zabbix-monitor
monitor system based on zabbix API pyzaabix grafana
Stars: ✭ 70 (+438.46%)
Mutual labels:  zabbix
docker-formio-api
Docker Form.io Server based on Debian w/s6 init, Zabbix Monitoring
Stars: ✭ 14 (+7.69%)
Mutual labels:  zabbix
ZbxWallboard
Wallboard with active triggers/problems of Zabbix Monitoring
Stars: ✭ 17 (+30.77%)
Mutual labels:  zabbix
zapgix
Zabbix Agent - PostgreSQL
Stars: ✭ 22 (+69.23%)
Mutual labels:  zabbix
Graphical notifications Zabbix
No description or website provided.
Stars: ✭ 77 (+492.31%)
Mutual labels:  zabbix
influxdb-zabbix
Gather data from Zabbix back-end and load to InfluxDB in near real-time for enhanced performance and easier usage with Grafana.
Stars: ✭ 69 (+430.77%)
Mutual labels:  zabbix
zabbix-models
zabbix 模板 ansible api
Stars: ✭ 28 (+115.38%)
Mutual labels:  zabbix
centos-script
🎉centos下工具安装脚本,包含基础环境配置,Gitlab、Docker、LDAP、MongoDB、MySQL、RabbitMQ、Supervisor、Node、Python、zsh、rar、zabbix、k8s、prometheus、grafana等🎉
Stars: ✭ 121 (+830.77%)
Mutual labels:  zabbix
WSFC
Windows Server Failover Cluster (WSFC) metrics fetcher
Stars: ✭ 21 (+61.54%)
Mutual labels:  zabbix

Description

Zabbix Storage Monitoring via CIM/WBEM

Requirements

  1. python >= 3.6

  2. python module pywbem: connect and get information from storage via CIM/WBEM

  3. zabbix-server (tested with versions 4.4-5.2)

  4. python module py-zabbix: sending traps to zabbix

Installation

  1. Give access to storage statistic and parameters of your storages for monitoring user. For collect statistic under user zabbix from IBM Storwize:
chuser -usergrp RestrictedAdmin zabbix
  1. Tune statistic collection interval. For collect statistic every minute from IBM Storwize:
startstats -interval 1
  1. Clone pystormon repo to directory /etc/zabbix/externalscripts of monitoring server:
sudo mkdir -p /etc/zabbix/externalscripts
sudo git clone https://github.com/pavlovdo/pystormon /etc/zabbix/externalscripts/pystormon
cd /etc/zabbix/externalscripts/pystormon
  1. A) Check execute permissions for scripts:
ls -l *.py *.sh

B) If not:

sudo chmod +x *.py *.sh
  1. Change example configuration files pystormon.conf: storages login/password, address of zabbix_server;

  2. Change example configuration files devices.conf: IP and hostnames of storages;

  3. Give and check network access from monitoring server to storage management network CIM/WBEM port (TCP/5989);

  4. Check configuration and running zabbix trappers on your zabbix server or proxy:

### Option: StartTrappers
#       Number of pre-forked instances of trappers.
#       Trappers accept incoming connections from Zabbix sender, active agents and active proxies.
#       At least one trapper process must be running to display server availability and view queue
#       in the frontend.
#
# Mandatory: no
# Range: 0-1000
# Default:
# StartTrappers=5
# ps aux | grep trapper
zabbix    776389  0.2  0.4 2049416 111772 ?      S    дек07  63:41 /usr/sbin/zabbix_server: trapper #1 [processed data in 0.000166 sec, waiting for connection]
zabbix    776390  0.2  0.4 2049512 112016 ?      S    дек07  63:43 /usr/sbin/zabbix_server: trapper #2 [processed data in 0.000342 sec, waiting for connection]
zabbix    776391  0.2  0.4 2049452 112092 ?      S    дек07  63:12 /usr/sbin/zabbix_server: trapper #3 [processed data in 0.000301 sec, waiting for connection]
zabbix    776392  0.2  0.4 2049600 112064 ?      S    дек07  63:57 /usr/sbin/zabbix_server: trapper #4 [processed data in 0.000187 sec, waiting for connection]
zabbix    776393  0.2  0.4 2049412 111836 ?      S    дек07  63:31 /usr/sbin/zabbix_server: trapper #5 [processed data in 0.000176 sec, waiting for connection]
  1. Import template Storage Pystormon.json to Zabbix, if use Zabbix 5.2, and Storage Pystormon 4.4.xml (no more support) for Zabbix 4.4;

  2. Create your storage hosts in Zabbix and link template Storage Pystormon to it. In host configuration set parameters "Host name" and "IP address" for Agent Interface. Use the same hostname as in the file devices.conf, storwize.example.com for example.

  3. Further you have options: run scripts from host or run scripts from docker container.

If you want to run scripts from host:

A) Install Python 3 and pip3 if it is not installed;

B) Install required python modules:

pip3 install -r requirements.txt

C) Create cron jobs for zabbix trappers:

echo "00 */1 * * *  /etc/zabbix/externalscripts/pystormon/storage_objects_discovery.py 1> /dev/null" > /tmp/crontab && \
echo "*/5 * * * *   /etc/zabbix/externalscripts/pystormon/storage_objects_status.py 1> /dev/null" >> /tmp/crontab && \
echo "*/1 * * * *   /etc/zabbix/externalscripts/pystormon/storage_perfomance.py 1> /dev/null" >> /tmp/crontab && \
crontab /tmp/crontab && rm /tmp/crontab

If you want to run scripts from docker container:

A) Run build.sh:

cd /etc/zabbix/externalscripts/pystormon
./build.sh

B) Run dockerrun.sh;

./dockerrun.sh

Notes

  1. You can add or remove monitoring of your storage cim classes and properties in file monitored_properties.json and in template Storage Pystormon. Storage CIM classes maps to Zabbix discoveries, and CIM class properties maps to Zabbix discoveries items.

  2. You can change perfomance macros values in template Storage Pystormon (for Zabbix 5.2 templates);

  3. For send exception alarms via slack hook to your slack channel, set parameter slack_hook in conf.d/pystormon.conf. More details in https://api.slack.com/messaging/webhooks

  4. You can print all names/values from those storage CIM classes that exist in monitored_properties.json, via script storage_cim_print.py. It get CIM classes from monitored_properties.json and print all names/values for its.

  5. If you start storage_cim_print.py and get empty values for some classes, for example classes IBMTSSVC_StorageVolume, IBMTSSVC_StorageVolumeStatistics, check that you create corresponding objects (VDisks in our example) on your storage;

  6. You can print any storage CIM class and it property's names/values via script storage_cim_print_search.py. For that you have to create directory with your username permissions for detected_properties_file:

sudo mkdir /var/tmp/pystormon && sudo chown username /var/tmp/pystormon

And now you set search substrings via script arguments, for example:

/etc/zabbix/externalscripts/pystormon/storage_cim_print_search.py FC iSCSI

In result you get output of property's names and values of all storage CIM classes that contain word 'FC' and 'iSCSI' (case sensitive) to console and to file set by config parameter detected_properties_file (see pystormon.conf):

$ cat /var/tmp/pystormon/detected_properties.txt
Device: storwize.example.com CIM class: IBMTSSVC_iSCSICapabilities
Property: Caption, Value: None
 
Device: storwize1.example.com, CIM class: IBMTSSVC_iSCSICapabilities
Property: Description, Value: None
...

Tested

IBM Storwize v3700/v5010/v5030/v7000, software versions 7.8.x - 8.3.x

Zabbix 5.2

Related Links

http://pywbem.github.io/pywbem/

https://www.snia.org/forums/smi/knowledge/smis-getting-started/smi_architecture

https://www.ibm.com/support/knowledgecenter/STHGUJ_8.3.1/com.ibm.storwize.tb5.831.doc/svc_cim_main.html

https://github.com/adubkov/py-zabbix

https://api.slack.com/messaging/webhooks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].