The concept of zabbix is little different, its time consuming to understand its working. You can find the installation procedures of zabbix server and client from the link below.

zabbix installation
After the installation, log in with the admin username and password. From the administration tab we can create new user groups and users.
Next to that in Mediatype tab where we can configure smtp server, sms modems and jabber gateways for each groups and for each users.
And from the configuration tab we can create new hosts, provide ips and link specfic templates (contains Items for common operating systems checks, such as Linux, Solaris, MAC OS X and Windows systems) and save it. Their will be many built in template from which we can choose or we can import a specific template from xml file.
Each template may contain built in applications like (CPU, Filesystems, Security etc) and under each application their will be built in items which can be considered the "data collectors". Custom scripts can also be created as items.
While creating an item, we need to specify a key. This field is the "expression" that Zabbix will check. It can be a built-in key, such as the free disk space item (vfs.fs.size[/,free]) or a custom script that you wrote. We can refer the expressions from the zabbix manual.
A trigger monitors the data that the Items collects. If the data exceeds a configured threshold, it's assigned to one of the severity levels. The Expression field in the trigger maps what Item the Trigger is going to monitor and what its thresholds are.
Example:- Expression is configured as {Template_Linux:vfs.fs.size[/,pfree].last(0)}<10" for alerting the above mentioned free disk space item when the disk space is above 80%.
Actions occur when a trigger is activated. They can be via e-mail, Jabber, SMS message or running a remote script. For configuring an action to e-mail the admin if any trigger with level Disaster has been activated. Select Configuration→Actions, and then the Create Action button on the right-hand side of the screen. Choose Trigger severity from the New Condition area, and change the severity level from Information to Disaster. Click Add when finished. Next, select the New button in the Action operations area. Configure the operation to send a message to a single user named admin. Specify conditions and specify operations what to do ..
How to add mysql monitoring support to zabbix.
Download package - zabbix-mysql.tar.gz
From the mysql server, Make sure the zabbix agent is installed.
Make necessary configurations to zabbix_agend.conf
Install the below packages.
Grant enough privilege to the zabbix user,
Edit the ss_get_mysql_stats.php file, change the:
$mysql_user = 'zabbix';
$mysql_pass = 'some_password';
Restart the agent after configuration.
In zabbix server import mysql.xml as a template for Template_MySQL.
Now link the template to the host (mysql server) and we can see the latest data from the zabbix frontend.
Create an item to measure the free space in the partition
From the configuration tab, create an item corresponding to the host with,
Create a trigger to make an alert.
If you want a trigger for %, you need to use 'pfree' (percentage free) and 'pused' (percentage used).
Now, you have an alert if the free space on /partition is less than 20% (so if the partition is 80% full). You can alert this as mail through action.
Thanks for reading..
Cheers/-

zabbix installation
After the installation, log in with the admin username and password. From the administration tab we can create new user groups and users.
Next to that in Mediatype tab where we can configure smtp server, sms modems and jabber gateways for each groups and for each users.
And from the configuration tab we can create new hosts, provide ips and link specfic templates (contains Items for common operating systems checks, such as Linux, Solaris, MAC OS X and Windows systems) and save it. Their will be many built in template from which we can choose or we can import a specific template from xml file.
Each template may contain built in applications like (CPU, Filesystems, Security etc) and under each application their will be built in items which can be considered the "data collectors". Custom scripts can also be created as items.
While creating an item, we need to specify a key. This field is the "expression" that Zabbix will check. It can be a built-in key, such as the free disk space item (vfs.fs.size[/,free]) or a custom script that you wrote. We can refer the expressions from the zabbix manual.
A trigger monitors the data that the Items collects. If the data exceeds a configured threshold, it's assigned to one of the severity levels. The Expression field in the trigger maps what Item the Trigger is going to monitor and what its thresholds are.
Example:- Expression is configured as {Template_Linux:vfs.fs.size[/,pfree].last(0)}<10" for alerting the above mentioned free disk space item when the disk space is above 80%.
Actions occur when a trigger is activated. They can be via e-mail, Jabber, SMS message or running a remote script. For configuring an action to e-mail the admin if any trigger with level Disaster has been activated. Select Configuration→Actions, and then the Create Action button on the right-hand side of the screen. Choose Trigger severity from the New Condition area, and change the severity level from Information to Disaster. Click Add when finished. Next, select the New button in the Action operations area. Configure the operation to send a message to a single user named admin. Specify conditions and specify operations what to do ..
How to add mysql monitoring support to zabbix.
Download package - zabbix-mysql.tar.gz
From the mysql server, Make sure the zabbix agent is installed.
Make necessary configurations to zabbix_agend.conf
vim /usr/local/etc/zabbix_agend.conf
Server <server-ip>
ServerActive= <server-ip>
Hostname= (what is given in the zabbix server as host and should be resolving)</div>
Server <server-ip>
ServerActive= <server-ip>
Hostname= (what is given in the zabbix server as host and should be resolving)</div>
Install the below packages.
apt-get install php5 php5-cli php5-mysql
mkdir -p /usr/local/share/zabbix/plugins/
Copy the ss_get_mysql_stats.php to this dir.
Copy the zabbixmysql.conf file to /usr/local/etc
vim zabbix_agentd.conf
Include=/usr/local/etc/zabbixmysql.conf
mkdir -p /usr/local/share/zabbix/plugins/
Copy the ss_get_mysql_stats.php to this dir.
Copy the zabbixmysql.conf file to /usr/local/etc
vim zabbix_agentd.conf
Include=/usr/local/etc/zabbixmysql.conf
Grant enough privilege to the zabbix user,
mysql -u root
mysql> GRANT PROCESS,SUPER,REPLICATION CLIENT ON *.* TO 'zabbix'@'localhost' identified BY 'some_password';
mysql>quit;
mysql> GRANT PROCESS,SUPER,REPLICATION CLIENT ON *.* TO 'zabbix'@'localhost' identified BY 'some_password';
mysql>quit;
Edit the ss_get_mysql_stats.php file, change the:
$mysql_user = 'zabbix';
$mysql_pass = 'some_password';
Restart the agent after configuration.
In zabbix server import mysql.xml as a template for Template_MySQL.
Now link the template to the host (mysql server) and we can see the latest data from the zabbix frontend.
Create an item to measure the free space in the partition
From the configuration tab, create an item corresponding to the host with,
- description : Free disk space on $1 in %
- type : agent ZABBIX
- key : vfs.fs.size[/partition,pfree] (change /partition to the mount point)
- information : Numérique (float)
- units : %
You can customize others fields...
- type : agent ZABBIX
- key : vfs.fs.size[/partition,pfree] (change /partition to the mount point)
- information : Numérique (float)
- units : %
You can customize others fields...
Create a trigger to make an alert.
- name : Low free disk space on {HOSTNAME} volume /partition
- expression : {hostname:vfs.fs.size[/partition,pfree].last(0)}<20
Customize the rest of the options (dependencies etc).
- expression : {hostname:vfs.fs.size[/partition,pfree].last(0)}<20
Customize the rest of the options (dependencies etc).
If you want a trigger for %, you need to use 'pfree' (percentage free) and 'pused' (percentage used).
Now, you have an alert if the free space on /partition is less than 20% (so if the partition is 80% full). You can alert this as mail through action.
Thanks for reading..
Cheers/-
No comments:
Post a Comment