Ad Widget

Collapse

Automated restart of Windows services with Zabbix - "Unsupported item key"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sparkyjf
    Junior Member
    • Jul 2020
    • 6

    #1

    Automated restart of Windows services with Zabbix - "Unsupported item key"

    Hi all,

    I am fairly new to Zabbix but absolutely loving it so far and keen to learn more. I have successfully set up a server and a handful of nodes, some of which are monitored via an active proxy (built into pfSense) which is just awesome.

    I have recurrent problems on my Active Directory server with a service that is set to auto start but that fails regularly. As a result, I'm trying to implement this guide on my Zabbix 5.0.1 server:



    Everything has gone well so far - there are a few minor changes between the GUI in the video, and the 5.0.1 GUI, but for the most part I've figured it out. I've successfully created the action and it fires when I manually stop a service. However the remote command does not execute - instead I see the message "Unsupported item key" against the failed remote command.

    I have enabled remote commands on the Windows server's Zabbix agent and restarted the agent, and to be honest I'm not sure how to debug this issue or move forwards with it. Any help and pointers would be gratefully appreciated, and happy to provide further configuration and log entries as required.

    Kind regards

    James
  • sparkyjf
    Junior Member
    • Jul 2020
    • 6

    #2
    In case it helps anyone further down the line, I fixed this issue this morning.

    I have found a number of blog articles, including the excellent video guide and official Zabbix blog that give details on setting up actions to automatically restart Windows services, but none of them concern themselves with the detail of setting up the Zabbix agent.

    Although I had replicated the setup from the YouTube video, and even knew to add:

    Code:
    EnableRemoteCommands=1
    To the Zabbix agent config on the Windows host(s), I didn't see that in the Zabbix 5.0.1 Windows agent config there is, by default, a parameter like this:

    Code:
    DenyKey=system.run[*]
    This, it turns out, is what was causing the "Invalid item key" message I was receiving - I have (for now) commented out this line and my Zabbix server can now automatically restart any stopped service that should be running - an excellent result!

    Hoping this post helps someone else new to Zabbix out somewhere down the road.

    Comment

    Working...