Ad Widget

Collapse

Multiple snmp communities, same host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eduardo Tacara
    Junior Member
    • Nov 2022
    • 4

    #1

    Multiple snmp communities, same host

    I need to monitor Cisco device with vrf, each vrf aswers with a different community, for example:

    default community: abcd

    vrf prod = community abdc-prod
    vrf dev = community abcd-dev

    This community+vrf configuration is automatic from the Cisco device.


    Zabbix 4.2 is possible to configure it direct in Items or Discovery. Zabbix 6 there is no option for comminity in items.

    Zabbix 4:
    Click image for larger version

Name:	image.png
Views:	1324
Size:	45.2 KB
ID:	453898

    Zabbix 6:

    Click image for larger version

Name:	image.png
Views:	1398
Size:	39.8 KB
ID:	453897
  • Eduardo Tacara
    Junior Member
    • Nov 2022
    • 4

    #2
    Any suggestion?

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Even without paid support, you can submit bugs and enhancement requests to the Zabbix bug tracker at https://support.zabbix.com

      Since this was a feature in a previous version and it no longer works, a polite bug report might get them to look into adding it back.

      I haven't tried this, but is it possible at 6.x to create multiple Zabbix 'host' entities that map to the same host, and then assign some SNMP items to one host and some SNMP items to the other host? I'm skeptical how well that will work, but it might be worth experimenting with it.

      Comment

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

        #4
        Where did you set that macro in v4? Host level? Template level?

        Comment

        • Markku
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Sep 2018
          • 1781

          #5
          What I did as a quick'n dirty solution:
          - created multiple SNMP interfaces for the host in Zabbix (with different community strings per VRF, as configured on the switch)
          - created per-VRF discovery rules for the host
          - assigned each discovery rule the correct SNMP interface.

          The only better solution I had in mind was to create the configs programmatically via Zabbix API. But I haven't had a business case for that yet so I have managed with the manually copied (and edited) discovery rules for now.

          I'm open for better suggestions.

          Markku

          Comment

          • jacek
            Member
            • Nov 2008
            • 45

            #6
            Originally posted by Markku
            What I did as a quick'n dirty solution:
            - created multiple SNMP interfaces for the host in Zabbix (with different community strings per VRF, as configured on the switch)
            - created per-VRF discovery rules for the host
            - assigned each discovery rule the correct SNMP interface.

            The only better solution I had in mind was to create the configs programmatically via Zabbix API. But I haven't had a business case for that yet so I have managed with the manually copied (and edited) discovery rules for now.

            I'm open for better suggestions.

            Markku
            Is there a way to handle this via template somehow? Looks like a headache to set this up on every host.

            Comment

            • Markku
              Senior Member
              Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
              • Sep 2018
              • 1781

              #7
              Originally posted by jacek

              Is there a way to handle this via template somehow?
              Yes, I created the discovery rules in a template and attached it to all the routers that had the same set of VRFs.

              Markku

              Comment

              • Pursuit
                Junior Member
                • Mar 2023
                • 1

                #8
                Originally posted by Markku

                Yes, I created the discovery rules in a template and attached it to all the routers that had the same set of VRFs.

                Markku
                Hi!

                In your template, how did you manage to associate the different discovery rules with specific host interfaces? There doesn't seem to be any "Host interface" field in templates.

                Sure, it's possible to change the host interfaces after applying the template, but you'd need to do that for each item prototype inside your discovery rules, which would be... Less than ideal.

                Comment

                Working...