Currently Browsing: scripts

Backuping Full Database

Dump doesn’t work. If you have huge tables with billions of rows your backup process could become a nightmare, mainly if you need to restore it. This method aims to perform a full backup of a large MySQL database, as Zabbix (any version), focusing on a fast recovery from disaster. So I chose XtraBackup for this task, a backup tool from Percona, which works using the hotcopy mode. First, you need to download and install XtraBackup: http://www.percona.com/downloads/XtraBackup/LATEST/ XtraBackup offers a lot of parameters, so this script is intented to be the simplest possible. Make sure that...
read more

Backuping only the Zabbix Configuration

This script is a simple way to backup all configuration tables (eg. templates, hostgroups, hosts, triggers…) without the history data. If you need do a full backup (history included) I recommend you this post: http://zabbixzone.com/zabbix/backuping-full-database/ As the result is very small (around 30 MB), is possible run this backup many times per day. https://github.com/xsbr/zabbixzone/blob/master/zabbix-mysql-backupconf.sh #!/bin/bash # # zabbix-mysql-backupconf.sh # v0.2 - 20111105 # # Configuration Backup for Zabbix 1.8 w/MySQL # # Author: Ricardo...
read more

Easy Update on Custom Scripts

Every time that you need to add or change an UserParameter on zabbix_agentd.conf you need to restart the agent. It’s easy if you have less than 10 servers, but could be a trouble if you have more than 30 servers. Automation Tools like CFEngine and Puppet do this work well done, but unfortunately they aren’t used in many companies. But it’s possible using a Dynamic UserParameter: 1) add two lines on zabbix_agentd.conf and restart the agent: UserParameter=custom.getvalue[*],/etc/zabbix/zabbix_agentd/custom_getvalue $1 $2 $3 $4...
read more