Ad Widget

Collapse

Automatic addition of agents

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tenchi
    Junior Member
    • Aug 2009
    • 6

    #1

    Automatic addition of agents

    I created an install script to make deplyment of the zabbix client on servers very easy, it is as fallows:

    #!/bin/bash
    mkdir /etc/zabbix
    useradd zabbix
    passwd zabbix -l
    cd /etc/zabbix
    wget http://youdb.com/files/zabbix/zabbix_agentd
    wget http://youdb.com/files/zabbix/conf/zabbix_agentd.conf
    chown -R zabbix:zabbix /etc/zabbix
    cd /etc/init.d/
    wget http://youdb.com/files/zabbix/init.d...bix_agentd_ctl
    echo "zabbix ALL=(ALL) NOPASSWD: /etc/init.d/*" >> \n /etc/sudoers
    hostname > /tmp/hostname
    sed -i "s/\./_/g" /tmp/hostname
    export HOST=`cat /tmp/hostname`
    echo $HOST
    sed -i "s/Hostname=ZABBIX/Hostname=$HOST/" /etc/zabbix/zabbix_agentd.conf
    chmod +x /etc/init.d/zabbix_agentd_ctl
    chmod +x /etc/zabbix/zabbix_agentd
    /etc/init.d/zabbix_agentd_ctl restart


    My question is, Is it possible to have the zabbix server automatically add hosts which send data to it ?
    Last edited by Tenchi; 10-08-2009, 14:52.
  • dmarsh
    Junior Member
    • Jun 2009
    • 17

    #2
    You could try "Configuration -> Discovery" on the menu, and create a rule. I don't know how this works yet.

    Comment

    • chivo
      Junior Member
      • Mar 2009
      • 11

      #3
      Create a discovery rule for a subnet that checks for a zabbix agent install. Then you have to create an action based on that discovery rule. As an example:

      These are the conditions:

      Host ip = "10.10.0.1-128"
      Service type = "ZABBIX agent"
      Discovery status = "Up"
      Received value like "Linux"

      Here are the operations defined:

      Add to group "Linux servers"
      Add to group "Infrastructure"
      Link to template "Template_Linux"
      Link to template "Template_HP_InsightManager"

      Adjust the conditionals and operations to match your environment of course.

      Comment

      Working...