Hello, everyone.
So...
1. I created a UserParameter that restarts a Windows Service, like this:
UserParameter=restartService[*], powershell -NoProfile -ExecutionPolicy Bypass Restart-Service -Name "$1" -Force
2. I created that script so I could restart a stopped service on Administration -> Scripts like this:
Scope: Action Operation
Script: restartService[{EVENT.TAGS.Service}]
3. Finally, I applied that action on a Trigger Action so when a specific service is offline, I would execute that command and restart the service.
But, the problem is that when the trigger occurs, it tries to execute the action and it returns "Unsupported item key" on the remote command.
What am I doing wrong? Am I forgetting something?
I already restarted the Zabbix Agent and I created a item called Restart Service Test to see if I could restart SysMain using "reiniciaServico[SysMain]" and it worked...
But when using that UserParameter on a Action Operation, it is giving me that Unsupported Key error.
Any tips?
So...
1. I created a UserParameter that restarts a Windows Service, like this:
UserParameter=restartService[*], powershell -NoProfile -ExecutionPolicy Bypass Restart-Service -Name "$1" -Force
2. I created that script so I could restart a stopped service on Administration -> Scripts like this:
Scope: Action Operation
Script: restartService[{EVENT.TAGS.Service}]
3. Finally, I applied that action on a Trigger Action so when a specific service is offline, I would execute that command and restart the service.
But, the problem is that when the trigger occurs, it tries to execute the action and it returns "Unsupported item key" on the remote command.
What am I doing wrong? Am I forgetting something?
I already restarted the Zabbix Agent and I created a item called Restart Service Test to see if I could restart SysMain using "reiniciaServico[SysMain]" and it worked...
But when using that UserParameter on a Action Operation, it is giving me that Unsupported Key error.
Any tips?
Comment