Ad Widget

Collapse

Returning interface name in API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cliffennis
    Junior Member
    • May 2015
    • 15

    #1

    Returning interface name in API

    Just getting into the API a little and I'm looking for a way to get the name of the discovered name of interfaces, disk volumes, etc.

    So in item.get I can get some good info, but I need to know what the interface name is instead of "$1".

    Code:
    Version of zabbix_agent(d) running: 2.4.4
    Incoming network traffic on $1: 0
    Incoming network traffic on $1: 7296
    Incoming network traffic on $1: 7376
    Incoming network traffic on $1: 7208
    Same applies for disk and any other discovered resource.

    Code:
    Total disk space on $1: 599443632128
    What am I missing here to pull this all in together?

    Thanks!
  • gleepwurp
    Senior Member
    • Mar 2014
    • 119

    #2
    Hi cliffenis,

    ran into the same issue, and I had no choice to dynamically find and replace any "$x" in the Item Name field with the actual value contained in that position in the key.

    As far as I know, the item.get doesn't have the same "expand" functions in the API, as the trigger.get API call does...

    G.

    Comment

    Working...