Zabbix templates + Network Discovery

Source: Internet
Author: User
Tags snmp

Template Introduction

Template is a set of configuration, it can be easily deployed quickly on a monitoring object, and support repeated application, when the template is applied to a host, all its defined entries are automatically added, the other advantage of the template is that, if necessary, modified template, the application of the host will be modified accordingly.


what can be defined in the template: app set (application), Project (item), Trigger (trigger), graphics (graph), screen, Discovery Rule (discovery), web

Template Creation

Create a template: Click Create template in the configuration--templates

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/50/wKiom1WYvMPS2_SzAAEvnNQiQnI102.jpg "/>

Define a template, create a template name and associate a group.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/4E/wKioL1WYvo6BBN--AAGQejsQEaM242.jpg "/>

The template definition is complete and the host list is the same, you can create the project trigger directly above, etc.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/50/wKiom1WYvMPg7k4HAAJ4qvuz4bU472.jpg "/>

Define two monitoring items on the template to monitor memory used space and total space

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/4E/wKioL1WYvo7QcttqAAHSnqoHifw077.jpg "/>

Define total memory space for monitoring

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/4E/wKioL1WYvo7xTtDJAAHxP05y6ZM759.jpg "/>

and add graphics to the stencil

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/50/wKiom1WYvMTzGrN5AAK8FV0PKXs420.jpg "/>

Template creation, you can see the template created two monitoring items, a graphic any use of this template will automatically create these two monitoring items and graphics

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/4E/wKioL1WYvo-xGss0AAJB6Qyj2fM208.jpg "/>

Auto Discovery

Auto-Discovery is one of the most characteristic features of Zabbix, he can automatically add monitoring host or service according to the rules defined by user, accelerate Zabbix deployment and simplify management operation of OPS personnel.


Zabbix's network discovery capabilities can be based on the following information:

(1) Scan the specified IP address range

(2) HTTP, ICMP, SSH, LDAP, TCP, SNMP, Telnet, zabbix_agent scan the host within the specified network;


The discovery rule consists of two stages discovery and actions:

Discovery: periodically scans the host for the specified network segment, and once the host is found triggering the following event

Events in Discovery:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/50/wKiom1WYvMaCANVHAAGld6WJRDw140.jpg "/>

The action performed:

Sending Notifications #发送通知

Adding/removing hosts #添加删除主机

Enabling/disabling hosts #启用禁用主机

Adding hosts to a group #将主机添加到组中去

Removing hosts from a group #从组中移除主机

Linking hosts to/unlinking from a template #链接模版到主机, deleting links

Executing Remote scripts #执行远程脚本

interface Add: interface is automatically created when added in Network discovery, for example, if the SNMP-based detection succeeds, the SNMP interface is created

(1) If a service responds to both agent and SNMP at the same time, both interfaces will create

(2) If the same discovery mechanism (such as agent) returns non-unique data, the first interface is recognized as the default, and the other is the additional interface

(3) Even if a host started with only the agent interface, and later found it through SNMP, it will also add additional SNMP interface

(4) different hosts if the same data is returned, the first host will be added and the remaining host will be treated as an additional interface for the first host


Example: automatic discovery Implementation

Add a host to the network, IP address 172.16.4.102, host name Node3

Installation configuration

[email protected] zabbix-2.4.5]# Yum--nogpgcheck install zabbix-2.4.5-1.el6.x86_64.rpm zabbix-agent-2.4.5-1.el6.x86 _64.rpm Zabbix-sender-2.4.5-1.el6.x86_64.rpm[[email protected] zabbix-2.4.5]# vim/etc/zabbix/zabbix_ Agentd.confserver=172.16.4.100hostname=node3

Copy node2 two configuration files to a native

[Email protected] ~]# scp/etc/zabbix/zabbix_agentd.d/* [email protected]:/etc/zabbix/zabbix_agentd.d/

Setup to complete startup

[[Email protected] ~]# service zabbix-agent start

Zabbix Create Discovery rule: Click Create Discovery rule in configuration--Explore

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/51/wKiom1WYvMbgn9vfAAIy-K95br0631.jpg "/>

Set the rule: Define an IP address range here, check the way is ping, as long as you can ping to find the host.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/4E/wKioL1WYvpHifaFUAAEkj2DSq5E387.jpg "/>

At this point, you'll see the Autodiscover host in the event.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/4E/wKioL1WYvpHS_sRvAAJffBUQUy8142.jpg "/>

Create an action that automatically joins the Autodiscover host to the monitor, where you need to select the event source to explore before creating the action

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/51/wKiom1WYvMeyL8M0AAJffZ3-iWc478.jpg "/>

Define the discovery action, where the message is sent after the discovery is set

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/4E/wKioL1WYvpLzD_Q3AAKOmzR8kVw324.jpg "/>

