The topic for today will be about the remote commands inside Zabbix. Just recently there was a request to talk about this quite an old but still useful feature inside Zabbix so there we go. In my installation, just like usually from the Docker compose files, I have a version 4. Zabbix composed installation. You know that there are items on the agents that are responsible to collect some kind of the metrics.
But usually those are fixed item keys that will be responsible to get a system CPU load, a free disk space, state of some service or stuff like that. In previous articles we talked that it is possible to extend functionality of the Zabbix agent and use user parameters. Then, the parameter in the agent config file. That is the default value and by default when you install the Zabbix agent remote commands are not allowed.
If you enable it, all of the executed remote commands from this agent will be also written to the log file of the agent, so later on it will have some some kind of audit log and you can follow who executed what.
First of all, there is one item in the Zabbix agent that is called system. In the parameters, in the brackets [] it is possible to write any command you wish. If you edit your agent config file. So to use a system. Why would we want to use the system.
Because to add a user parameter we actually need to open that host, perform modifications and restart the Zabbix agent. To use a system. That is basically just the smallest part about the remote commands. But we can use remote commands to actually fix some problems after they happen. So we are using remote commands together with actions and instead of just sending an email we are actually executing our remote commands to fix the problem.
For the purpose of demonstration I have configured an example on my Windows host. So I am discovering all of my services on my Windows machine that has a startup type automatic or automatic delayed, that creates all of the items for service state monitoring, like these ones: Windows service discovery , state of service , then the service name and a service description in the brackets. And triggers will fire when the service state will be anything but started: stopped, not started, hanging some kind of error.
By default it will produce a problem in your front end if last three checks appear as the service is not running. We can actually create an action that will try to start a Windows service each time when it is stopped. Zabbix - SMS Notification. Next, open the Windows service management screen and locate the service that you want to monitor.
In order to test your configuration, access the Monitoring menu and click on the Latest data option. Zabbix Monitor Windows Service. Hardware List:. The following section presents the list of equipment used to create this Zabbix tutorial.
Every piece of hardware listed above can be found at Amazon website. Zabbix Playlist:. On this page, we offer quick access to a list of videos related to Zabbix installation. Zabbix Related Tutorial:. On this page, we offer quick access to a list of tutorials related to Zabbix installation. Tutorial - Windows Service Name. First, you need to install the Zabbix agent on the computer running Windows. Access the service properties and take note of the service name. In our example, we are going to monitor the status of the Symantec antivirus service.
Tutorial - Zabbix Monitor Windows Service. Now, we need to access the Zabbix server dashboard and add the Windows computer as a Host. After a successful login, you will be sent to the Zabbix Dashboard. On the dashboard screen, access the Configuration menu and select the Host option. On the top right of the screen, click on the Create host button. Remember me. Log in. Forgot password or user name? Ad Widget. Windows eventlog trigger event Posts Latest Activity Photos.
Page of 1. Filtered by:. Previous template Next. Windows eventlog trigger event , Tags: None. Comment Post Cancel.
0コメント