Hi.
Im trying to check if a virtual network interface is Up on a windows machine, using Zabbix Agent. I've asked for ChatGPT to give me a solution for this and he suggest to create a new line on zabbix.confd file with the text: UserParameter=network.interface.status[*],powershell -NoProfile -ExecutionPolicy Bypass -Command "(Get-NetAdapter -IncludeHidden -Name $args ).Status -eq 'Up'"
This command, if executed the following command (Get-NetAdapter -IncludeHidden -Name "Ethernet0").Status -eq 'Up' directly on PowerShell, returns "True" if the interface is Up, or "False" if the interface is disable.
After this i restarted the agent service.
In the Zabbix server, i create a Item with the Key = network.interface.status[Ethernet0] and Type of information Character, but it aways show "False" value, even if the interface is Up.
Did i do something wrong?
Im trying to check if a virtual network interface is Up on a windows machine, using Zabbix Agent. I've asked for ChatGPT to give me a solution for this and he suggest to create a new line on zabbix.confd file with the text: UserParameter=network.interface.status[*],powershell -NoProfile -ExecutionPolicy Bypass -Command "(Get-NetAdapter -IncludeHidden -Name $args ).Status -eq 'Up'"
This command, if executed the following command (Get-NetAdapter -IncludeHidden -Name "Ethernet0").Status -eq 'Up' directly on PowerShell, returns "True" if the interface is Up, or "False" if the interface is disable.
After this i restarted the agent service.
In the Zabbix server, i create a Item with the Key = network.interface.status[Ethernet0] and Type of information Character, but it aways show "False" value, even if the interface is Up.
Did i do something wrong?