Wednesday, February 26, 2014

Zabbix : Display network interface description in graph names

One very fustrating thing about Zabbix is the inability to display network interface's description in graph names. All your network equipment interfaces graphs look like :

Nice graph, hummm wait ! What the hell is "ge-0/0/8" ?
If you only have one or two switches it's fine but otherwise it becomes very confusing.

Since Zabbix 2.2, they added the possibitlity to interpret items in graph names which means you can add interface's descriptions to your graph names !

To add your interface's descriptions go to "Configuration -> Templates -> Template SNMP Interfaces -> Discovery -> Graph prototypes", choose the "Traffic graph" and use this string as graph's name :
 Traffic on interface {#SNMPVALUE} : {{HOSTNAME}:ifAlias[{#SNMPVALUE}].last(0)}  

The result is pure happiness :

You now have your interface's description in your graph names !

Hope that helps !

UPDATE : The same frustrating bug (yes, yes bug) is also present in triggers, by default you can't have the interface's description in your triggers... This post explains how to solve this issue and get happy !


  1. wonderful - just stumbled upon your article when looking for the solution for exactly this!!
    I have an Cat3850 Stack with 4 members 48 TP ports each :)
    That saved my day - Thank you!

    1. Glad that helped ! Four 48 ports stack is quite hard to remember !

      I've just posted a tutorial on how to add interface's description in Zabbix trigger if you're interested.

      Thanks !

    2. i got Traffic on interface GigabitEthernet1/0/1 : *UNKNOWN*

      What i'm doing wrong

    3. Hi,
      Double check your Zabbix version and that you actually have interfaces alias strings returned to zabbix. Some switches uses "Desc" SNMP OID instead of "alias".

  2. Thanks Greg! I was just looking at ZBXNEXT-1 and modifying my Template_SNMP_Interfaces on Zabbix 2.2, and I stumbled on your post!

    The Zabbix team should really, really update the built in SNMP interface template with this tweak and your trigger tweak... we've (the Zabbix community) have been waiting for this feature for years! (go look at ZBXNEXT-1 if you don't believe me)

    1. Hello Eric,
      Glad that helped ! I agreed they should change the graph's template ! Concerning the trigger, this is an ugly trick they should find another way to reference an item :)

  3. Hi. I dit what u wrote here, but stil dont have a dsecrition in my grahs ;( should i also change smth in template of cisco switch ?

    1. Hi !
      Make sure you have Zabbix > 2.2. You should check which template is generating your graph.
      In my case my Juniper template is linked to "Template SNMP Interfaces", if your graphs are directly generated by your Cisco template then you need to modify this one.
      Also make sure that you have ifAlias SNMP values returned to your Zabbix, some network vendors uses ifDescr insted (ifAlias is empty).

    2. eh, dont know how to do it :) can u share your template ? if u dont want to public them, I can give my e-mail address

  4. This comment has been removed by the author.

  5. This comment has been removed by the author.