Home

13. Discovery [Zabbix]

image

Contents

1. etc Information received from Zabbix agent Information received from SNMP agent It does NOT provide Discovery of network topology Network discovery basically consists of two phases discovery and actions Discovery Zabbix periodically scans the IP ranges defined in network discovery rules The frequency of the check is configurable for each rule individually Each rule has a set of service checks defined to be performed for the IP range Discovery checks are processed independently from the other checks If any checks do not find a service or fail other checks will still be processed Every check of a service and a host IP performed by the network discovery module generates a discovery event Actions https www zabbix com documentation 2 0 manual discovery network_discovery Page 1 of 2 1 Network discovery Zabbix 12 5 13 1 34 PM Discovery events can be the basis of relevant actions such as 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 Executing remote scripts These actions can be configured with respect to the device type IP status uptime downtime etc For full details on configuring actions for network discovery based events see action operation and conditions pages Interface creation when adding hosts When hosts are added as a result of network discovery
2. In this example we would like to set up network discovery for the local network having an IP range of 192 168 1 1 192 168 1 255 In our scenario we want to discover those hosts that have Zabbix agent running run discovery every 10 minutes add a host to monitoring if the host uptime is more than 1 hour remove hosts if the host downtime is more than 24 hours add Linux hosts to the Linux servers group add Windows hosts to the Windows servers group use Template_Linux for Linux hosts use Template_Windows for Windows hosts Step 1 Defining a network discovery rule for our IP range https www zabbix com documentation 2 0 manual discovery network_discovery rule Page 2 of 5 Configuring a network discovery rule Zabbix 12 5 13 1 34 PM Name Local network Discovery by proxy No proxy f IP range 192 168 1 1 255 Delay seconds 300 Checks Zabbix agent system uname Remove New Device uniqueness cntena IP address C Zabbix agent system uname Enabled f Zabbix will try to discover hosts in the IP range of 192 168 1 1 192 168 1 255 by connecting to Zabbix agents and getting the value from system uname key The value received from the agent can be used to apply different actions for different operating systems For example link Windows servers to Template_Windows Linux servers to Template_Linux The rule will be executed every 10 minutes 600 seconds With this rule is adde
3. OR A and B and C and D A Received value ike Windows B Uptime Downtime gt 3600 Discovery status Up Senice type Zabbix agent New condition Service type j Bj Zabbix agent zi Step 4 Defining an action for removing lost servers https www zabbix com documentation 2 0 manual discovery network_discovery rule Page 4 of 5 Configuring a network discovery rule Zabbix 12 5 13 1 34 PM Gac Type of calculation AND OR A and B and C Uptime Downtime gt 86400 Discovery status Down A server will be removed if Zabbix agent service is down for more than 24 hours 86400 seconds 2 0 manual discovery network_discovery rule txt Last modified 2013 08 22 17 01 by martins v Except where otherwise noted content on this wiki is licensed under the following license CC Attribution Noncommercial Share Alike 3 0 Unported http creativecommons org licenses by nc sa 3 0 https www zabbix com documentation 2 0 manual discovery network_discovery rule Page 5 of 5 2 Active agent auto registration Zabbix 12 5 13 1 34 PM 2 Active agent auto registration Overview It is possible to allow active Zabbix agent auto registration after which the server can start monitoring them This way new hosts can be added for monitoring without configuring them manually on the server Auto registration can happen when a previously unknown active agent asks f
4. Triggers 1 POperStatus 47 30 interfaces FOperStatus 5 Triggers 1 FOperStatus 5 30 7 365 7 365 SNMPv2agent iflnOctets 7 365 SNMPW2 agent iinOctets 7 365 SNMPv2 agent iinOdets 7 365 SNMPv2agent iinOctets 7 365 SNMPv2agent itinOctets 7 365 SNMPvZagent ifinOctets 7 365 SNMPv2agent ifinOctets 7 365 SNMPv2 agent OperStatus 7 365 SNMPv2agent OperStatus 365 SNMPv2agent OperStatus 7 365 SNMPW2agent OperStatus 7 365 SNMPWZagent OperStatus lt Previous 112131 Next gt femme meta Cassfied inienaces MDesc 8 on ProCurve J4900B Swatch 2626 has changed nterfaces Descx9 on ProCurve 49008 Switch 2626 has changed insertaces fOperStatus 1 om ProCurve 49008 Swich 2626 has changed insertaces OperStatus 2 on ProCurve 349008 Swich 2626 has changed interfaces fOperStatus 3 om ProCurve 349008 Swatch 2626 has changed insertaces OperStatus 4 on ProCurve 349008 Swatch 2626 has changed interfaces fOperStatus om ProCurve 349008 Swatch 2626 has changed interfaces OperStatus 6 on ProCurve 349008 Swatch 2626 has changed Interfaces OperStatus 10 on ProCurve J4900B Swich 2626 has changed interfaces OperStatus 11 on ProCurve J4900B Switch 2626 has changed interfaces OperStatus 12 on ProCurve J4900B Swatch 2626 has changed nterlaces FOperStatus 13 on ProCurve J4900B Swatch 2626 has changed interfaces FOperStatus 14 on ProCurve J4900B8 Swatch 2626 has changed ProCurve M9005 Swach 2626 Descr S amag 1 ProCurve 49
5. but in a disabled State We can create several item prototypes for each file system metric we are interested in https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 5 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM item prototypes of Mounted filesystem discovery Displaying 1 to 5 of 5 found Then we create trigger prototypes in a similar way Name Free disk space is less than 20 on volume fFSNAME ee Expression constructor Multiple PROBLEM events generation Description RR eas Cera ee ee Severty Not classified Information Average High Disaster Enabkea Y Trigger prototypes of Mounted filesystem discovery Displaying 1 to 2 of 2 found Hide disabled triggers And graph prototypes too https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 6 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM ona ny Name Ok space usage FSNAME Width 600 megh 140 Graph type Pe gt j Showlegend Y IOvwew Y hems Name Type Function Colour Action 1 Template OS Linus Total dink space on SESNAMEJ Graph sum ao S caoo00 E feme 2 Template OS Linux Free dine space on WFSNAME Smpe aj o aj oocso0 E mwe Add Add prototype Save Chore Delete Cancel Graph prototypes of Mounted filesystem discovery NO ON Pa 8 BS DA a Ad A De Bn 0 9 5 De Fd 1 to 1 of 1 found Template ist Template Template OS Linux Discovery is
6. following sections illustrate the process described above in detail and serve as a how to for performing discovery of file systems network interfaces and SNMP OIDs The last section describes the JSON format for discovery items and gives an example of how to implement your own file system discoverer as a Perl script 3 1 Discovery of file systems To configure the discovery of file systems do the following Go to Configuration gt Templates Click on Discovery in the row of an appropriate template TEMPLATES Group 7 es j Displaying 1 to 44 of 44 found Templates f Applications items Tnggers Graphs Screens Discovery Linked templates Linked to C Template Levu Appicabons 12 items 102 Tnaggers 44 raphs 0 creens fl soovery 0 Click on Create discovery rule in the upper right corner of the screen Fill in the form with the following details https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 2 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM Type Zabbix agent gt Key vis s discovery Select Update interval in sec 3600 Hexble miervals interval Period Action No flexible mtervals defined New flexible interval Interval in sec 50 Period 1 7 00 00 24 00 Add Keep lost resources penod 30 in days Fiter Macro FSTYPE Regexp File systems for discovery Description Discovery of file systems of different types as defined in globa regular expression
7. instance Zabbix can automatically start monitoring file systems or network interfaces on your machine without the need to create items for each file system or network interface manually Additionally it is possible to configure Zabbix to remove unneeded entities automatically based on actual results of periodically performed discovery In Zabbix 2 0 three types of item discovery are supported out of the box discovery of file systems discovery of network interfaces discovery of SNMP OIDs A user can define their own types of discovery provided they follow a particular JSON protocol The general architecture of the discovery process is as follows First a user creates a discovery rule in Configuration gt Templates gt Discovery column A discovery rule consists of 1 an item that discovers the necessary entities for instance file systems or network interfaces and 2 prototypes of items triggers and graphs that should be created based on the value of that item An item that discovers the necessary entities is like a regular item seen elsewhere the server asks a Zabbix agent or whatever the type of the item is set to for a value of that item the agent responds with a textual value The difference is that the value the agent responds with should contain a list of discovered entities in a specific JSON format While the details of this format are only important for implementers of custom discovery checks it
8. item will not be processed however Zabbix may try to periodically set the status of the item to Enabled according to the interval set for refreshing unsupported items Status Zabbix database in MySQL must be created as case sensitive if file system names that differ only by case are to be discovered correctly Discovery rule history is not preserved Once a rule is created go to the items for that rule and press Create prototype to create an item prototype Note how macro FSNAME is used where a file system name is required When the discovery rule is processed this macro will be substituted with the discovered file system https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 4 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM item Free disk space on 1 percentage Name Free disk space on 1 percentage Type Zabbix agent gt Key vis fs size FSNAME ptree Select Type of information Numeric foat gt Units Use custom multipber J 1 Update interval n sec 60 No flexible intervals defined New flexible interval Interval n sec 50 Period 1 7 00 00 24 00 Add Keep history n days 7 Keep trends in days 365 Store value ass Show value Ass OS show anal New application Applications Enabled vY cane If an item prototype is created with a Disabled status it will be added to a discovered entity
9. open Fienters Enabied i oucoed Merman decoeen Fase dab apace on wa fs ae Pee to 7 MS Jaiba agesi Fimis Enabled 7 Warna ley ole dauyt fee dai ipate on percentage Taggen 1 we see pteej 60 7 35 Jibbe agesi f cwyviern Loabed n Moue Mesynen dooovenr Tota d space on 450s soep mal wwo 7 35 Zdkagen Fienwens Enbei EJ Woumned Merren dpcoverr Used disk spece as da fe soa uwd 60 7 MS Jabba ngeni Fimta Ensbied z Items similarly triggers and graphs created by a low level discovery rule cannot be manually deleted However they will be deleted automatically if a discovered entity file system interface etc stops being discovered or does not pass the filter anymore In this case the items will be deleted after the days defined in the Keep lost https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 7 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM resources period field pass triggers and graphs will be deleted immediately When discovered entities become Not discovered anymore an orange lifetime indicator is displayed in the items list Move your mouse pointer over it and a message will be displayed indicating how many days are left until the item will be deleted Zabbe agent Active ve Close Yee ew The tem is not discovered anymore and wil be deleted in 3h 22m 3s on 10 Jan 2012 at 15 25 03 Triggers Group Zabbix servers lt f Lasplaying 1 to 30 of 41 found Hostist Hos
10. 008 Swach 2626Desa 7 Aag1 ProCurve 49008 Swach 2626 OperStatus 1 amg 1 ProCurve 490068 Swach 2626 OperStatus 27 ag 1 ProCurve 49006 Swech 2626 OperStatus 3 dig 1 ProCurve 49008 Swach 2626 OperStatus 4 gig ProCurve 49008 Swatch 2626 OperStatus S aiiQ 1 ProCurve 49008 Switch 2626 OperStatus 6 difiQ 1 ProCurve 49008 Switch 2626 dOperStatus 10 dimag 1 ProCurve M9008 Switch 2626 0perStatus P11 1 ProCurve M9008 Switch 2626 OperStatus 12 aimag 1 ProCurve M9005 Swich 2626 OperStatus 13 dagj 1 ProCurve M9005 Swich 2626 OperStatus 147 amr 1 https www zabbix com documentation 2 0 manual discovery low_level_discovery Enabed B3 Enabed PJ a Enabied EJ Enabied PJ Enabed P3 Enabed Enabed B Enabled P Enabled PJ Enabed PJ Enabed B3 Enabed PJ Enabied E3 ee E E ee ee aeae Page 14 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM Graphs Displaying 1 to 28 of insertaces interlaces noenaces nsenaces nierfaces nsenaces nsertaces interfaces nierlaces n eraces nsertaces niertaces 30 found ost Host ProCurve J49006 Swiich 2626 Momiored Availabilty scovery rules 1 1 2 Next gt t Utizaton of mternace 1 Uliization of mterace 2 Utizaton of miertace 3 Utization of merace 4 Utiivation of merace 5 Utizaton of mertace 6 Ultiization of merace 7 Utiization of mertace 8 Wtazabon of mertace 9 Ulization of meriace 10 Utikza
11. SNMPVALUE In case you would like to filter out loopback interfaces from returned values you could put SNMPVALUE into filter Macro and A AI I Ao regular expression into Regexp text fields See above for more information about the filter In SNMP OID field we have to put an OID that is capable of generating meaningful values for these macros To understand what we mean let us perform snmpwalk on our switch snmpwalk v 2c c public 192 168 1 1 IF MIB ifDescr IF MIB ifDescr 1 STRING WAN IF MIB ifDescr 2 STRING LAN1 IF MIB ifDescr 3 STRING LAN2 Macro SNMPINDEX takes its value from the part of the OID that is after ifDescr in this example 1 2 3 Macro SNMPVALUE comes from the value of the corresponding OID here WAN LANI LAN2 Thus our snmp discovery item would return three sets of macro gt value pairs SNMPINDEX gt 1 SNMPVALUE gt WAN SNMPINDEX gt 2 SNMPVALUE gt LAN1 SNMPINDEX gt 3 SNMPVALUE gt LAN2 https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 9 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM Discovery rule Type SNMPv2 agent xl 1 snup o SNMP communiy Port 161 Update interval in sec 30 Flexible intervals Interval Period Action esp wst resourses pero mien 0 e me e i E a Status Enabled gt The following screenshot illustrates how we can
12. Template Template HP Procurve Appications 8 items 0 Iriggers 0 Graphs 0 Screens 0 Discovery rules 1 Name tems Triggers Graphs Key interval Type Status Error Interfaces Item prototypes 8 Trigger prototypes 2 Graph prototypes 1 snmp discovey 30 SNMPV2 agent Enabled EJ https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 13 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM When server runs it will create real items triggers and graphs based on the values snmp discovery returns In host s configuration they will be prefixed with a golden link to a discovery rule they come from Items Orsplaying 113 to 140 of 241 found rie Hostist Most ProCurve 49008 Swech 2626 Montored Availablity Unknown Appications 8 Nems 241 Jnogers 60 Graphs 30 Discovery rules 1 O on E o C interfaces fnOctets 23 lt Previous 1121314151681 71819 Next gt MnOctets 23 3 Interfaces MinOctets 24 finOctets 24 3 Interfaces inOctets 25 MnOctets25 Ww Interfaces inOctets 26 MinOctets 26 Ww ntertaces inOctets 63 inOctets 63 WwW intetaces fnOctets 6 MnOctets 67 30 interfaces MnOctets 69 finOctets r69 30 interfaces MinOctets 4158 FinOctets 4158 30 Interfaces OperStatus 1 Triggers 1 OperStatus 1 30 nterfaces OperStatus 2 Triggers 1 OperStatus 2 30 interiaces fOperStatus 3 Triggers 1 POperStatus 3 30 interfaces OperStatus4
13. Zabbix Manual Zabbix 11 21 13 4 25 PM Zabbix Manual Welcome to the user manual for Zabbix 2 0 software These pages are created to help our users successfully manage their monitoring tasks with Zabbix from the simple to the more complex 2 0 manual txt Last modified 2012 05 23 11 27 by martins v Except where otherwise noted content on this wiki is licensed under the following license CC Attribution Noncommercial Share Alike 3 0 Unported http creativecommons org licenses by nc sa 3 0 https www zabbix com documentation 2 0 manual Page 1 of 1 13 Discovery Zabbix 12 5 13 1 33 PM 13 Discovery 2 0 manual discovery txt Last modified 2011 12 27 17 55 by martins v Except where otherwise noted content on this wiki is licensed under the following license CC Attribution Noncommercial Share Alike 3 0 Unported http creativecommons org licenses by nc sa 3 0 https www zabbix com documentation 2 0 manual discovery Page 1 of 1 1 Network discovery Zabbix 12 5 13 1 34 PM 1 Network discovery Overview Zabbix offers automatic network discovery functionality that is effective and very flexible With network discovery properly set up you can speed up Zabbix deployment simplify administration use Zabbix in rapidly changing environments without excessive administration Zabbix network discovery is based on the following information IP ranges Availability of external services FTP SSH WEB POP3 IMAP TCP
14. anual discovery network_discovery rule Page 1 of 5 Configuring a network discovery rule Zabbix 12 5 13 1 34 PM Note Each IP address should be included only once having multiple rules for a single IP address can have unexpected behavior such as having deadlocks and or duplicate hosts in the database The same could happen if two hosts having the same DNS name are included in separate discovery rules Delay This parameter defines how often Zabbix will execute the rule seconds Zabbix will use this list of checks for discovery Supported checks SSH LDAP SMTP FTP HTTP POP NNTP IMAP TCP Zabbix agent SNMPv1 agent SNMPv2 agent SNMPv3 agent ICMP ping A protocol based discovery uses the net tcp service functionality to test each host except for SNMP which queries Checks an SNMP OID Zabbix agent is tested by querying an item Please see agent items for more details The Ports parameter may be one of following Single port 22 Range of ports 22 45 List 22 45 55 60 70 Uniqueness criteria may be IP address no processing of multiple single IP devices If a device with the same IP already exists it will be considered already discovered and a new host will not be added Type of discovery check either SNMP or Zabbix agent check Statyk Active the rule is active and will be executed by Zabbix server Disabled the rule is not active It won t be executed A real life scenario Device uniqueness criteria
15. based on net if discovery net if in lIFNAME bytes net if out lFNAME bytes See above for more information about the filter 3 3 Discovery of SNMP OIDs In this example we will perform SNMP discovery on a switch First go to Configuration gt Templates https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 8 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM Templates Grove lt j Templates t Applications Rems Triggers Graphs Screens Discovery Linked tempimtes Linked to SOLES i rege rs Aih Has wan he leroisie Ann MSO he ches Dae teres 14 eepoers 1 Grape 2 creer L E ery U JUS iliii ELT aih 2inins bi Tenrpklie Ano Jabea Sere Atol P ler 6 Tacen 74 Gi J SOP Di n y 0 abe vervei Terplaie HP Procurve Agotcatens 0 lems 0 Tepe Graphs Sowers 0 0 ule HP f ifwe ApObCAD it let PJ Taggers 0 Letts ub JOWA H D very 1 ve D0008 Swa T J To edit discovery rules for a template click on the link in the Discovery column Then press Create rule and fill the form with the details in the screenshot below Unlike file system and network interface discovery the item does not necessarily have to have snmp discovery key item type of SNMP agent is sufficient Also unlike the previous examples this discovery item will generate two macros for each discovered entity SNMPINDEX and
16. ble intervals Keep lost This field allows you to specify for how many days the discovered entity will be retained won t be deleted once its resources discovery status becomes Not discovered anymore max 3650 days period in Note If set to 0 entities will be deleted immediately Using 0 is not recommended since just wrongly editing the days filter may end up in the entity being deleted with all the historical data The filter can be used to only generate real items triggers and graphs for certain file systems It expects POSIX Extended Regular Expression For instance if you are only interested in C D and E file systems you could put FSNAME into Macro and AC AD AE regular expression into Regexp text fields Filtering is also possible by file https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 3 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM system types using FSTYPE macro e g Aext Areiserfs Filter You can enter a regular expression or reference a global regular expression in Regexp field In order to test the regular expression you can use grep E for example for f in ext2 nfs reiserfs smbfs do echo f grep E ext reiserfs echo SKIP f done Description Enter a description Enabled the rule will be processed Disabled the rule will not be processed Not supported the item is not supported This
17. d Zabbix will automatically start the discovery and generating discovery based events for further processing Step 2 Defining an action for adding the discovered Linux servers to the respective group template agaca Type of calculation AND OR A and B and C and D Conditions Label Name A Received value like Linux 8 Uptime Downtime gt 3600 C Discovery status Up D Service type Zabbix agent New condition f Service type xj gt Zabba agent xj The action will be activated if the Zabbix agent service is up the value of system uname the Zabbix agent key we used in rule definition contains Linux Uptime is more than 1 hour 3600 seconds https www zabbix com documentation 2 0 manual discovery network_discovery rule Page 3 of 5 Configuring a network discovery rule Zabbix 12 5 13 1 34 PM Action Conditions Operations Add to host groups Linux servers i Link to templates Template OS Linux The action will execute the following operations add the discovered host to the Linux servers group and also add host if it wasn t added previously link host to the Template_Linux template Zabbix will automatically start monitoring the host using items and triggers from Template_Linux Step 3 Defining an action for adding the discovered Windows servers to the respective group template neon J comm Type of calculation AND
18. e to use whatever names you like Noncommercial Share Alike 3 0 Unported http creativecommons org licenses by nc sa 3 0 2 0 manual discovery low_level_discovery txt Last modified 2013 05 17 15 45 by martins v Except where otherwise noted content on this wiki is licensed under the following license CC Attribution https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 16 of 16
19. hare Alike 3 0 Unported http creativecommons org licenses by nc sa 3 0 https www zabbix com documentation 2 0 manual discovery network_discovery Page 2 of 2 Configuring a network discovery rule Zabbix 12 5 13 1 34 PM Configuring a network discovery rule Overview To configure a network discovery rule used by Zabbix to discover hosts and services Go to Configuration gt Discovery Click on Create rule or on the rule name to edit an existing one Edit the discovery rule attributes Rule attributes Name Local network Discovery by proxy No proxy f IP range 192 168 1 1 100 Delay in sec 3600 Checks ICMP ping Remove Pree TTP seseseesesseseeseesesss Pree CITT Device uniqueness criteria i IP address SNMPv2 agent 1 3 6 1 2 1 1 1 0 Zabbix agent system uname Enabled Y Save Clone Delete Cancel Unique name of the rule For example Local network What performs discovery no proxy Zabbix server is doing discovery lt proxy name gt this proxy performs discovery Discovery by proxy The range of IP addresses for discovery It may have the following formats Single IP 192 168 1 33 Range of IP addresses 192 168 1 1 255 IP mask 192 168 4 0 24 Supported IP masks IP range 16 32 for IPv4 addresses 112 128 for IPv6 addresses List 192 168 1 1 255 192 168 2 1 100 192 168 2 200 192 168 4 0 24 https www zabbix com documentation 2 0 m
20. is necessary to know that the returned value contains a list of macro gt value pairs For instance item net if discovery might return two pairs IFNAME gt lo and IFNAME gt ethO Low level discovery items vfs fs discovery net if discovery are supported since Zabbix agent version 2 0 On a Zabbix proxy the return value of low level discovery rule is limited to 4000 characters with Oracle DB and 2048 characters with IBM DB2 These macros are then used in names keys and other prototype fields that are basis for creating real items triggers and graphs for each discovered entity These macros can be used for item prototypes in names keys SNMP OIDs calculated item formulas SSH and Telnet scripts database monitor item parameters for trigger prototypes in names expressions insofar as when referencing an item key prototype for graph prototypes in https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 1 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM Names When the server receives a value for a discovery item it looks at the macro gt value pairs and for each pair generates real items triggers and graphs based on their prototypes In the example with net if discovery above the server would generate one set of items triggers and graphs for the loopback interface lo and another set for interface ethO The
21. iscovered hosts Link to templates etc If the hosts that will be auto registering are likely to be supported for active monitoring only such as hosts that are firewalled from your Zabbix server then you might want to create a specific template like Template_Linux active to link to Agent configuration file Make sure that you have the Zabbix server identified in the agent configuration file zabbix_agentd conf nen eee ee Unless you specifically define a Hostname in zabbix_agentd conf the system hostname of agent location will be used for naming the host The system hostname in Linux can be obtained by running the hostname command https www zabbix com documentation 2 0 manual discovery auto_registration Page 1 of 2 2 Active agent auto registration Zabbix 12 5 13 1 34 PM Restart the agent after making any changes to the configuration file 2 0 manual discovery auto_registration txt Last modified 2013 05 16 12 36 by richlv Except where otherwise noted content on this wiki is licensed under the following license CC Attribution Noncommercial Share Alike 3 0 Unported http creativecommons org licenses by nc sa 3 0 https www zabbix com documentation 2 0 manual discovery auto_registration Page 2 of 2 3 Low level discovery Zabbix 12 5 13 1 34 PM 3 Low level discovery Overview Low level discovery provides a way to automatically create items triggers and graphs for different entities ona computer For
22. or checks The feature might be very handy for automatic monitoring of new Cloud nodes As soon as you have a new node in the Cloud Zabbix will automatically start the collection of performance and availability data of the host Active agent auto registration also supports the monitoring of added hosts with passive checks When the active agent asks for checks providing it has the ListenIP or ListenPort configuration parameters defined in the configuration file these are sent along to the server If multiple IP addresses are specified the first one is sent to the server Server when adding the new auto registered host uses the received IP address and port to configure the agent If no IP address value is received the one used for the incoming connection is used If no port value is received 10050 is used Configuration Configuring active agent auto registration requires that you set up an action for agent auto registration and have required parameters set in the agent configuration file Setting up network discovery is not required to have active agents auto register Action for active agent auto registration Go to Configuration gt Actions select Auto registration as the event source and click on Create action In the Action tab give your action a name In the Conditions tab no conditions are required In the Operations tab add relevant operations such as Add host Add to host groups for example D
23. rile systems for discovery Status Enable gt Save Cancel Name of discovery rule The type of check to perform discovery should be Zabbix agent for file system discovery An item with vfs fs discovery key is built into the Zabbix agent on many platforms see supported item key list for details and will return a JSON with the list of file systems present on the computer and their types This field specifies how often Zabbix performs discovery In the beginning when you are just setting up file system Update discovery you might wish to set it to a small interval but once you know it works you can set it to 30 minutes or more interval in because file systems usually do not change very often sec Note If set to 0 the item will not be polled However if a flexible interval also exists with a non zero value the item will be polled during the flexible interval duration You can create exceptions to Update interval For example Interval O Period 6 7 00 00 24 00 will disable the polling at the weekend Otherwise default update interval will be used If multiple flexible intervals overlap the smallest nterva value is used for the overlapping period See Time period specification page for description of the Period format Note If set to 0 the item will not be polled during the flexible interval duration and will resume polling according to the Update interval once the flexible interval period is over Flexi
24. t S Sfsname s g print t n if not first Sfirst 0 print t n print t t FSNAME Sfsname n print t t FSTYPE Sfstype n print t n https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 15 of 16 3 Low level discovery Zabbix I I L print n t n print n 12 5 13 1 34 PM An example of its output reformatted for clarity is shown below JSON for custom discovery checks has to follow the same format data Fe Ne ee a a a FSNAME FSNAME FSNAME NGG sys FSNAME FSNAME FSNAME FSNAME lib init rw FSNAME FSNAME FSNAME FSNAME FSNAME FSNAME NI DEOG y dev dev pts ANL dev shm home tmp usr var sys fs fuse connections FSTYPE FSTYPE FSTYPE FSTYPE FSTYPE FSTYPE FSTYPE FSTYPE FSTYPE FSTYPE FSTYPE FSTYPE FSTYPE rootfs sysfs proc devtmpfs devpts ext3 tmpfs tmpfs ext3 ext3 ext3 ext3 fusectl Then in the discovery rule s Filter field we could specify FSTYPE as a macro and rootfs ext3 as a regular expression You don t have to use macro names FSNAME FSTYPE with custom LLD rules you are fre
25. t Zabok server Montored Availabity Avaiadle Appicatons 11 items 65 Triggers 41 Graphs 10 Discovery ruies 2 112 Next gt Severity Name Expression Waming mp Zabbe server vts fie chsurni etc passwd difNON gt 0 information Tempis Zabbe server heme maxties las 0y lt 1024 information 7 Zabbe server kemel maxproc las 0 lt 256 Warming Template OS Linux Disk VO i overloaded on Zabbix server abba server system cpu utii iowal lasq0yj gt 20 Waming Mounted fiesystem discovery Free disk space 5 less than 20 on volume Zabbe server vts ts size ptre lastj lt 20 Waming Mounted Mesysiem discovery Free nodes is less than 20 on volume Zabbe servervts fs inode ptree las oj j lt 20 Graphs Displaying 1 to 10 of 10 found Hostist Host Zabbix server Montored Availabilty Available Applications 11 items 65 Trogers 41 Graphs 10 rules 2 Name Width Height Graph type piat CPU jumps 900 200 Normal man r CPU load 900 200 Norma T C CPU utilization 300 200 Stacked Mounted Mesystem discovery Disk space usage 600 340 Pe 3 2 Discovery of network interfaces Discovery of network interfaces is done in exactly the same way as discovery of file systems except that you use the discovery rule key net if discovery instead of vfs fs discovery and use macro IFNAME instead of FSNAME in filter and item trigger graph prototypes Examples of item prototypes that you might wish to create
26. t Discovery Mounted filesystem discovery item prototypes 5 Trigger prototypes 2 Graph prototypes 1 Nome t Width Height Graph type Disk space usage FSNAME 600 340 Pe Finally we have created a discovery rule that looks like shown below It has five item prototypes two trigger prototypes and one graph prototype Discovery rules Displaying 1 to 2 of 2 found Template ist Template Tempie OS Linux Applications 10 Nems 32 Triggers 15 Graphs 4 Screens 1 Discovery rules 2 Nome t Items Triggers Graphs Key interval Type Status Error Mounted fiesysiem discovery ltem prototypes 5 Trigger prototypes 2 Graph prototypes 1 vwisis discoverny 3600 Zabb agemt Enabled The screenshots below illustrate how discovered items triggers and graphs look like in the host s configuration Discovered entities are prefixed with a golden link to a discovery rule they come from hems Cespanying 33 to 64 of 67 wuni Fee aoa Woot Cobian soreer Moran ed eee fopiatong 1 keme 67 Triggers 41 maces Peet eee lt Peewious 1112121 Neet gt Wid Nome Tiopers Key t beeren Hisory engs Type Appications Satus Error lermiete OS Lmas Marber of baned n marn nem uen ram to 7 3650 Tabbmagest OS Secuty Enabled Termite OS Lous Chechaan ot mterpesgeet Taggers 1 wis fie chsamd enn pasend ww 7 50 Labbe agent Sensty Coane erred Hicran Jecovery Fane nodes on percentage Taggers C se fs nodel ghee 60 7 15 Zad k
27. they get interfaces created according to these rules the services detected for example if an SNMP check succeeded an SNMP interface will be created if a host responded both to Zabbix agent and SNMP requests both types of interfaces will be created if uniqueness criteria are Zabbix agent or SNMP returned data the first interface found for a host will be created as the default one Other IP addresses will be added as additional interfaces if a host responded to agent checks only it will be created with an agent interface only If it would start responding to SNMP later additional SNMP interfaces would be added if 3 separate hosts were initially created having been discovered by the IP uniqueness criteria and then the discovery rule is modified so that hosts A B and C have identical uniqueness criteria result B and C are created as additional interfaces for A the first host The individual hosts B and C remain In Monitoring gt Discovery the added interfaces will be displayed in the Discovered device column in black font and indented but the Monitored host column will only display A the first created host Uptime Downtime is not measured for IPs that are considered to be additional interfaces 2 0 manual discovery network_discovery txt Last modified 2012 07 09 13 38 by martins v Except where otherwise noted content on this wiki is licensed under the following license CC Attribution Noncommercial S
28. tion of mierface 1 Utizaton of mertace 12 Uliization of merdace 13 3 4 Creating custom LLD rules Group Swich App cations 8 Width 900 900 901 900 900 900 900 900 j Host tems 241 Height 100 100 100 100 100 100 100 100 100 100 100 100 100 Triggers 60 Graphs 30 Graph type Normal Normal Norma Normal Normal Norma Normal Normal Norma Normal Norna Normal Norna It is also possible to create a completely custom LLD rule discovering any type of entities for example databases on a database server To do so a custom item should be created that returns JSON specifying found objects and optionally some properties of them The amount of macros per entity is not limited while the built in discovery rules return either one or two macros for example two for filesystem discovery it is possible to return more The required JSON format is best illustrated with an example Suppose we are running an old Zabbix 1 8 agent one that does not support vfs fs discovery but we still need to discover file systems Here is a simple Perl script for Linux that discovers mounted file systems and outputs JSON which includes both file system name and type One way to use it would be as a UserParameter with key vfs fs discovery_perl Sfirst Sfsname usr bin perl t print n print t data n n for cat proc mounts Sfstype m S S
29. use these macros in item prototypes https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 10 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM Keep history in days Keep trends in days Store value Enabled save _cancet_ Again creating as many item prototypes as needed https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 11 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM Item prototypes of Interfaces Displaying 1 to 8 of 8 found ee ae ee L pman m os ee ee oe 30 7 30 7 365 SNMPv2 agent Enabled 30 7 35 SNMPv2 agent Enabled 30 7 365 SNMPv2 agent Enabled 30 7 365 SNMPv2 agent Enabled 30 7 365 SNMPv2 agent Enabled 30 7 365 SNMPv2 agent Enabled 30 7 365 SNMPv2 agent Enabled As well as trigger prototypes Name OperStatus SNMPINDEX on HOST HOST has changed https www zabbix com documentation 2 0 manual discovery low_level_discovery Page 12 of 16 3 Low level discovery Zabbix 12 5 13 1 34 PM Trigger prototypes of interfaces Displaying 1 to 2 of 2 found Function Oraw style Y axis side Colour tme zj ceo000 Lee lt j Let i oomoo Graph prototypes of Interfaces Template ist Template Template HP Procurve Discovery list Discovery interfaces ltem prototypes 8 Trigger prototypes 2 A summary of our discovery rule Discovery rules Displaying 1 to 1 of 1 found Templote ist

Download Pdf Manuals

image

Related Search

Related Contents

FD Trinitron Colour Television KV  MANUAL DEL USUARIO  User`s Manual  8 - ビクセン  

Copyright © All rights reserved.
Failed to retrieve file