• home
  • forum
  • my
  • kt
  • download
  • Monitoring Your Network,Servers and Clients With High Performance Zabbix

    Author: 2007-09-07 16:08:03 From:

    ZABBIX is a 24¡Á7 monitoring solution without high cost.ZABBIX is software that monitors numerous parameters of a network and the health and integrity of servers. ZABBIX uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. ZABBIX offers excellent reporting and data visualisation features based on the stored data. This makes ZABBIX ideal for capacity planning.

    ZABBIX supports both polling and trapping. All ZABBIX reports and statistics, as well as configuration parameters are accessed through a web-based front end. A web-based front end ensures that the status of your network and the health of your servers can be assessed from any location. Properly configured, ZABBIX can play an important role in monitoring IT infrastructure. This is equally true for small organisations with a few servers and for large companies with a multitude of servers.

    Zabbix Requirements

    Apache 1.3.12 or later .

    MySQL 3.22 or PostgreSQL 7.0.2

    MySQL or PostgreSQL development files (mysql-dev or postgresql-dev packages).

    PHP 4.0 or PHP 5.0, PHP must be compiled as Apache module.

    PHP GD or GD2 module

    GNU Make

    NET-SNMP (or UCD-SNMP) library and header files

    Open SSL library and header files. Required for SNMP support. Optional.

    Before we start

    Server, here comes all the info together and is processed in a database, note that the server can be monitored to so it runs an agent too.

    Agent, Information is gathered and polled by the server.this need to be installed in all the machines you want to monitor.

    Preparing Your Server

    First you need to install apache webserver with php support check here

    Mysql database server check here

    Install Zabbix Monitoring system in debian

    First you need to edit /etc/apt/sources.list file and add the following source list save and exit the file.

    #vi /etc/apt/sources.list

    If you want to install zabbix 1.1 enter the following source list

    deb http://mirror.opf.slu.cz/zabbix stable contrib

    If you want to install zabbix 1.3 beta enter the following source list

    deb http://mirror.opf.slu.cz/zabbix testing contrib

    Now you need to update the source list using the following command

    #apt-get update

    Install zabbix using the following command

    #apt-get install zabbix-frontend-php zabbix-server zabbix-agent

    This will start the installation this time it will prompt for some questions you need to answer them carefully

    Configuring Zabbix Agent

    You need to enter your server ip address select ok and press enter

    Zabbix sucker server port Leave the default value select ok and press enter

    Configuring Zabbix Frontend

    Select sql server type in this example i am selecting as mysql select ok and press enter

    Enter Mysql Server ip address if you are using local machine as database server leave blank select ok and press enter

    Enter mysql User in this example i am entering as root select ok and press enter

    Enter mysql root password select ok and press enter

    You need to read the below message very carefully to create zabbix database at the end of installation select ok and press enter

    Now it will prompt for First Login to your zabbix frontend is not_ok this you can leave as it is because we need to create database which we will do at the end of the installation select ok and press enter

    Enter Listening port for sender requests to server 10051 select ok and press enter

    Enter Email of zabbix admin this is your choice i am sending to root here select ok and press enter


    Select Watch zabbix server processess or not option as yes select ok and press enter

    select check all zabbix tables before starting zabbix server process option as yes select ok and press enter

    This will complete the installation with the following error message this is because of we have not created database for zabbix
    You must create database zabbix, user zabbix and give correct rights.You can see error connecting to db ahead. Please correct db rights.After you will be ready, please use dpkg-reconfigure zabbix-server
    Please see /usr/share/doc/zabbix-server/README.Debian

    Starting Zabbix server checktables ERROR 1049 (42000): Unknown database ¡®zabbix¡¯
    zabbix_server ERROR 1049 (42000): Unknown database ¡®zabbix¡¯ Err: You did not setup your mysql server correctly!
    Please run zabbix_installdb manualy!
    check_server
    - This packages tries to do all of work but you must do little of work by your hands. Especially, database config, rights, users and creating database zabbix is ON YOU! But if you will read install instructions you can setup it without big problems.
    - Use zabbix_installdb script to fill your database with required data to run zabbix-server. Second way is to manualy create database zabbix, give rights to user zabbix and fill with sql statements found in /usr/share/doc/zabbix-server/create/mysql/schema.sql.gz and /usr/share/doc/zabbix-server/create/data/data.sql.gz
    - If there is some error, feel free to use dpkg-reconfigure zabbix-xxx packages

    Create zabbix Database

    Now you need to create database using the following command

    #/usr/bin/zabbix_installdb

    Zabbix db installation script. You will need some basic knowledge to pass. Please note that better way is probably to install zabbix-doc package and read manual. This is very LIGHT version of script and tries to be simple, but it is not allways what you want.

    In other words, if you did not read manual yet, you will never login to your zabbix server to administer it ;)

    If you have default debian mysql-server instalation, no further informations is needed.

    Else we will need:

    - mysql server host
    - mysql server admin user
    - mysql server admin pass

    We will do:

    - create zabbix db
    - fill db with right schema and basic data

    !! DO NOT RUN THIS SCRIPT IF YOU ALREADY HAVE DATA IN YOUR ZABBIX DB !!
    If you want to end now, press ctrl+c

    Your DB was created successfuly. Please note that it is not good idea to use mysql admin user as zabbix user even if it is working. You should read mysql documentation, create user zabbix, give him rights for database zabbix and run dpkg-reconfigure zabbix-server to make it working¡­ In other words, you have been warned.

    Installing Zabbix Agent

    Zabbix Agent need to be installed in all the systems you want to monitor.If you want to install zabbix agent in debian follow this procedure and if you want to install zabbix agent in other operating systems you need to download from here and install

    You need to edit /etc/apt/sources.list file and add the following source list save and exit file

    #vi /etc/apt/sources.list

    If you want to install zabbix 1.1 enter the following source list

    deb http://mirror.opf.slu.cz/zabbix stable contrib

    If you want to install zabbix 1.3 beta enter the following source list

    deb http://mirror.opf.slu.cz/zabbix testing contrib

    Now you need to update the source list using the following command

    #apt-get update

    Install zabbix agent using the following command

    #apt-get install zabbix-agent

    This will install the zabbix agent now you need to configure your agent to communicate with server for this you need to edit the file located at /etc/zabbix/zabbix_agentd.conf

    Make sure that the Server parameter points to your zabbix server address:

    Server=xxx.xxx.xxx.xxx

    Now Edit /etc/services:

    vi /etc/services

    Add:

    zabbix_agent 10050/tcp # Zabbix ports
    zabbix_trap 10051/tcp

    Now you need to restart the zabbis agent using the following command

    #/etc/init.d/zabbix-agent restart

    That¡¯ it you have installed zabbix server,agent and ready to monitor.

    Final Step

    You need to make sure your database setting are correct using the following procedure you need to edit the /var/www/zabbix/include/db.inc.php file check under database configuration by default you can see the following details you need to change this settings save the file and exit.

    // DATABASE CONFIGURATION

    // $DB_TYPE =¡±ORACLE¡±;
    $DB_TYPE =¡±POSTGRESQL¡±;
    // $DB_TYPE =¡±MYSQL¡±;
    $DB_SERVER =¡±localhost¡±;
    $DB_DATABASE =¡±osmiy¡±;
    $DB_USER =¡±eugene¡±;
    $DB_PASSWORD =¡±123¡å;

    change to

    // DATABASE CONFIGURATION

    // $DB_TYPE =¡±ORACLE¡±;
    // $DB_TYPE =¡±POSTGRESQL¡±;
    $DB_TYPE =¡±MYSQL¡±;
    $DB_SERVER =¡±localhost¡±;
    $DB_DATABASE =¡±zabbix¡±;
    $DB_USER =¡±root¡±;
    $DB_PASSWORD =¡±";

    These are the details we have choosen at the time of installation.

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      Administration (7)
      Editing Files (2)
      Getting Started (8)
      Installation (8)
      Linux and other OSs (10)
      Miscellaneous (10)
      Networking (8)
      Security (9)
      Shells and Utilities (14)
      System Monitoring (5)
      Troubleshooting (1)
      X Windows (6)

    New

    Hot