osas1111 / zabbix-scripts

Command line scripts for zabbix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zabbix_get_events

Perl script which recollects zabbix events, run zabbix_get_events --help to see which parameters take. Configure user / password / zabbix server at head of the script

zabbix_monit_active_pasive

Configuration

User, password y server of zabbix are configured on /etc/zabbix/zabbix_api.conf or ~/.zabbix_api.conf or the file passed at --config parameter The config file have a ini format: [zabbixapi] user=user password=password server=ip_or_name

Parameters

Python script which take 3 parameter (item, value and template), optionally a config file.

Use

Having any host with the template applied, and with an item which tell us if the host is in active mode or pasive mode, this script will enable or disable all the items belong to the template when the item have the value passed by parameter. It will never disable the item which say if the host is master or slave. Note that the value is the value of the item when the host is in active mode

Example

We are using it on production, for monitoring ActiveMQ (I will publish zabbix template (for the moment in spanish)):

python /opt/scripts/zabbix_monit_active_pasive \
	--item-key 'jmx["org.apache.activemq:type=Broker,brokerName={$BROKER}",Slave]' \
	--value false \
	--template Plantilla_ActiveMQ_MasterSlave \
	>> /var/log/zabbix/activemq.log 2>&1 

About

Command line scripts for zabbix


Languages

Language:Perl 65.6%Language:Python 34.4%