Ad Widget

Collapse

How to override the SNMP community string defined on host level by a item prototype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kishorevh85
    Junior Member
    • Sep 2022
    • 3

    #1

    How to override the SNMP community string defined on host level by a item prototype

    Hi, I am new to Zabbix. I am using 6.2 version. I am trying to add an Item prototype with type as SNMP Agent. I could configure the SNMP interface related information only on host level (like SNMP version, port, community string etc.). However in my specific requirement I have to override the SNMP community string at the item prototype level. However there is no facility in the Zabbix UI > Templates > Discovery rules > Item prototypes to override the value.
    To give more clarity on my requirement, I have a discovery rule, which discovers the device interface, and I have a LLD macro to store the index value. The item prototype under this discovery rule has to use this index value and append to the SNMP community string (example if the index values are 1,2,3,4.. the SNMP community string has to be say public_1, public_2, public_3, public_4..).
    Is there any way to achieve this in Zabbix 6.2?

    Apologize for my limited knowledge in this topic.​
  • coda_matt
    Junior Member
    • Nov 2022
    • 20

    #2
    Try setting the Macro.

    Administration > General > Macros

    Click "Add" then set the macro to {$SNMP_COMMUNITY} and the value to your SNMP string.

    If your SNMP community string is different for each host, you need to set it one at a time:

    Configuration > Hosts
    Click on the host to edit it, and set the SNMP community string in the SNMP interface​ - see screenshot
    Attached Files

    Comment


    • kishorevh85
      kishorevh85 commented
      Editing a comment
      Thanks for your response.
      I understand about the host level SNMP community setting as you mentioned. However, my requirement is slightly different here, where my discovered items need to be polled using different community string. The community string is dynamically created as I mentioned in original query. In essence I need to override the community string at the Item Prototype level.
Working...