Article
· Mar 27, 2017 2m read

How to use the “Zabbix SNMP Dynamic Index” to monitor Cache information.

Hi Community,

This article assumes that you are familiar with Zabbix and SNMP monitoring, if not, there are some very interesting posts on the Community, especially this one (https://community.intersystems.com/post/creating-custom-snmp-oids) which contains a lot of information on how to configure and request an SNMP Cache server.  

With Cache, all MIB data objects are organized into tables, so you need to know the index of an object to be able to get its value. This makes complicated to use a template on several hosts because, for each items, you’ll have to modify the SNMP OID to reflect the host specific index value.

With Cache, the first index of an SNMP table is always the name of the instance, we’ll use that information. Zabbix provides two useful tools, the SNMP agent dynamic index and the macro. Here how to use them:

First you create a macro at the template level:

 

In this example I called it {$INDEX}.

Then you add item(s) to your template and when asked for the SNMP OID use the following synthax:
 YourValue[“index”, cacheSysName, {$INDEX}].

It means that, before sending the SNMP request, Zabbix will add to “YourValue” the index value returned by the search of the content of {$INDEX} on the cacheSystemName object. If you want to know more about it, read the Zabbix documentation (Chapter “Dynamic index”)

Now if you want to use the items of your new create template on a new host, proceed as following: When creating the host entry, go to the Macros menu and use the “inherited and host macros” option to change the value of {$INDEX} to make it reflect the instance name you want to monitor.

That’s it, from now all the items of the template can be used without having to configure anything else.

I don’t know if there is an easier way to do it, but as I spent a lot of time looking for that information without being able to find an answer, when I finally figured out “a” solution I thought it might be of some use.

Discussion (0)0
Log in or sign up to continue