AdamC
AdamC

Reputation: 3

Zabbix Hostname Macro in SNMP OID

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 seem 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 checked through the list of macro's and their usage locations but I can't judge which might cover SNMP OIDs, without looking through the source code.

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?

Upvotes: 0

Views: 5606

Answers (1)

asaveljevs
asaveljevs

Reputation: 2250

According to the linked documentation, under "Additional support for user macros" heading it says that user macros (the ones that look like {$MACRO}) are supported in SNMP OID field. However, {HOST.NAME}-like macros are not supported in SNMP OID and this can be confirmed by looking at the source code.

If you wish to have such support, please register a new ZBXNEXT.

Upvotes: 1

Related Questions