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

Calculated checks


Calculated items are items calculated based on data of one or more already existing items in the Zabbix database. All calculations are handled by the Zabbix server and will never be calculated on the agent or the proxy.

Getting ready

If you want to do this exercise, then you need a Zabbix server that is properly setup and linked to the standard Linux template. Of course, you can alter the items that we have used and use your own if you like.

How to do it…

  1. The first step is to go to the Zabbix server and create a new item on the host or in a template.

  2. Give the item a name, something such as % free on root.

  3. Select the Type, Calculated.

  4. Fill in the Key with a unique name, example free.root.

  5. In the field Formula, we add:

    100*last("vfs.fs.size[/,free]",0)/last("vfs.fs.size[/,total ]",0)
  6. Select Numeric (float) as Type of information.

  7. And in the Units field, place %.

  8. Those are the options we need to build our calculated item, so you can save it or give it an application first.

  9. Next we can...