I'm trying to count the number of times a certain item appears in a host. For context - I'm using Zabbix to monitor our switchinfrastructure and want to use it for capacity management as well. While displaying system resources isn't a problem, I cannot get it to show the amount of interfaces that are actually in use.
While there is a (standard) SNMP OID ("ifNumber"), which returns the total amount of interfaces available, there's no such thing for active/operating interfaces. However, there is another (very) common OID which returns the operational status of an interface ("ifOperStatus"), but it returns an integer per port (0 or 1, down or up), not the total amount of operational interfaces.
So I'm trying to get a workaround going with aggregrated and calculated items, which has to be the way this might work. However, I'm stuck on the implementation. I need a way to "count" the number of times an item with the OID "ifOperStatus" appears.
So while using an aggregrate item to sum up the values of an item is no problem, I can't figure out how to get it to sum up the total amount of times an item appears in a certain host.
A very specific problem, one which I'm not sure even has a clean solution, but I'm hoping someone has an idea or suggestion.
While there is a (standard) SNMP OID ("ifNumber"), which returns the total amount of interfaces available, there's no such thing for active/operating interfaces. However, there is another (very) common OID which returns the operational status of an interface ("ifOperStatus"), but it returns an integer per port (0 or 1, down or up), not the total amount of operational interfaces.
So I'm trying to get a workaround going with aggregrated and calculated items, which has to be the way this might work. However, I'm stuck on the implementation. I need a way to "count" the number of times an item with the OID "ifOperStatus" appears.
So while using an aggregrate item to sum up the values of an item is no problem, I can't figure out how to get it to sum up the total amount of times an item appears in a certain host.
A very specific problem, one which I'm not sure even has a clean solution, but I'm hoping someone has an idea or suggestion.
Comment