Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Zabbix Cookbook

You're reading from   Zabbix Cookbook Over 70 hands-on recipes to get your infrastructure up and running with Zabbix

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784397586
Length 260 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Patrik Uytterhoeven Patrik Uytterhoeven
Author Profile Icon Patrik Uytterhoeven
Patrik Uytterhoeven
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Zabbix Configuration FREE CHAPTER 2. Getting Around in Zabbix 3. Groups, Users, and Permissions 4. Monitoring with Zabbix 5. Testing with Triggers in Zabbix 6. Working with Templates 7. Data Visualization and Reporting in Zabbix 8. Monitoring VMware and Proxies 9. Autodiscovery 10. Zabbix Maintenance and API A. Upgrading and Troubleshooting Zabbix Index

Macros in templates


If you have a lot of servers then you probably want to have your templates a bit more dynamic. There are probably also some cases where a certain value in your template is not fit for just one server in your park. For this, we can make use of macros in our templates.

Getting ready

For this recipe to work, we need a Zabbix server and a Zabbix host. We also need to make sure that we have a SSH session active on port 22 on our host as we will monitor the SSH service on our host. For this, we will make use of macros. We also need to make use of the super administrator account in Zabbix.

How to do it ...

  1. First thing that we need to do is to go to Administration | general | Macros in our Zabbix menu. (Macros can be selected from the dropdown menu on the right).

  2. In the Macros menu, add a new macro {$SSH_PORT} and give it the value 422 or something other than 22. It must be a port that is not in use by SSH.

  3. Now go to Configuration | Template and create a new template with the name...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image