Hi everyone,
I want to monitor the connections on a windows machine. I want to see, per port, how many connections are established, waiting and listening. For this purpose I created a User Parameter:
When I run this command in Powershell it works, of course. But when I do a zabbix_get from my server it returns this:
The agents log in debug mode tells me this:
Unfortunately I don't see, where the problem is.
Can someone help me?
Thanks!
Phil
I want to monitor the connections on a windows machine. I want to see, per port, how many connections are established, waiting and listening. For this purpose I created a User Parameter:
Code:
UserParameter=custom.connections[*], C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command (netstat -nao| findstr /i "$2" | findstr "$1" | Measure-Object).count
Code:
zabbix_get -s 10.1.1.1 -k custom.connections["10050","time_wait"] 'Measure-Object).count' is not recognized as an internal or external command, operable program or batch file.
Code:
169580:20150527:123146.614 Requested [custom.connections[10050,time_wait]] 169580:20150527:123146.692 Run remote command [ C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command (netstat -nao| findstr /i "time_wait" | findstr "10050" | Measure-Object).count] Result [110] ['Measure-Object).cou]... 169580:20150527:123146.692 Sending back ['Measure-Object).count' is not recognized as an internal or external command, operable program or batch file.]
Can someone help me?
Thanks!
Phil
Comment