Now, imagine that you have a custom parameter executing a Bash script that runs for 15 seconds every minute. How long does it usually take to receive a value? Find out by running the following command: time zabbix_get -s 127.0.0.1 -k If the timeout is set to three seconds, the poller will wait for three seconds or until the requested value is received. ![]() The timeout value can also be set in the Zabbix agent configuration file, zabbix_nf. The maximum value is 30 seconds, which is too high to ever be used in production without proper reasons. ![]() The timeout value is stored in the Timeout variable in zabbix_nf. As I already mentioned, the poller connects to the host, requests the data, and then waits until it receives the data or until the timeout is reached. Performance benefitsĬonsider the active agent mode. But this remote command will only work with the Zabbix agent in the passive mode. If it fails to do so, then a notification will be sent. Then enter the following CMD command: net start Įach time the trigger fires, the Zabbix agent will try to start the service. In the front end, open Configuration > Actions > Steps > Remote Command. You can learn more about setting up remote commands by watching the video Zabbix Email Notifications And Actions. But before notifying users about a Windows service that has stopped, you want to try to restart it automatically. The simplest example with Windows services would be configuring the items and triggers to check the health of specific services. Now, imagine that you intend to set up automatic issue resolution on your hosts in addition to monitoring. In this case, you will have to use active checks. For instance, it might be that your customer doesn’t want any incoming connections in their environment, even from the internal network, but allows outbound connections. The first benefit comes from the topology of the network the Zabbix agent is installed on. The agent requests the information about the items, and then performs the monitoring on the host and pushes the data to the server via the same TCP port. However, the agent must know what metrics should be monitored, and that is why the agent connects to the trapper port 10051/TCP of the server once every two minutes (by default). In the active mode, all data processing is performed on the agent, without the interference of pollers. Then the server gets the value back, and the connection closes. ![]() The poller waits until the agent on the host responds with the value. If you use the Zabbix agent in the passive mode, it means that the poller (internal server process) connects to the agent on port 10050/TCP and polls for a certain value (e.g., host CPU load). The main difference lies in the direction of the connection. You may already know the difference between the modes, but do you know the actual benefits that come with either option? For the Zabbix agent, there is a choice between ‘ Zabbix agent (passive)’ and ‘ Zabbix agent (active)’. This is mandatory as the item type determines how the item will work and collect data. Each time new items or hosts are added in the front end, you need to choose the item type. When it comes to Zabbix agent modes, there is a choice between the active and the passive modes. Zabbix expects to see variable names in a syntax they call macros.Learn how to get the most out of the Zabbix Agent active and passive modes to fix problems proactively with remote commands. What we will need to add though, are Zabbix macros. Luckily this was changed in Zabbix 4.2 and now any JSON array will be accepted. ![]() In the past, there was a requirement that a JSON document used for LLD had to have a parent “data” object. We're close, but the JSON document does not meet Zabbix’ requirements for LLD quite yet. Let’s set up a Discovery rule and make it dependent on this item. The filenames and last modified timestamp are right there, and it's already structured as an array.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |