Ad Widget

Collapse

What macros i should use for SNMP V3 ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • FildaSmile
    Member
    • Jul 2019
    • 61

    #1

    What macros i should use for SNMP V3 ?

    Hello, im zabbix 4.4 user

    until now i used SNMP v2c , so community and port number was enough: {$SNMP_COMMUNITY}, {$SNMP_PORTNUM}

    Because security i would use V3 but i have problems connect my SNMP V3 device to zabbix.

    I already configured these macros in global macro values (i using authPriv (sha+aes)):

    {$SNMP_AUTHPASS}
    {$SNMP_PRIVPASS}
    {$SNMP_USERNAME}

    When i check host and the macros, there are two options,

    but im not sure if i using correct maros ? i added these macros in global macros configure but zabbix saying me "No securityName specified"
    i searched at internet and found something about that htere should be {$SNMP_SECNAME} instead {$SNMP_USERNAME} but the thread was for another version of zabbix.

    Could you please advice me what macros i should use for SNMP V3 monitoring ?

    Thank you
    Last edited by FildaSmile; 06-04-2020, 09:15.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Macros are an auxiliary feature.
    First, find out / see how the snmpv3 data elements are configured.
    Try getting the values simply by specifying the desired parameters without macros.
    When data is received successfully, then find out which parameters are defined via macros.

    Comment


    • FildaSmile
      FildaSmile commented
      Editing a comment
      Hello, i got it, i need use {$SNMP_SECNAME} instead {$SNMP_USERNAME}. My SNMPV3 device now working and i recieving some values so i figured it out.

      To be honest i dont know how find out which parameters are defined via macros while im not using macros, thing is that i can have hardcoded SNMP parameters in each item and it runs, but even though i dont see macros.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #3
    Originally posted by FildaSmile
    Could you please advice me what macros i should use for SNMP V3 monitoring ?
    I think the bit of information that you should have included is whether you are using someone else's templates, and if so, which templates specifically.

    If you write all your own items, triggers, and associated Zabbix config, you could do all that without ever using macros.

    Now, macros are an awesome feature to allow for per-host customization and the more experience you have with Zabbix the more places you might potentially want to use them, but one of the most important places to use them is with templates. Well-written templates make use of macros in potentially many places.

    Most templates are going to have default values set for any macros that the templates utilize. You can see what the default values are for user macros by finding the specific template (Configuration->Templates and click on the link in the list) and then clicking the "Macros" tab once the specific template is selected. A well-written template will have default settings for every macro it uses, so by looking at all the default values, you have some idea of what things you can configure with that specific template using macros.

    Comment

    • FildaSmile
      Member
      • Jul 2019
      • 61

      #4
      Hello, i using templates created by converting official MIB files into *.xml template.

      I using mib2zabbix convertor https://github.com/cavaliercoder/mib2zabbix

      normally when i create snmpv2 template it is enough specify {$SNMP_COMMUNITY}, {$SNMP_PORTNUM} but i just didnt know what macros i should use for snmpv3 - fortunately i found it on the internet so my issue is solved, no i have different issue because im not able to choose valuemapping in my items , the whole items (when i open it) looks gray (uploaded screenshot), this item was made by item discovery -> it is possible that it is the reason ? if so how i can change the value mapping from As is to my custom ? tried disable item but it didnt help.

      Attached Files

      Comment

      Working...