Ad Widget

Collapse

Help to configure Discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bastien
    Junior Member
    • Jan 2012
    • 21

    #1

    Help to configure Discovery

    Hi,

    I configure auto-discovery like this :

    Name : ....
    IP Range : ....
    Delay : 42300
    Check : zabbix agent "system.uname"
    Device uniqueness criteria : IP address
    Status : Active

    It's ok, zabbix found all of my host with a installed zabbix agent.
    Now, i want to put all my linux server on the "Linux Servers" group. In order to do that, i created the following "Action" :

    Name : Auto discovery. Linux servers
    Action conditions :
    (A) Received value like "Linux"

    Action opérations :
    Add to group "Linux Servers"

    Ok, it works ! Linux servers were put into "Linux Servers", however hostnames are sometime false or not as what i wanted..

    Sometime the hostname is the IP address of the server, sometime the hostname is the FQDN and sometime the hostname is right.

    How can i check the hostname attributed for the server ? I can't use the auto-discovery if the host assignation is unstable..

    Thanks in advance.

    Regards,
  • Bastien
    Junior Member
    • Jan 2012
    • 21

    #2
    Maybe could i use a script that will write into the database to create hosts ?
    Someone got an idea ?

    Comment

    • dale
      Junior Member
      • Oct 2011
      • 26

      #3
      Discovery Provisioning Howto

      This should work fine.

      * Set the Discovery Action Conditions to something like this:
      Code:
      Received value like "Linux"
      Discovery status = "Discovered"
      Service type = "Zabbix agent"
      * Set the Discovery Action Operations to something like this:
      Code:
      Add host
      Enable host
      Link to template "Template_Linux"
      Add to group "Linux servers"
      * Update your /etc/zabbix/zabbix_agentd.conf on all your machines something like this:
      Code:
      sed -i.dist \
      	-e "s/^Server=127.0.0.1/Server=zabbix.domain.com/" \
      	-e "s/^\(Hostname=\).*$/\1`hostname --fqdn`/" \
      	-e "s/^#.*\(Include=\/etc\/zabbix\/zabbix_agentd\/\).*$/\1/" \
      	/etc/zabbix/zabbix_agentd.conf

      Comment

      • Bastien
        Junior Member
        • Jan 2012
        • 21

        #4
        I have to use the domain name, the auto-discovery use reverse DNS to resolve hostname, so i just make a good config on my DNS.

        Now all of hostname are look like that : myhost.mydomain

        Comment

        Working...