Define a discovery condition that is a custom exploration rule in the host IP address range of the host to perform subsequent operations on-line

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/51/wKiom1WYvMjjtgBwAAFA1xM-W74531.jpg "/>

Define discovery actions, Discover host post-mail notifications, and join to Test_group host group, in connection to specified templates

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/51/wKiom1WYvMjTfSSUAAJ3L_pDCR8620.jpg "/>

Verify: After all configuration is completed, wait a while, automatically add 172.16.4.102 complete, and apply the template

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/4E/wKioL1WYvpPxp3WTAAOjNQsT0t8785.jpg "/>

You can also receive mail

[[email protected] ~]# mailn 27 [email protected]  wed may  27 21:19  21/946    "discovery: up 172.16.4.100"  N 28 [ email protected]  wed may 27 21:19  22/975    "Discovery :  up 172.16.4.100 " N 29 [email protected]  Wed May 27  21:19  21/946    "Discovery: up 172.16.4.101"  N 30 [email  protected]  Wed May 27 21:19  22/975    "Discovery:  up 172.16.4.101 " N 31 [email protected]  Wed May 27  21:19  21/946    "discovery: up 172.16.4.102"  N 32 [email  protected]  Wed May 27 21:19  22/975    "Discovery:  up 172.16.4.102 "

After a while, the data is collected and the graphics are generated.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/51/wKiom1WYvMmCq98CAAMWd1uuVAA501.jpg "/>

Automatic Registration

proactively discovering weaknesses: If the defined scan time is short, then the performance impact too much, if the time is too long, then the discovery is not very timely, in this case, you can use the automatic registration function.

Autoenrollment can also be used for scenarios where the failed agent is back online.

Configure Auto-Enrollment

Before setting, disable the Autodiscover rule and explore action, and go online with a node4 host (172.16.4.103)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/4E/wKioL1WYvpSRe5N4AAKKAKVc0PU640.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/4E/wKioL1WYvpWg16W3AANUjRxdkW4920.jpg "/>

NODE4 Server Configuration

NODE4 Installation Configuration Zabbix Agent

[email protected] zabbix-2.4.5]# Yum--nogpgcheck install zabbix-2.4.5-1.el6.x86_64.rpm zabbix-agent-2.4.5-1.el6.x86 _64.rpm zabbix-sender-2.4.5-1.el6.x86_64.rpm

Modifying a configuration file

[Email protected] zabbix-2.4.5]# vim/etc/zabbix/zabbix_agentd.confserver=172.16.4.100serveractive=172.16.4.100 # This must be added as Zabbixserver address Hostname=node4listenip=172.16.4.103hostmetadata=artest #定义metadate, the auto-registration action will be used

Copy node2 two configuration files to a native

[Email protected] ~]# scp/etc/zabbix/zabbix_agentd.d/* [email protected]:/etc/zabbix/zabbix_agentd.d/

Setup Complete reboot

[Email protected] zabbix-2.4.5]# service zabbix-agent restart
Zabbix Server configuration

Create an action that is automatically registered for the event source

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/4E/wKioL1WYwuaz64OrAAIcPJCZxuU618.jpg "style=" float: none; "title=" 1.png "alt=" Wkiol1wywuaz64oraaicpjczxuu618.jpg "/>

Define the format for sending messages

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/51/wKiom1WYwRvj7RUaAAEcseym5Q8099.jpg "style=" float: none; "title=" 2.png "alt=" Wkiom1wywrvj7ruaaaecseym5q8099.jpg "/>

Define the conditions for registration, as long as the host name and node are similar, and the host metadata and Artest are similar to complete autoenrollment

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/4E/wKioL1WYwuaCXAcQAAGA1XtwhGQ940.jpg "style=" float: none; "title=" 3.png "alt=" Wkiol1wywuacxacqaaga1xtwhgq940.jpg "/>

Set up how host autoenrollment handles: Join an autoenrollment host to a Test_group host group, and apply the hosts template that you started to create

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/51/wKiom1WYwRyirrB8AAE9SiVMsJA421.jpg "style=" float: none; "title=" 4.png "alt=" Wkiom1wywryirrb8aae9sivmsja421.jpg "/>

Verify the configuration: If you cannot register immediately after the setup is completed, you can restart the Node4 zabbix-agent service to complete the registration immediately.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/4E/wKioL1WYwufxbyJKAALPIfsWrrw684.jpg "style=" float: none; "title=" 5.png "alt=" Wkiol1wywufxbyjkaalpifswrrw684.jpg "/>


This article from "Plum blossom fragrance from bitter cold" blog, please be sure to keep this source http://ximenfeibing.blog.51cto.com/8809812/1671041

Zabbix templates + Network Discovery

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.