Zabbix is open sources application for monitoring our server, before installing zabbix, there are some packages that must be installed first :
• apache2
• libapache2-mod-php5
• php5
• php5-gd
• php5-mysql
• php5-cli
• php5-snmp
• mysql-server
after you have insalled that packages, now just install zabbix using command :
$ apt-get install zabbix-agent zabbix-fronted-php zabbix-mysql
Creating a database connection
$ mysql –u (username) -p
password:
$ mysql> create database zabbix;
$ mysql> quit;
Copy zabbix configuration to mysql
$ cd /usr/share/zabbix-server
$ cat schema.sql | mysql –u (username) -p zabbix
$ cat data.sql | mysql –u (username) -p zabbix
Configure /etc/services
$ zabbix_agent 10050/tcp
$ zabbix_trap 10051/tcp
Configure /etc/inetd.conf
$ zabbix_agent stream tcp nowait.3600 zabbix \ /opt/zabbix/bin/zabbix_agent
Run zabbix-server by type :
$ /etc/init.d/zabbix-server start
Check /var/log/zabbix-server
$ /var/log/zabbix-server/zabbix-server.log
Configuration with php
change the configuration from /etc/zabbix/dbconfig.php by type :
$ gedit /etc/zabbix/dbconfig.php
$DB_TYPE=’MYSQL’; ? type of database
$DB_SERVER=’localhost’; ? database server name
$DB_DATABASE=’zabbix’; ? database name
$DB_USER=’root’; ? database username
$DB_PASSWORD=’syafur’; ? database password
?>
Copy to folder /etc/zabbix ke /var/www by command :
$ cp –R /etc/zabbix /var/www
check and make sure mysql-server, apache2 and zabbix-server is running and check zabbix url in your browser by type http://localhost/zabbix in your browser address bar.
Configuring zabbix on web interface
We must login and change the permision to read & write, then go to the link configuration
Create a new group
Configuration -> Hosts -> (Choose) Host Groups -> Create Group
Then enter the name of the group that will be monitored for example: router
Then create a template
Configuration -> Hosts -> (Choose) Templates -> Create Template
Then enter the template name for example: add to the group kondisi.router router
Make items to be observed
Configuration -> Items -> (Choose) Router (Template) -> New Item
Then give the name of the item for example observed Memory_usage
Finish, and you will see the results
Happy Testing......!!!