Ad Widget

Collapse

Possibility to share SNMP Credentials

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bsjaekel
    Junior Member
    • Apr 2021
    • 12

    #1

    Possibility to share SNMP Credentials

    Hi,

    We have hundreds of network devices (switches, routers, etc.) that should be monitored by Zabbix through SNMP. All devices use SNMP version 3, the configuration only differs in the access credentials for different site locations. Is it possible to share SNMP credentials somehow between device or a list of devices or do i have to configure it on a per device base over and over again? Maybe auto discovery can help in this situation? How would i handle credential rotation?

    Maybe it would be really nice if configuration can take place on the hostgroup level?


    Thanks for your help!

    Regards

    Sebastian
  • bsjaekel
    Junior Member
    • Apr 2021
    • 12

    #2
    Ok, i will try it. But i still have to configure every hosts SNMP interface (see screenshot) and have to put the macros in there right? There is no way to provide these configurations automatically for a host group or am i wrong? Can this be solved with auto discovery? What happens if i have to update the credentials?

    Click image for larger version

Name:	screen_zabbix_snmp_cred.png
Views:	260
Size:	34.3 KB
ID:	422927

    Comment

    • bsjaekel
      Junior Member
      • Apr 2021
      • 12

      #3
      *sigh* Ok, understood... thanks for clarifying. That's a huge disadvantage compared to other solutions like e.g. Icinga or checkmk. With checkmk it's possible to organize your hosts in a folder structure and provide sorts of configuration (e.g. SNMP credentials) on the folder level, settings get inherited then on hosts and can be overridden on any level.

      I will have to automate this, otherwise it's not usable with hundreds of network devices. I will try the Ansible modules for Zabbix.

      Thanks for your help!

      Sebastian

      Comment

      • Glencoe
        Zabbix developer
        • Oct 2019
        • 152

        #4
        Originally posted by bsjaekel
        But i still have to configure every hosts SNMP interface (see screenshot) and have to put the macros in there right? There is no way to provide these configurations automatically for a host group or am i wrong? Can this be solved with auto discovery?
        Even though Zabbix is complicated it's no torture device, you don't have to edit all your hosts manually. You have several options here.

        First, you can use network discovery (Configuration -> Discovery). Zabbix will scan provided IP ranges (it can check for SNMP capable devices too) and add your hosts to the system if you configure the corresponding action for that discovery rule. In the action's operation, you can specify what template(s) to link your host to. You just need to have different templates with different credentials and link the proper credential template. The easiest way to do this is to define multiple network discovery rules and add multiple actions - one per discovery rule. This will work if you have different SNMP credentials in different subnets. Alternatively, you can link your templates based on the values received from the SNMP hosts, look for "Received value" in action's condition.

        Another option is to use LLD (low-level discovery). It's arguably more difficult to understand and configure but you will be rewarded with finer-grained control and a better level of automation. For LLD to work, you need some source specifying what hosts you have. You need to create an LLD discovery rule on some "meta" host, specify how this rule gets its data and add host prototypes to it. Zabbix can either poll this source periodically or you can push it when you need. Every time Zabbix processes this rule it either creates or updates or deletes the hosts in a way you described in the host prototype. In the LLD discovery rule you can also define so-called LLD overrides, which control what templates your hosts will be linked to. You need to spend some time to configure all this but you get fully automated configuration in exactly the way you need.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4806

          #5
          Linked templates? One has only macros with credentials linked to template with items. Multiple "credential templates"can be linked to one base template... Assign credentials template to host, it will bring linked items also....

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4806

            #6
            ah ... damn , I forgot it changed in v5....I'm still riding with 4.4 here..
            Yea, still have to go over all hosts, then its better to populate with correct data already.. But do it over API and for all at once. You can prepare data and feed it to script, which will do update for yo...

            Comment

            Working...