Ad Widget

Collapse

Figuring out the automatic discovery of network devices

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skym
    Junior Member
    • Jun 2020
    • 23

    #1

    Figuring out the automatic discovery of network devices

    Hi there,

    I'm running Zabbix version 5.0.1, and proxy version 5.0.1.
    I'm trying to setup automatic discovery of network equipment of different manufacturers and filter the adding and automatic linking of template by the use of SNMP OID discovery check and if it contains the manufacture's name.


    Discovery action rule:
    Discovery check equals Automatic discovery of network devices: SNMPv2 agent (161-162) "1.3.6.1.2.1.1.1"
    Received value contain <manufacturer>

    Operations:
    Add host
    Add to host group
    Link to template

    I did check the logs, and there's nothing about it so I'm at a lost how you're supposed to get it to automatically do it?
    Last edited by skym; 02-07-2020, 13:49.
  • Jvlavl
    Member
    • Sep 2015
    • 37

    #2
    Think that you miss your discover rule in the actions part
    In actions

    Discovery rule equals Your discover rule
    Received value contains Your Value
    Discovery status equals Up
    Service type equals SNMPv2

    Operations
    add host to group
    Link template


    That should do the trick

    Comment

    • skym
      Junior Member
      • Jun 2020
      • 23

      #3
      Originally posted by Jvlavl
      Think that you miss your discover rule in the actions part
      In actions

      Discovery rule equals Your discover rule
      Received value contains Your Value
      Discovery status equals Up
      Service type equals SNMPv2

      Operations
      add host to group
      Link template


      That should do the trick
      Which action do you mean or do you just mean that one condition is missing which is why it's not working? In Trigger actions, Discovery actions, Autoregister actions or Internal actions?

      Comment

      • Jvlavl
        Member
        • Sep 2015
        • 37

        #4
        in Discovery actions

        Comment

        • skym
          Junior Member
          • Jun 2020
          • 23

          #5
          Originally posted by Jvlavl
          in Discovery actions
          It didn't fix the issue, still not doing it automatically.

          Comment

          • skym
            Junior Member
            • Jun 2020
            • 23

            #6
            I'm still stuck at this.. The devices are discovered, but not added.

            Comment

            • Mike2K
              Member
              • Oct 2018
              • 62

              #7
              Could you show us your discovery rule ?

              Comment

              • skym
                Junior Member
                • Jun 2020
                • 23

                #8
                Originally posted by Mike2K
                Could you show us your discovery rule ?
                Discovery Rule:

                Click image for larger version

Name:	Discovery_Rule.PNG
Views:	5763
Size:	33.0 KB
ID:	404610

                Discovery action:

                Click image for larger version

Name:	Action_Discovery.PNG
Views:	5760
Size:	29.1 KB
ID:	404611

                Comment


                • Noobz
                  Noobz commented
                  Editing a comment
                  What happens if you change the type of calculation to simple "and" instead of custom?

                • skym
                  skym commented
                  Editing a comment
                  That does absolutely nothing.
                  Last edited by skym; 07-07-2020, 13:09.

                • Noobz
                  Noobz commented
                  Editing a comment
                  Ok just wondering as I have basically the same discovery rule, doing the same checks and applying the same actions. Only difference is that mine is just an AND rule, thought it may be some kind of bug with the way the custom rule was processed.
              • pavars
                Junior Member
                • Jul 2020
                • 6

                #9
                skym how does your network discovery look? Have you actually enabled network discovery under Configuration -> Discovery for your network segment?

                You can check the status of discovery under Monitoring -> Discovery, here is some more documentation

                It sounds more like the actions are not executed. Have you checked with snmpget from Zabbix Server if you are getting the correct value?

                Comment

                • skym
                  Junior Member
                  • Jun 2020
                  • 23

                  #10
                  Originally posted by pavars
                  skym how does your network discovery look? Have you actually enabled network discovery under Configuration -> Discovery for your network segment?

                  You can check the status of discovery under Monitoring -> Discovery, here is some more documentation

                  It sounds more like the actions are not executed. Have you checked with snmpget from Zabbix Server if you are getting the correct value?
                  Discovery is working ish, I'm not sure if it's just the pinging part that works, but snmpget does get the right values, and discovery tab (in Monitoring -> Discovery) shows the devices.

                  P.S The proxy is the only one with access to the devices, and I have checked that snmpwalk works from it.
                  Last edited by skym; 07-07-2020, 08:31.

                  Comment

                  • pavars
                    Junior Member
                    • Jul 2020
                    • 6

                    #11
                    You can add some arbitrary Discovery Action ie. that executes "echo test" on Zabbix server. Then you can see in Reports -> Action Log if the action was executed. If it's not executed you probably have something wrong in discovery conditions, strip it down and find what's breaking it until you see the remote command action being logged. Another thing is that your uptime has to be 10min, for testing purposes you can remove it.

                    Comment

                    • skym
                      Junior Member
                      • Jun 2020
                      • 23

                      #12
                      Originally posted by pavars
                      You can add some arbitrary Discovery Action ie. that executes "echo test" on Zabbix server. Then you can see in Reports -> Action Log if the action was executed. If it's not executed you probably have something wrong in discovery conditions, strip it down and find what's breaking it until you see the remote command action being logged. Another thing is that your uptime has to be 10min, for testing purposes you can remove it.
                      I already have a kind of a test action, as it's supposed to send me an email, but there's nothing in action log for the past day nor have I gotten an email.

                      Comment

                      • pavars
                        Junior Member
                        • Jul 2020
                        • 6

                        #13
                        Originally posted by skym

                        I already have a kind of a test action, as it's supposed to send me an email, but there's nothing in action log for the past day nor have I gotten an email.
                        I would suggest you to review your conditions thoroughly, maybe there is a mistake somewhere, try simplifying it and adding more checks on it after you are sure that it works

                        Comment

                        • skym
                          Junior Member
                          • Jun 2020
                          • 23

                          #14
                          Originally posted by pavars

                          I would suggest you to review your conditions thoroughly, maybe there is a mistake somewhere, try simplifying it and adding more checks on it after you are sure that it works
                          It is really simple already. If I don't have a ping as a check, none of the devices are discovered (Show up in Monitoring -> Discovery) even though I can use snmpwalk and check that my OID I'm using is valid so I don't really know what's the issue with it?

                          There's basically two checks, both of which are SNMP and I have checked that both of my OID's are valid with snmpwalk.

                          Test Action:
                          Click image for larger version

Name:	Zabbix-Test-Action.jpg
Views:	3788
Size:	30.4 KB
ID:	404783
                          Last edited by skym; 08-07-2020, 07:54.

                          Comment

                          • skym
                            Junior Member
                            • Jun 2020
                            • 23

                            #15
                            Any ideas people? I'm still stuck.

                            Comment

                            Working...