[ZBX-8094] SNMP Macro replace issue Created: 2014 Apr 15 Updated: 2017 May 30 Resolved: 2014 Apr 16 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.2.2 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Minor |
Reporter: | Little Martian | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | macro, oid, snmp | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Red Hat Enterprise Linux 5, Zabbix 2.2.1 (revision 40808) |
Attachments: |
![]() ![]() |
Description |
I'm trying to monitor some SNMP items using Template level macros combined with item level values. When server replaces macros, some values appear in the generated oid string that are not referrence anywere. Example: Item resulted string should be: .1.3.6.1.4.1.11.2.29.2.5.3.2.1.6.0, actual string: .1.3.6.1.4.1.11.2.29.2.5.3.10.2.1.6.0 Log: |
Comments |
Comment by Aleksandrs Saveljevs [ 2014 Apr 16 ] |
It seems incredible to me that Zabbix can append ".10" to {$BASE_OID} out of thin air. Could you please check that this macro is not redefined on the host level or somewhere in downstream templates? If everything seems OK, please export the necessary templates and the host, and attach their XML here. |
Comment by Little Martian [ 2014 Apr 16 ] |
I have attached the template I created. Thank you. |
Comment by Little Martian [ 2014 Apr 16 ] |
Just as a confirmation, it works OK if I don't use macros to compose the OID (if I put the complete OID). |
Comment by Aleksandrs Saveljevs [ 2014 Apr 16 ] |
Could you please also attach XML for the host? You can remove any sensitive information like its name, IP address or DNS name. |
Comment by Little Martian [ 2014 Apr 16 ] |
Attached xml. In the xml you will find referrence to a second SNMP template. That one is a work in progress and at the moment only contains one application defined (no ithems, no graphs etc.). |
Comment by Aleksandrs Saveljevs [ 2014 Apr 16 ] |
Does the second SNMP template have any macros defined? |
Comment by Aleksandrs Saveljevs [ 2014 Apr 16 ] |
Would low-level discovery work for you in this case? For instance, instead of hardcoding static IDs into the OID, let them be discoverable by a script. |
Comment by Little Martian [ 2014 Apr 16 ] |
Ooops, yes, the second template has the same macro name definition with a different oid (the one with .10). My problem is: I have several applications (same vendor, so most of the base oid is the same) and even several instances of the same application deployed on the same host. I want to monitor some SNMP triggers and SNMP statistics from each instance of each application (each application does different things, all instances of the same application do the same thing). How can I achieve that ? If I could define a macro at application level, then I could define a base oid for each application and an instance ID and use those macros in the item definition. So, for this bug I think you can close it, is not a bug, is a duplicate definition of the same macro on different templates attached to the same host. I should define different macro names for each template. Thanks |
Comment by Aleksandrs Saveljevs [ 2014 Apr 16 ] |
Thanks for a quick response! Closing the issue as "Won't fix". Regarding your problem, you might wish to continue the discussion on one of the community channels mentioned at https://www.zabbix.org/wiki/Getting_help . |