Ad Widget

Collapse

Using script output as key argument

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rotunnoz
    Junior Member
    • Jul 2014
    • 3

    #1

    Using script output as key argument

    Hello,

    I'm running a Zabbix 2.2 Appliance on a server and I've got a few Windows (7 x64) hosts to monitor.

    In an effort to facilitate adding new hosts later on, I'm trying to make my items as generic as they can be.

    Now I'm interested in monitoring my NIC traffic without knowing its display name.

    For that purpose, I came up with a command to fetch the adapters' names using awk:

    Code:
    ipconfig /all | findstr /i description | findstr /i ethernet | gawk -F": " "{printf $2"}
    I intended to somehow use the output generated by this command as an argument to a perf_counter or net.if key, but I don't see how that would work.

    Any help will be greatly appreciated.
  • filipp.sudanov
    Senior Member
    Zabbix Certified Specialist
    • May 2014
    • 137

    #2
    See the concept of LLD - Low Level Discovery:


    That's a mechanism, that allows to get a list of something (built-in are network interfaces, file systems and SNMP items, but script output can also be used).

    Then there is a thing called prototype (sort of a template) - these are for items, triggers, etc...

    For each item in the above list a prototype is taken, filled in with values and added for a host.

    Comment

    • Rotunnoz
      Junior Member
      • Jul 2014
      • 3

      #3
      Hey there,

      Thanks for your answer.

      At first I was trying to avoid using the built-in Network Discovery because that would give me something like 40 interfaces (times two for total extra items monitored) when I was actually interested in only a couple of those at max (ethernet and wireless would do the cut for me).

      I've found out there's a way to filter the interfaces added through the Regular Expression linked to the Discovery rule using strings, logical checks and whatnot and this has been working fairly well so far

      Comment

      Working...