Hello guys!
I have:
Zabbix 6.2.1
Windows Zabbix agent v6.2.1 (passive)
Windows Server 2019
I'm completely stumped. I need to start remote script execution with zabbix agent after trigger.
The remote script looks like this:
pwsh C:\Scripts\host_list\get_list.ps1 -ip {HOST.IP1}
I want to protect myself from uncontrolled execution of the script on the host and write the following in the configuration:
̶A̶l̶l̶o̶w̶K̶e̶y̶=̶s̶y̶s̶t̶e̶m̶.̶r̶u̶n̶[̶"̶p̶w̶s̶h̶ ̶C̶:̶\̶S̶c̶r̶i̶p̶t̶s̶\̶V̶M̶s̶_̶l̶i̶s̶t̶\̶g̶e̶t̶_̶v ̶m̶.̶p̶s̶1̶ ̶*̶"̶]̶
AllowKey=system.run["pwsh C:\Scripts\host_list\get_list.ps1 *"]
But it doesn't work! At the same time, AllowKey=system.run[*] works perfectly.
What is my problem?
I have tried different variations like:
AllowKey=system.run[pwsh C:\Scripts\host_list\get_list.ps1 *]
AllowKey=system.run[pwsh C:\Scripts\host_list\get_list.ps1, *]
AllowKey=system.run[pwsh.exe C:\Scripts\host_list\get_list.ps1 *]
But unsuccessfully.
From Zabbix Server I get this:
Requested [system.run[pwsh C:\Scripts\host_list\get_list.ps1 -ip 172.10.11.45,nowait]]
Key access denied: "system.run[pwsh C:\Scripts\host_list\get_list.ps1 -ip 172.10.11.45,nowait]"
Sending back [ZBX_NOTSUPPORTED: Unsupported item key.]
I will be glad to any advice!
I have:
Zabbix 6.2.1
Windows Zabbix agent v6.2.1 (passive)
Windows Server 2019
I'm completely stumped. I need to start remote script execution with zabbix agent after trigger.
The remote script looks like this:
pwsh C:\Scripts\host_list\get_list.ps1 -ip {HOST.IP1}
I want to protect myself from uncontrolled execution of the script on the host and write the following in the configuration:
̶A̶l̶l̶o̶w̶K̶e̶y̶=̶s̶y̶s̶t̶e̶m̶.̶r̶u̶n̶[̶"̶p̶w̶s̶h̶ ̶C̶:̶\̶S̶c̶r̶i̶p̶t̶s̶\̶V̶M̶s̶_̶l̶i̶s̶t̶\̶g̶e̶t̶_̶v ̶m̶.̶p̶s̶1̶ ̶*̶"̶]̶
AllowKey=system.run["pwsh C:\Scripts\host_list\get_list.ps1 *"]
But it doesn't work! At the same time, AllowKey=system.run[*] works perfectly.
What is my problem?
I have tried different variations like:
AllowKey=system.run[pwsh C:\Scripts\host_list\get_list.ps1 *]
AllowKey=system.run[pwsh C:\Scripts\host_list\get_list.ps1, *]
AllowKey=system.run[pwsh.exe C:\Scripts\host_list\get_list.ps1 *]
But unsuccessfully.
From Zabbix Server I get this:
Requested [system.run[pwsh C:\Scripts\host_list\get_list.ps1 -ip 172.10.11.45,nowait]]
Key access denied: "system.run[pwsh C:\Scripts\host_list\get_list.ps1 -ip 172.10.11.45,nowait]"
Sending back [ZBX_NOTSUPPORTED: Unsupported item key.]
I will be glad to any advice!
Comment