Ad Widget

Collapse

Hostname Macro in SNMP OID

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acarr
    Junior Member
    • Apr 2012
    • 11

    #1

    Hostname Macro in SNMP OID

    Hi,

    I'm running Zabbix 2.2.5 and I'm trying to create a template with a couple of SNMP items.

    I want to setup my template such that it uses the hostname macro within the SNMP OID, however no matter which macro I try and use I can't seen to get Zabbix to correctly resolve it.

    An example of the SNMP OID I'm trying to query is: NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"racka1-exhaust_temperature\"

    Where the parent host of the item has the hostname: racka1

    Where I manually specify the OID already including the hostname as above to test, I successfully return a value.

    When I set the OID as follows, I get problems: NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"{HOST.NAME1}-exhaust_temperature\"

    I've got logging turned up to 4 in an effort to try and understand what is going on however I'm compounded in my testing by Zabbix setting the item to Not Supported and even though this check is set to run every 60 seconds, once I change the OID, I can't get Zabbix to quickly requeue the changed items.

    Is it even possible to use a macro in a SNMP OID? If so which should I be using to mirror the hostname?

    Many Thanks,
    Adam.
  • acarr
    Junior Member
    • Apr 2012
    • 11

    #2
    support for user macros, not system macros?

    Okay, this is really confusing me, I know the SNMP OID field is capable of accepting user macro's, but I can't yet prove that whether is does or doesn't accept normal system macros.

    The following link (https://www.zabbix.com/documentation...or_user_macros) defines clearly that user macros work with the SNMP OID field and I have tested this to be the case. However this doesn't allow me to reuse variables within a templated host, as I want to do, I believe only system variables will work.

    I have attempted to read through the source code to understand how macro evaluation works, but I cannot read C well enough to gather what is going on.

    Can anybody help me and shed some light on this please?

    Many Thanks,
    Adam.

    Comment

    Working...