Hello gents.
I just wanted to know if there is a limitation of Zabbix in using a key with a powershell command, like:
Type: Zabbix Agent (active)
Key: system.run[powershell.exe -command "get-ClusterGroup | Select Name | ConvertTo-Json -Compress"]
Info: Text
The only value that I receive is:
get-ClusterGroup | Select Name | ConvertTo-Json -Compress
On the host, the command returns the json with the correct values.
PS: I tried with different combinations of quota, double quota and escape characters and none worked. But, maybe I miss something...
PS2: I'm not interested in using a PS script deployed on each host.
Thanks.
I just wanted to know if there is a limitation of Zabbix in using a key with a powershell command, like:
Type: Zabbix Agent (active)
Key: system.run[powershell.exe -command "get-ClusterGroup | Select Name | ConvertTo-Json -Compress"]
Info: Text
The only value that I receive is:
get-ClusterGroup | Select Name | ConvertTo-Json -Compress
On the host, the command returns the json with the correct values.
PS: I tried with different combinations of quota, double quota and escape characters and none worked. But, maybe I miss something...
PS2: I'm not interested in using a PS script deployed on each host.
Thanks.
Comment