Ad Widget

Collapse

Distributed Monitoring with Zabbix 1.4.3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fresco
    Junior Member
    • Sep 2007
    • 5

    #1

    Distributed Monitoring with Zabbix 1.4.3

    Distributed Monitoring with Zabbix 1.4.3


    --------------------------------------------------------------------------
    Env. of test
    Servers :
    * 2 Linux RED HAT Entreprise Servers, kernel 2.6.9-34.ELsmp
    * 1 CPU
    * 1 Go RAM
    --------------------------------------------------------------------------


    "The most important thing to remember is that most of the phases of the process must be done OFF-LINE ! (i.e: all zabbix servers & agent down)"



    Pre-requisite for both servers :

    1. Zabbix environnement is installed (http server, PHP extensions, etc ....)
    a. Zabbix Agent is stopped
    b. Zabbix Server is stopped
    2. Mysql base is installed, and started
    a. zabbix base have been created with schema and basic datas



    At this stage, the configuration is still in local mode for both servers: what you'll need to do next is to declare each other in a distributed environnement, and to configure their node as well.


    Following the nomenclature of the Zabbix Manual: Master Node will be called Central_Node and Slave Node will be called Child_Node.

    1. Checking the started zabbix's processes
    First thing to do is to verifiy that any of the zabbix processes are started (agent & server) : if yes, then stop them !

    2. NodeID determination
    Declare the Node Id for both Central_Node and Child_Node: first parameter of the zabbix_server.conf file is NodeID. Change it like bellow:
    Central_Node will take first number --> NodeID=1
    Child_Node will take (Central_Node number + 1) --> NodeID=2

    3. Global check to the conf
    While editing the zabbix_server.conf, have a look to the entire parameters list, like LISTENIP, DebugLevel and LogFile, and check that everything is ok (ex: rights, free space)

    4. Database conversion from local mode to distributed mode
    You must prepare the database conversion from the local mode to the distributed mode: this operation is still made OFF-LINE !
    For this, execute this command : ./zabbix_server -c -n [NodeID], where NodeID depends of the server
    Ex: for Central_Node : ./zabbix_server -c -n 1
    Ex: for Child_Node : ./zabbix_server -c -n 2
    Be carrefull : if you have installed zabbix in a different path than the default path, you'll have to specify the full path to the zabbix_server.conf file for this operation, like this :
    Ex: for Central_Node : ./zabbix_server -c /opt/tom/jerry/grandma/conf/zabbix/zabbix_server.conf -n 1
    Ex: for Child_Node : ./zabbix_server -c /opt/tom/jerry/grandma/conf/zabbix/zabbix_server.conf -n 2
    Operation of conversion is ok when you see the "Complete" printed on screen.

    5. Central_Node administration & configuration
    Now, you must configure the NODE on each server, by connecting to the Administration interface.
    Default Login is Admin with no password.
    On Central_Node Administration Interface, clic on Administration link, then clic on Nodes link.
    Clic on Local Node link, and check the parameters as bellow :
    °Name : Change the Name from Local to Central_Node
    °Check Id : 1
    °Type : Local
    °Time Zone: "you choose"
    °IP : change 127.0.0.1 to the Network interface dedicated to Zabbix Server
    °Port : 10051 (default)
    then clic on Save button
    Now, you can see the first node with Id=1 : Central_Node.

    Still connected to the Central_Node Administration Interface, you'll now created the Child_Node.
    Clic on New Node link, and check the parameters as bellow :
    °Name : Child_Node
    °Id : 2
    °Type : Remote
    °Master node: Central_Node
    °Time zone : "you choose"
    °IP : change 127.0.0.1 to the Network interface dedicated to Zabbix Server
    °Port : 10051 (default)
    then clic on Save button
    Clic on Node button (there is a bug: the page is not auto refreshed).
    Now, on Central_Node Administration Interface, you have 2 nodes recorded with 2 distincts NodeID.
    DO NOT START ANY ZABBIX SERVER OR AGENT....

    6. Child_Node Administration & configuration
    Connect to the Child_Node Administration web Interface.
    Clic on Administration link, and clic on Node link
    As in (5), you'll see that only the Local node is recorded.
    We'll change it now:
    Clic on Local Node, and check the parameters :
    °Name : change the Name from Local to Child_Node
    °Check Id : 2
    °Type : Local
    °Time Zone: "you choose"
    °IP : change 127.0.0.1 to the Network interface dedicated to Zabbix Server on Child_Node
    °Port : 10051 (default)
    then clic on [/I][/U]Save[/I][/U] button
    Now, you can see the Child_Node configured. But you still need to attach it to the Central_Node. Then Clic on the New Node Button, and check the following parameters.
    °Name : change the name to Central_Node
    °Check Id : 1
    °Type : MASTER (be carreful with this option...very important !!)
    °Time Zone: "you choose"
    °IP : change 127.0.0.1 to the Network interface dedicated to Zabbix Server on Central_Node
    °Port : 10051 (default)
    then clic on Save button
    [INDENT]Clic on Node button (there is a bug: the page is not refreshed).[INDENT][INDENT]Now, you can see that your Child_Node has been linked to the Central_Node. Unlike in the the Central_Node Administration interface, it is presented in only line, and not two ![INDENT]

    7. Start of zabbix's processes
    On the Central_Node, start the zabbix agent, then the zabbix server
    On the Child_Node , start the zabbix agent, then the zabbix server
    On the Central_Node Administration, you could now be able to swicth between Central_Node and Child_Node !

    You can now configure your hosts to monitor whatever you need !
    Last edited by fresco; 02-10-2007, 14:04.
Working...