Ad Widget

Collapse

Low level discovery - anyone doing anything interesting beyond the basics?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ericgearhart
    Senior Member
    • Jan 2009
    • 115

    #1

    Low level discovery - anyone doing anything interesting beyond the basics?

    I've finally gotten the time and motivation to play around with the new SNMP low level discovery feature that will be in Zabbix 2.0, and lemme tell ya, it's awesome. Items automatically "create themselves" based on the ifAlias OID I have set up, graphs automatically "create themselves," it's basically gotten me to where I feel like Zabbix is ready to eclipse Cacti in terms of SNMP ease of use. I build a host, define its SNMPv3 config, and Zabbix 'walks' the device and just builds stuff based on what it finds. I even have the ifAlias (interface description defined in the switch) getting automatically added to the graph title

    I would export the low level discovery template I buillt, but there's an open bug where LLD config data doesn't export right now (see https://support.zabbix.com/browse/ZBX-3531 for the details)

    The reason I started this thread was to ask if anyone is doing anything interesting with LLD I haven't thought of, or just in general if anyone else has played with SNMP LLD
    Last edited by ericgearhart; 19-02-2012, 18:58. Reason: re-pointed URL at correct bug
  • Yello
    Senior Member
    • Apr 2011
    • 309

    #2
    Hi,
    Not doing anything yet since we've not installed a version that can do LLD. But the subject is interesting.

    You imply that you believe more can be done with LLD. Can you elaborate on your thinking? I had assumed that it was simply to allow discovery of stuff like host specific interfaces and filesystems - a useful time saver. Seeing as my team primarily monitors disparate application environments that is probably not going to transform my monitoring landscape.

    However, can I ask, how are you controlling what gets pulled from a MIB? After all, MIBs are big. Does LLD grab everything it can see?


    Regards,
    David

    Comment

    • ahowell
      Member
      • Jan 2011
      • 66

      #3
      LLD with snmp just works with snmp indexes. It only discovers the index you point it to. You wouldn't configure it to walk an entire device for example. But you configure it to discover all the fans in a server, or ports on a switch for example.

      Fan discovery rule on a Dell R710 for example

      You just point it to the SNMP OID coolingDeviceLocationName.1 and it discovers all the fans, and you create a prototype item against that discovery rule with the SNMP OID of coolingDeviceReading.1.{#SNMPINDEX} and it will then create items for each of the Fans and query that OID for their values.

      See the manual for more examples.

      http://www.zabbix.com/documentation/...evel_discovery

      Comment

      • netmon
        Member
        • Feb 2012
        • 30

        #4
        I'm trying to use LLD, but right now I cannot use it for my purposes. It seems, that LLD is only able to use the last part of the OID as an SNMPINDEX.
        Check my other post: Serious SNMP support in Zabbix?

        Comment

        • netmon
          Member
          • Feb 2012
          • 30

          #5
          well depending on how you define "beyond the basics" you could take a look at:

          Advanced SNMP LLD - Dynamic Indexes
          My Addons to the Zabbix Monitoring Solution. Contribute to simonkowallik/Zabbix-Addons development by creating an account on GitHub.


          Comment

          • ericgearhart
            Senior Member
            • Jan 2009
            • 115

            #6
            Originally posted by netmon
            well depending on how you define "beyond the basics" you could take a look at:

            Advanced SNMP LLD - Dynamic Indexes
            github.com/simonkowallik/Zabbix-Addons
            Yes that's definitely what I had in mind in terms of going "beyond the basics"

            That script you've created is pretty cool... if I run into the problem where I need the 'second to last' number in the OID I'm trying to monitor, I'll give your solution a shot

            Comment

            • alledm
              Member
              • May 2012
              • 84

              #7
              Hi,
              I am using it to simplify the monitoring of certain services when they change from one server to the other.

              i.e. say that each agent needs to check if it can connect to different IP/Ports per host, rather than specifying it via templates, I have created a JSON file under /etc/zabbix_custom/services.discovery which contains a file like:

              Code:
              {
                "data":[
                { "{#NAME}":"SERVICE NAME1", "{#IP}":"172.20.20.20", "{#PORT}":"7001" },
                { "{#NAME}":"SERVICE NAME2", "{#IP}":"172.20.20.21", "{#PORT}":"7002" }
                  ]
              }

              These files can be managed on each box (also using puppet or spacewalk or similar), whilst making the template configuration extremely easy.

              I then have a

              UserParameter=tibra.generic.discoverfile[*], cat /etc/zabbix_custom/$1 || echo '{"data":[]}'

              although it would be awesome if zabbix provided something to read a file as "LLD", or to create a custom "table" of values that can be attached to a host

              Regards
              Alessandro

              Comment

              • netopier
                Junior Member
                • Mar 2012
                • 16

                #8
                I'm using LLD SNMP for monitoring interfaces which matched regexp in interface description (cisco interface desc, not SNMP).
                We have large network (about 60 Cisco6500) and we don't want monitor all access interfaces. We want monitor only important (up-link) interfaces. So I created some description policy, which enables/disables monitoring for interfaces (now its working for HP-NNM and testing on Zabbix).

                For example:
                I have on SW1 ether-channel 1 as up-link interface. In my description policy i use some flags: M/m = enable/disable monitoring of interface.

                So in Zabbix i just created LLD SNMP with regexp something like:
                ^(.*;.*;M.*;.*;.*;.*)$
                macro:
                {#SNMPVALUE}
                and discovering trough SNMP OIDs:
                .1.3.6.1.2.1.31.1.1.1.18

                Then created some item prototypes same like on Zabbix wiki.
                The result is, that only interfaces tagget with "M" flag in cisco interface description (matched regexp) will be monitored by Zabbix.

                To perfection is missing only one thing...the interface name on Items/Triggers/Graphs. I didn't figure out, how to add normal interface name like "GigabitEthernet 1/1" to name of Items/Triggers/Graphs instead SNMP INDEX number. Without this, it's not usable on large networks and whole LLD loses sense :-/

                Comment

                • ericgearhart
                  Senior Member
                  • Jan 2009
                  • 115

                  #9
                  Originally posted by netopier
                  To perfection is missing only one thing...the interface name on Items/Triggers/Graphs. I didn't figure out, how to add normal interface name like "GigabitEthernet 1/1" to name of Items/Triggers/Graphs instead SNMP INDEX number. Without this, it's not usable on large networks and whole LLD loses sense :-/
                  I've kind of "hacked around" this problem by building discovery rules that are based on 'ifName' as the base discovery item (which gets snmpwalk'ed), and using {#SNMPVALUE} in the graph title - that way I get the interface name in my LLD graphs. If I use 'ifAlias' as the base discovery item I'll get the interface descriptions as the {#SNMPVALUE} variable in graph titles.

                  Unfortunately this gives me an "either/or" situation with graph titles... I can have the interface name in the graph title, or I can have the interface description. What I really need would be the possibility of having both the interface name and description in the graph, but that's a feature request that's currently open (see ZBXNEXT-1: https://support.zabbix.com/browse/ZBXNEXT-1 ). Really if I could make the graph title the interface description, and then add a text item to the graph that uses ifName, where it would show the interface name in the graph 'legend' on the bottom that would be awesome - that would be the best of all worlds.

                  Right now, as yet another hacky thing I have a LLD item that uses "{#SNMPINDEX} - {#SNMPVALUE}" and ifName as its base discovery item.

                  Then the items in Zabbix in my 'graphs' tab show up like this:

                  1 - Gig1/1
                  1 - Sample Interface Description #1
                  2 - Gig1/2
                  2 - Sample Interface Description #2
                  3 - Gig1/3
                  3 - Sample Interface Description #3

                  This at least lets me figure out what interface has "ID #2," what its description is, and what the interface name is that correlated to that snmp index #.

                  Hope that helps! Go vote on ZBXNEXT-1 and hopefully the devs can architect a final solution to having graph names have interface descriptions and interface names all in one shot

                  Comment

                  • netopier
                    Junior Member
                    • Mar 2012
                    • 16

                    #10
                    Originally posted by ericgearhart
                    I've kind of "hacked around" this problem by building discovery rules that are based on 'ifName' as the base discovery item (which gets snmpwalk'ed), and using {#SNMPVALUE} in the graph title - that way I get the interface name in my LLD graphs. If I use 'ifAlias' as the base discovery item I'll get the interface descriptions as the {#SNMPVALUE} variable in graph titles.
                    Yes this is the only way for now I think, but it does not fit to my concept of automonitoring only flaget interfaces (I have to run discovery based on ifAlias OID).

                    So I hope maybe this options will come in new version of Zabbix. Something like {#SNMPIFALIAS} and {#SNMPIFDESCR} macro :-)

                    Comment

                    • AndreyHammer
                      Member
                      • Nov 2007
                      • 57

                      #11
                      Originally posted by netopier
                      So I hope maybe this options will come in new version of Zabbix. Something like {#SNMPIFALIAS} and {#SNMPIFDESCR} macro :-)
                      +1.
                      Еhis function too is necessary to me.
                      I need in items like this: $ifDescr ($ifAlias) In

                      Comment

                      • jix
                        Member
                        • Feb 2011
                        • 73

                        #12
                        !

                        exactly what i need and asked before...

                        Comment

                        • luminescentsimian
                          Junior Member
                          • Jun 2012
                          • 4

                          #13
                          DD-WRT wifi monitoring

                          For no other reason than I just noticed that DD-WRT exports WiFi client signal stats via SNMP I made a template with a discovery rule to discover WiFi clients (my phone & tablet) and log their SNR & dBm's.
                          Attached Files

                          Comment

                          • ke_sheng_jie
                            Member
                            • Aug 2011
                            • 40

                            #14
                            Discovering Windows Automatic Services & Monitoring File Sizes

                            I wrote a powershell script that outputs all the automatic services on a Windows box as a JSON object. We're using this to monitor all automatic services (except for some we've filtered out.) It turns out, not every automatic service actually runs all the time.

                            I also wrote another batch script to output all the files of a particular extension that are larger than 1 GB as a JSON object. We're dynamically monitoring these files and triggering when they get above 2 GB.

                            Comment

                            • thiagomz
                              Member
                              • Jan 2010
                              • 74

                              #15
                              I am trying find the better way to monitor disk i/o stats with zabbix 2 and LLD.... any tip ?

                              Comment

                              Working...