Summary

In this chapter, we looked at more advanced ways to gather data.

We explored log monitoring and either tracking a single file or multiple files and matching a regular expression. We filtered the results and parsed some values out of them.

Calculated items gave us a field to type any custom formula and the results were computed from the data the server already had, without querying the monitored devices again. Any trigger function could be used, providing great flexibility.

Aggregate items allowed us to calculate particular values, such as the minimum, maximum, and average for items over a host group. This method is mostly useful for cluster or cluster-like systems, where hosts in the group are working to provide a common service.

External checks and user parameters provided a way to retrieve nearly any value—at least any that can be obtained on the command line. While very similar conceptually, they also have some differences that we'll try to summarize now:

External checks

User parameters

Are executed by the Zabbix server process

Are executed by the Zabbix agent daemon

Are executed on the Zabbix server

Are executed on the monitored hosts

Can be attached to any host

Can only be attached to the host where the Zabbix agent daemon runs

Can reduce server performance

Have no notable impact on server performance if set up as active items

As can be seen from this comparison, external checks should be mostly used with remote systems where the Zabbix agent can't be installed, because they can be attached to any host in the Zabbix configuration. Given the possible negative performance impact, it's suggested to use user parameters in most situations.

Note that it's suggested for user parameters to have an active Zabbix agent type. That way, a server connection isn't tied up in case the executed command fails to return in a timely manner. We also learned that we should take note of the environment the agent daemon runs in, as it isn't initialized.

For scripts that return a large number of values or for scripts that take a long time to run, it was suggested to use the zabbix_sender command-line utility with a corresponding Zabbix trapper item. This not only allowed us to send in anything at our preferred rate, it also allowed us to specify the timestamp for each value.

And for those cases where we have to execute a command on a remote host to get the value, the built-in support of SSH or even Telnet items could come in handy.

Armed with this knowledge, we should be able to gather any value that traditional methods such as Zabbix agents, SNMP, IPMI, and other built-in checks can't retrieve.

Value preprocessing and dependent items provided us with a way to extract specific items from a master item and do some preprocessing of data on our items before it was put into the database.

In the next chapter, we'll cover several ways to automate configuration in Zabbix. That'll include network discovery, low-level discovery, and active agent auto-registration.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.230.82