I am trying to monitor network traffic on Windows workstations.
I have agent installed on the machines and the hosts are registered in Zabbix by Hostname.
The network usage items like "net.if.total[if]" require us to specify an interface. As far as I know, this could be done by specifying the IP address of the interface, but how do I get it there if I don't know it beforehand?
I managed to get the current IP of a workstation by creating external script "getip.sh":
and doing external check "getip.sh[{HOST.HOST}]".
Now I have the IP address as a separate item, but it doesn't seem to work for specifying interface in another item key:
What should I do? Can I somehow assign the item value to a user macro?
P.S. To be explicit - "net.if.total[{HOST.IP}]" does not work as the connection is specified by hostname only.
I have agent installed on the machines and the hosts are registered in Zabbix by Hostname.
The network usage items like "net.if.total[if]" require us to specify an interface. As far as I know, this could be done by specifying the IP address of the interface, but how do I get it there if I don't know it beforehand?
I managed to get the current IP of a workstation by creating external script "getip.sh":
Code:
dig +short $1
Now I have the IP address as a separate item, but it doesn't seem to work for specifying interface in another item key:
Invalid key "net.if.total[{getip.sh[{HOST.HOST}].last(0)}]" for item "Network - total" on "Windows PC": incorrect syntax near ".last(0)}]".
P.S. To be explicit - "net.if.total[{HOST.IP}]" does not work as the connection is specified by hostname only.
Comment