Book Image

Zabbix Cookbook

By : Patrik Uytterhoeven, patrik uytterhoeven
Book Image

Zabbix Cookbook

By: Patrik Uytterhoeven, patrik uytterhoeven

Overview of this book

Table of Contents (18 chapters)
Zabbix Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Extending agents


Now that you know how to install and configure a Zabbix agent, let's go a bit deeper into the monitoring aspect of the agent. A monitoring system would quickly reach its limits if we don't expand it with our own checks. Many companies require specific checks that are not available as item on our agent. There are a few ways to extend Zabbix, one solution is to work with user parameters. We will see how to extend our agent to monitor beyond the limits of Zabbix.

Getting ready

We need a Zabbix server and a Zabbix agent properly configured. The easiest way is probably by making use of the Zabbix agent that is installed on your Zabbix server.

How to do it …

  1. First thing we can do is extend our agent with user parameters. This must be done in the zabbix_agentd.conf file.

  2. Extend the agent with the UserParameter option such as in this example:

    UserParameter=mysql.threads,mysqladmin -u root -p<password> status|cut -f3 -d":"|cut -f1 -d"Q"
  3. This will return the number of MySQL threads...