Ubuntu

Collect MySQL Size in Zabbix on Ubuntu 12.04 LTS

Posted on

If you have a lot of such entries

sh: 1: [[: not found
sh: 1: : Permission denied

in your zabbix_agentd.log and you are on Ubuntu 12.04 LTS then you have the dash shell as /bin/sh DashAsBinSh

I have used the following setup to solve this issue.

vi /etc/zabbix/mysql_size.sh

#!/bin/bash

echo "select sum($(case "$3" in both|"") echo "data_length+index_length";; data|index) echo "$3_length";; free) echo "data_free";; esac)) from information_schema.tables$([[ "$1" = "all" || ! "$1" ]] || echo " where table_schema='$1'")$([[ "$2" = "all" || ! "$2" ]] || echo "and table_name='$2'");" | HOME=/var/lib/zabbix mysql -N

chmod 755 /etc/zabbix/mysql_size.sh

and changed the original line in

userparameter_mysql.conf

to
UserParameter=mysql.size[*],/etc/zabbix/mysql_size.sh $1 $2 $3

evolution on ubuntu 9.10

Posted on

I have tried to use the latest evolution sources, as described in

http://mad-scientist.us/evolution.html => how to use it

before you can start to build the evolution  you will need to install the following packages

sudo aptitude install libnspr4-dev libnss3-dev ccache evolution-dev git-core gperf gtk-doc-tools libcanberra-gtk-dev libdb-dev libdbus-glib-1-dev libdcerpc-dev libffi-dev libgnome-desktop-dev libgstreamer0.10-dev libgtkhtml-editor-dev libgtkimageview-dev libhal-dev libical-dev libkrb5-dev libldap2-dev libmapi-dev libparse-pidl-perl libproxy-dev libpst-dev libsamba-hostconfig-dev libtalloc-dev libtiff4-dev libtorture-dev libunique-dev network-manager-dev python-dev tdb-dev

You will not be able to build due to the follwoing error.

http://packages.ubuntu.com/search?searchon=contents&keywords=introspection.m4&mode=filename&suite=karmic&arch=any

Which means no introspection.m4

If anybody is able to help to fix this issue => Thank you for your help 😉