Professional Documents
Culture Documents
ZCS6 Day 1 Slides
ZCS6 Day 1 Slides
0
CERTIFIED SPECIALIST TRAINING
DAY 1
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved
COPYRIGHT NOTICE
Rules
It is prohibited to make any video and/or audio recordings during the whole period of this course.
This course is intended only for the officially enrolled student. Subject to the Copyright Notice below, the student is not allowed to
share his credentials for attending this course, to allow others to join and take part, or otherwise make use of these Materials.
Copyright notice
© Zabbix, 2022. All rights reserved.
Unless otherwise indicated, Zabbix owns the copyright and other intellectual property rights in the text, graphics, information,
designs, data, verbal/audio/video presentations and files, comments, drawings, exam questions and exam answers, and other
training content, lab manuals and practical tasks, and training courses themselves (further – Materials).
The Materials are protected by watermarks, copyright statements, and other means. It is prohibited to remove any of watermarks
and copyright statements, or in any other way to amend or change the content or appearance of the Materials.
Any unauthorized reprint, publication, reproduction, sharing, or use of the Materials is prohibited. No part of the Materials may be
reproduced, transmitted, or published in any form or by any means, electronic or mechanical, including photocopying, recording,
or by any information storage and retrieval system without the express signed written permission from Zabbix.
All course Materials made available to the student during the course of the training may be used solely by the student enrolled in
the relevant course for personal and educational purposes only. Materials provided to the student should be treated as
confidential information shared with the student only for the purpose of the student performing Zabbix Certified training.
The student acknowledges that damages alone would not be an adequate remedy for the breach of this copyright and the student
shall be entitled to the granting of equitable relief concerning any threatened or actual breach of any of the provisions of this
Copyright notice.
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 2
GETTING STARTED
Introduction
Background/company
Experience with CLI Unix-like systems
Experience with Zabbix or other monitoring solutions
Current Zabbix deployments
All students are required to turn on their web cameras and use the name provided during
training registration for the trainer to track your attendance.
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 3
DAILY SCHEDULE
Time Monday - Thursday Friday
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 4
AGENDA
Introduction Components Installation
Hosts and
User interface Zabbix architecture
Host groups
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 5
Introduction
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 15 minutes 6
FUNCTIONALITY
IPMI monitoring
Web monitoring API
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 7
WHAT TO MONITOR
Zabbix offers solutions for different application areas and use cases:
Hardware monitoring
Infrastructure resources
Sensors CLOUDS
Industrial serial devices CONTAINERS
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 8
METRIC COLLECTION
Zabbix supports wide range of metric collection:
Using Zabbix agents
Simple ping and port checks
SNMP(v1, v2c, v3), SNMP traps
HTTP checks and Web monitoring
IPMI and SSH checks
Database monitoring via ODBC
Java applications monitoring
Aggregation and calculated checks
VMware monitoring of VM's, Hypervisors and Datastores
Custom metrics/scripts and more
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 9
ABOUT ZABBIX
Zabbix 1.0 was released 23 March 2004
Every 1.5 years a new LTS (long time support) version is released
A major version with new and hot features is released every 6 months
Patches/bugfixes are released monthly
Zabbix is used by the world's biggest telco, finance, educational, retail, and
healthcare companies
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 10
ZABBIX COMPANY
The Zabbix LLC was established in 2005
There are developers, test engineers, integrators, technical consultants, HR, sales,
marketing, and partnership departments working all around the globe
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 11
DEVELOPMENT
Zabbix is Open Source and comes at no cost:
Released under the GPL (General Public License) version 2
Free for commercial and non-commercial use
No limitations on the number of monitored devices
The entire source code is fully open and available for everyone
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 12
PROGRAMMING LANGUAGES
Different programming languages are used for the source code
C language - to provide the best performance
Zabbix server
Zabbix proxy
Zabbix agent
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 13
COMMERCIAL SERVICES
Zabbix LLC and Zabbix certified partners offers commercial services:
Technical support different tiers, 24x7 support
Remote troubleshooting quickly get a solution
Consulting get advice from Zabbix experts
Upgrade minimize downtime and risks
Training programs obtain valuable knowledge
Turn-Key solutions deploy your instance professionally
Integration interconnect Zabbix with other tools
Template building effortlessly start monitoring your specific device
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 14
Zabbix components
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 30 minutes 15
MAIN COMPONENTS
Zabbix has three main components:
Zabbix server
Data collection
Problem detection
Notification
Zabbix frontend
Configuration management
Visualization Frontend Database Server
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 16
ADDITIONAL COMPONENTS
Additional Zabbix components:
Zabbix Proxy
Monitor remote locations
Distribute load between proxies
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 17
ZABBIX SERVER
Zabbix server is the central process of Zabbix software
Central component to which Zabbix agents and proxies report data
The server can collect data from networked devices by itself
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 18
ZABBIX SERVER COMPONENTS
Zabbix server has several components:
Data collectors (pollers, trappers, pingers, etc.)
Multiple instances of data collectors can be started (poller #1, poller #2, poller #3, etc.)
Internal processes (history syncer, task manager, etc.)
Some of the processes are divided into manager and worker processes
Multiple instances of the same process can be started (alerter #1, alerter #2, alerter #3, etc.)
Caches (Configuration cache, history cache, value cache, etc.)
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 19
ZABBIX SERVER INTERNAL ARCHITECTURE (SIMPLIFIED)
Data Configuration cache Configuration
collectors syncer
Value cache
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 20
DATABASE ENGINES
The following database engines are supported:
MySQL / Percona (8.0.x)
MariaDB (10.5.00 - 10.8.x)
PostgreSQL (13.x)
TimescaleDB (2.0.1- 2.3.x)
Oracle (19c)
SQLite3 (for proxies and agent2 only)
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 21
SERVER/PROXY REQUIREMENTS
Zabbix server/proxy can be installed on any *nix operational system:
Linux Functionality Library
RedHat / CentOS / Oracle Linux
Preprocessing libpcre
Debian / Ubuntu / Raspbian
SUSE Linux Bulk metrics libevent
Traffic compression zlib
Solaris,
IPMI checks OpenIPMI
AIX, HP-UX
SSH checks libssh
FreeBSD, OpenBSD
SNMP checks net-snmp
MacOS ICMP ping fping
Other Web monitoring libcurl
VMWare monitoring libxml2
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 22
ZABBIX FRONTEND
Zabbix frontend is used to:
Display and modify Zabbix monitoring configuration
Display collected values using dashboards, graphs, maps etc.
Display problems detected by Zabbix server
immediately 1 minute
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 23
ZABBIX AGENT
Zabbix agent is a process deployed on monitoring targets:
May run on various supported platforms (Linux, UNIX, macOS, Windows, etc.)
Collects data from a device or an application
Has very low memory footprint and resource usage
Can work in the passive or active mode (simultaneously)
Supports native communication encryption
Passive
mode
Active
mode
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 24
ZABBIX COMMUNICATION
All Zabbix components use TCP communication (JSON RPC protocol)
Zabbix agent listens on port 10050 (in passive mode)
Server and proxy listens on port 10051
Zabbix Java gateway listens on port 10052
Zabbix web service listens on port 10053
10052 10050
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 25
Zabbix proxies
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 15 minutes 26
ZABBIX PROXY
Zabbix proxy collects data on behalf of Zabbix server:
Proxies will get monitoring configuration from Zabbix server automatically
Collected data is sent to Zabbix server every second by default
All data is stored into a local proxy database for a limited amount of time
The data is still collected by the proxy in case of network issues between the server and proxy
Proxies preprocess data (if required) to offload Zabbix server resources
Zabbix proxy
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 27
PROXY BENEFITS
Very useful to monitor hosts/devices behind firewalls or in remote locations
Communication is faster between proxies and monitored hosts
Collected data is sent in bulk in a single transmission
Only single TCP port is required for communication between server and proxy
Supports native communication encryption
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 28
PROXY MODES
Zabbix proxies can operate in one of the two modes:
Active mode proxy is connecting to server
Passive mode server is connecting to proxy
Active Passive
mode mode
Monitored Active Server Passive Monitored
hosts Proxy Proxy hosts
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 29
PROXY COMPATIBILITY
Zabbix proxy major version must match Zabbix server major version:
Zabbix proxy 6.0.0 and Zabbix server 6.0.1 are compatible
Zabbix proxy 5.0.9 and Zabbix server 6.0.1 are not compatible
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 30
Zabbix installation
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 30 minutes 31
OS PREPARATIONS
It is recommended to prepare OS before installing Zabbix:
Setup an NTP client:
It is mandatory to have precise time on all systems with Zabbix components
Unsynchronized time may lead to false problem detection, missing data and other issues
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 32
DOWNLOAD ZABBIX
There are multiple ways of getting Zabbix:
Install it from the official packages
Use Zabbix Cloud images
Deploy from container images
Download the virtual appliance
Download the latest source archive and compile it yourself
i https://www.zabbix.com/download
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 33
ZABBIX PACKAGES
Choose the correct package for your OS:
Zabbix version
OS distribution
OS version
Database type
Web server
Instructions on the web page will change according to the selected options
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 34
ZABBIX CLOUD IMAGES
Select the preferred cloud provider:
Zabbix will be deployed on cloud using predefined settings
Latest versions may not be available on some cloud providers
i https://www.zabbix.com/cloud_images
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 35
DOCKER CONTAINERS
Select and download the docker component:
Choose between Zabbix docker hub or GitHub
These are official docker files built by Zabbix LLC
i https://www.zabbix.com/container_images
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 36
ZABBIX APPLIANCE
Download the official Zabbix appliance:
Zabbix software is pre-installed and pre-configured for a trouble-free deployment
Evaluate Zabbix using your preferred virtualization platform
The Appliance can be used for test environments
i https://www.zabbix.com/download_appliance
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 37
ZABBIX SOURCE CODE
Deploy Zabbix from the original source code:
The latest source code is available in Zabbix Git repository or on the download page
Zabbix binaries can be built using your preferred libraries and options
The only way to deploy Zabbix server with Oracle database
Building Zabbix from sources is included in the Zabbix Certified Expert course!
i https://www.zabbix.com/documentation/6.0/manual/installation/install
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 38
MAIN ZABBIX PACKAGES
Packages required for Zabbix installation (RHEL package name examples):
zabbix-release-6.0 Zabbix 6.0 repository
zabbix-server-mysql Zabbix server for MySQL database
zabbix-server-pgsql Zabbix server for PostgreSQL database
zabbix-sql-scripts Zabbix database schema
zabbix-web-mysql Zabbix frontend for MySQL database
zabbix-web-pgsql Zabbix frontend for PostgreSQL database
zabbix-apache-conf Configuration settings for Apache web server
zabbix-nginx-conf Configuration settings for Nginx web server
! Choose the correct OS, database engine, and web server when installing Zabbix!
i https://repo.zabbix.com/zabbix/6.0/
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 39
ADDITIONAL ZABBIX PACKAGES
Additional packages provided by Zabbix:
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 20 minutes 41
ZABBIX SERVER INSTALLATION
Installing Zabbix server from packages is the easiest way:
Pre-built packages are available for most OS families, web servers and databases
Debian
Raspbian
RHEL (Red Hat, Centos, Oracle Linux, AlmaLinux etc.)
SLES
Ubuntu
Simple to install using package manager
Zabbix can be automatically updated to the latest version
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 42
DATABASE INSTALLATION
Zabbix server can not work without a preconfigured database:
Install and start preferred database engine
Create Zabbix database with proper parameters:
Zabbix requires a Unicode database character set and a UTF8 national character set
Database which is created with incorrect settings will require downtime later to fix the issue
Create database user with full access to the database:
If a remote database is used, make sure zabbix user can access the database over the network
MySQL
# mysql
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user 'zabbix'@'localhost' identified by 'P455w0RD';
mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost';
mysql> quit;
PostgreSQL
# sudo -u postgres createuser --pwprompt zabbix
# sudo -u postgres createdb -O zabbix -E Unicode zabbix
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 43
ZABBIX DATABASE SCHEMA
Zabbix database schema is required:
Schema is delivered in a separate package zabbix-sql-scripts
Database schema (Tables)
Initial configuration (Zabbix server host, official templates, users, etc.)
Pictures
MySQL
# cd /usr/share/doc/zabbix-sql-scripts/mysql
# zcat server.sql.gz | mysql -uzabbix -p zabbix
PostgreSQL
# cd /usr/share/doc/zabbix-sql-scripts/postgresql
# zcat create.sql.gz | sudo -u zabbix psql zabbix
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 44
ZABBIX SERVER CONFIGURATION
Minimum requirements in the configuration file to start Zabbix server:
Database host address
Database name
Database schema (only if a specific PostgreSQL schema is used)
Database user
Database password
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 45
SERVER COMMANDS
Zabbix server binary supports command-line parameters:
More information (help)
# zabbix_server -h
# zabbix_server --help
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 46
ZABBIX SERVER RUNTIME COMMANDS
Zabbix server supports runtime controls:
Runtime control syntax
zabbix_server -R <option>
zabbix_server --runtime-control <option>
Execute housekeeper
# zabbix_server -R housekeeper_execute
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 47
DIAGNOSTIC INFORMATION
Diagnostic information can be collected and displayed in shell:
For all processes
# zabbix_server -R diaginfo
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 48
LOG LEVELS
Zabbix components have 6 debug (log) levels:
0 - basic information about starting and stopping of Zabbix processes
1 - critical information
2 - error information
3 - warnings (default level - recommended)
4 - for debugging (produces lots of information)
5 - extended debugging (produces even more information)
! A Zabbix server restart is required if changing log level in the configuration file
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 49
LOG CONFIGURATION OPTIONS
It is possible to adjust log options in Zabbix server configuration file:
Where to write the log file
### Option: LogType:
# system - syslog
# file - file specified with LogFile parameter
# console - standard output
LogType=file
Log file location
### Option: LogFile
# Log file name for LogType 'file' parameter.
# Mandatory only if LogType is set to file
LogFile=/var/log/zabbix/zabbix_server.log
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 50
ZABBIX SERVER LOG LEVEL
Log level for Zabbix server can be increased using the runtime controls:
Increase/decrease the log level for all processes
# zabbix_server -R log_level_increase
# zabbix_server -R log_level_decrease
# zabbix_server -R log_level_increase=poller
Decrease the log level using process number (will not work with the 6-digit PID)
# zabbix_server -R log_level_decrease=54362
Always set the log level back to the recommended (3 - warnings) after troubleshooting !
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 51
LOG FILE FORMAT
Zabbix components have a strict log file format:
It is easy to track which process created the log entry at what time
<Process id>:<Date yyyymmdd>:<Time hhmmss.ms> <information>
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 52
PRACTICAL SETUP
1) Setup operational system for Zabbix installation:
Setup the correct time zone for operating system
Check that SELinux and firewall are disabled
2) Create Zabbix database:
Install the latest MySQL 8.0 server package and start the database engine
Create a Zabbix database and set up database user
Install Zabbix 6.0 official repository
Upload Zabbix DB scheme to MySQL database, check for correct upload
3) Install Zabbix server 6.0:
Set up required Zabbix settings in the configuration file
Start Zabbix server. Check Zabbix server log file and service status
Check Zabbix server version
Check the process list for Zabbix processes
Increase/decrease Zabbix log level for history syncer #3
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 45 minutes Practical task No: 1 53
Zabbix frontend installation
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 30 minutes 54
FRONTEND REQUIREMENTS
Zabbix frontend can be installed on any operational system:
Web server
Apache (1.3.12 or later)
Nginx
Other with PHP support (IIS, Tomcat etc.)
PHP Version 7.2.0 or later is required
PHP 8.x is supported since Zabbix 6.0.6
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 55
WEB SERVER AND DATABASE
Choose the correct database engine and web server package combination:
zabbix-web-mysql or zabbix-web-postgresql
zabbix-apache-conf or zabbix-nginx-conf
zabbix-web-mysql zabbix-apache-conf
zabbix-web-postgresql zabbix-nginx-conf
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 56
ZABBIX FRONTEND INSTALLATION
Zabbix frontend installation has two parts:
Web server installation (from command line)
Frontend setup wizard (GUI-based installation)
After the web server and php-fpm are started, launch the setup wizard
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 57
BROWSER REQUIREMENTS
The latest stable Zabbix versions are supported for the following browsers:
Google Chrome
Mozilla Firefox
Microsoft Edge
Apple Safari
Opera
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 58
FRONTEND SETUP WIZARD
Open http://<DNS or IP>/zabbix address in a web browser:
Choose the default user interface language
Check prerequisites (all must be OK)
Configure Zabbix DB connection
Enter Zabbix server name
Choose the default time zone
Review summary
Finish the setup
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 59
FRONTEND LANGUAGE
Zabbix frontend language:
Default locale is defined in the setup wizard
Additional locales need to be installed on the OS of a web server
Language can be redefined per user in the user profile
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 60
FRONTEND PREREQUISITES
All prerequisites must be OK:
Installation can not continue with any failed pre-requisites:
If a prerequisite is not met, fix the problem and restart php-fpm service
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 61
ZABBIX DATABASE DETAILS
Enter Zabbix database details:
Choose the correct database type
Enter the database host name and credentials
The database connection can be encrypted (optional)
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 62
ZABBIX SERVER DETAILS
Enter additional settings:
Zabbix server name
Default time zone for Zabbix frontend
Default theme for all users
Zabbix server
name
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 63
ZABBIX THEMES
Zabbix offers four built-in themes:
Blue (standard)
Dark
High contrast light
High contrast dark
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 64
PRE-INSTALLATION SUMMARY
Summary page is displayed with all parameters:
Database connection settings
Zabbix server name
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 65
FRONTEND CONFIGURATION FILE
Frontend settings are stored in the configuration file:
Located at /usr/share/zabbix/conf/zabbix.conf.php
Symlink created in /etc/zabbix/web/zabbix.conf.php
$DB['TYPE'] = 'MYSQL';
$DB['SERVER'] = 'mysql.example.com';
$DB['PORT'] = '3306';
$DB['DATABASE'] = 'zabbix';
$DB['USER'] = 'zabbix';
$DB['PASSWORD'] = 'P455w0RD';
// $ZBX_SERVER = '';
// $ZBX_SERVER_PORT = '';
$ZBX_SERVER_NAME = 'Zabbix Production';
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 66
LOGIN SCREEN
Default login credentials for a new Zabbix setup:
Username: Admin
Password: zabbix
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 67
PRACTICAL SETUP
1) Setup Zabbix frontend:
Install Apache web server and Zabbix Web frontend
Enable autostart for Apache and PHP-FPM manager and check service status
2) Complete the frontend setup wizard:
Open http://<Training-VM-XX IP>/zabbix in your browser (use correct IP address)
Check the prerequisites
Setup all required parameters for a DB connection
Use UTC as a default time zone
Provide instance name as "Zabbix server XX" where XX corresponds to the number of your VM
3) Log into Zabbix web interface:
Username: Admin
Password: zabbix
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 15 minutes Practical task No: 2 68
Zabbix interface
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 15 minutes 69
INTERFACE OVERVIEW
Main window
Main menu
Links
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 70
MENU FUNCTIONALITY
Menu functionality:
Menu can be collapsed to small icons or hidden completely:
Global search is used to find hosts, host groups and templates
In the Monitoring section, frontend can be switched to kiosk mode by pressing
To exit kiosk mode, point to the upper right corner and press
Collapse or Hide
Instance name
Global search
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 71
GLOBAL SEARCH
Type any string:
If there is a host that includes the string, dropdown will appear, listing all such hosts
Hosts
Host Groups
Templates
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 72
MENU SECTIONS
Main menu has six sections:
Monitoring: Dashboards, problems, latest data, etc.
Services: Services and SLA settings
Inventory: Overview of inventory data
Reports: Predefined reports, scheduled reports and audit log
Configuration: Monitoring setup
Administration: Global settings, proxies, user management, scripts, etc.
Links:
Zabbix technical support information page
Zabbix official integrations page https://www.zabbix.com/integrations
Zabbix documentation https://www.zabbix.com/documentation/
Current user profile settings
Log out current session
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 73
USER TYPES
Zabbix has three built-in user types:
Zabbix user limited user with access to collected data only
Zabbix admin can change monitoring configuration
Zabbix super admin provides access to global Zabbix settings and all hosts
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 74
FILTERS
Zabbix frontend pages may contain filters:
Filter fields use AND logic to combine field values
Some filter sections may have multiple fields with "AND/OR" or "OR" logic
Or will use OR logic for all fields
AND/OR will use OR logic for similar types and the And logic for different types
Show or hide
filter by
clicking on
the filter icon
Host group = Linux servers and Name contains "Database server" and
Tags = ((component equals cpu or component equals memory) and database does not contain mssql)
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 75
NAMED FILTERS
Some Zabbix frontend pages can save, and later reuse named filters:
Pages with named filters will have multiple tabs:
A tab with filter icon for the main filter
Tabs for saved filters with a filter name
Number of hosts can be displayed (optionally) on the tabs
Filters are saved in the profile of current user, they are not available to other
users
Currently named filters are implemented for:
Monitoring > Hosts
Monitoring > Problems
Monitoring > Latest data
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 76
TAB DISPLAY OPTIONS
Zabbix configuration pages may have multiple tabs:
Information on multiple tabs may be filled at once before adding / updating settings
The currently active tab is highlighted
For tabs which may contain multiple entries the number of entries is displayed
If a tab has some settings enabled, it has a green dot
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 77
User profile
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 15 minutes 78
USER SETTINGS
User settings menu has two sections:
Profile User profile settings with two tabs
User tab General settings
Messaging tab Problem popup displaying options
API tokens Tokens created to access Zabbix API
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 79
USER SETTINGS
Every Zabbix user has access to the following settings:
Change own password
Choose display language (from installed languages)
Adjust the time zone
Choose Zabbix theme
Enable auto-login
Logout after an inactivity period
Auto refresh interval
Used for Monitoring section
0 disables auto refresh
Maximum rows per page
Redirect after login
Absolute or relative path
supported
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 80
ZABBIX TIME FORMAT
Zabbix always stores timestamps for all values in UNIXTIME:
Number of seconds that have elapsed since the Unix epoch, 00:00:00 UTC, 1 Jan 1970
UNIXTIME is stored using UTC (GMT +0) time zone
Frontend displays collected data using a time zone from the User profile:
The date and time for collected value may be displayed differently for different users
Alice John
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 81
GLOBAL NOTIFICATIONS
Global notifications are a way of displaying current problems:
They will be displayed regardless of where you are in the Zabbix frontend
Global notifications involve both showing a message and playing a sound.
Only problems visible to the current user will be displayed
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 82
MESSAGING TAB
Global notifications are configured in the Messaging section:
Enable notifications
Message display duration
Play sound once, for 10 seconds or for the message timeout duration
Define problem severities for which to play the sound:
Select severities that are important
Test the sounds from the frontend
no_sound will disable the audio alert,
but still display the message
Display options for "suppressed" problems
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 83
PRACTICAL SETUP
1) Create a user group with the name "Training users"
2) Create a new Zabbix user for yourself with Super administrator role:
You can use your name and surname to create login
Set up user parameters: time zone, password, URL
Use your local time zone
Specify custom URL to open Monitoring > Hosts page after login
3) Change the default Admin password to P455w0RD
4) Log in with your username and password
5) Check your user profile settings
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 10 minutes Practical task No: 3 84
Zabbix data flow
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 20 minutes 85
DATA FLOW
Zabbix data flow has multiple stages:
Data collection
Data are gathered from monitoring targets called Hosts
Each host can collect hundreds of metrics using Items
Data preprocessing
Data are transformed if needed using Preprocessing steps defined in the item configuration
Problem detection
Each collected value is checked against problem conditions called Triggers and saved to DB
On problem detection a trigger-based Event is created
Alerting
If a problem is detected, it is processed by Action if matched by its conditions
Actions may perform multiple sequential commands called Operations
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 86
DATA FLOW DIAGRAM
HOST ACTION
ITEM OPERATION
ITEM
ACTION
Event may not
match any action CONDITIONS OPERATION
HOST
ITEM TRIGGER EVENT OPERATION
ITEM
ACTION
Trigger may belong Event may match
ITEM to multiple hosts multiple actions CONDITIONS OPERATION
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 87
ACTIONS
An action is a set of operations which are executed when an event is created:
Action is executed only if the event conditions met
Operations are executed in the numbered order called operation steps
Each operation step execution time can be scheduled
Scheduled execution of operation steps is called escalation
Operation steps can:
Send messages (email, SMS, etc.)
Execute remote commands
ACTION
TRIGGER EVENT CONDITIONS OPERATION 1
OPERATION 2
OPERATION 3
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 88
TEMPLATES
A template is a set of entities that can be applied to multiple hosts:
Items, triggers and other entities can be created on a template
This template can be linked to multiple similar hosts, which will inherit these entities
Templates cannot be linked to a host group
Linkage
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 89
TAGS
Tags are used to mark various entities in Zabbix:
Hosts
Templates
Items
Triggers
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 90
TAG INHERITANCE
If entities are tagged, the corresponding new events will inherit all tags:
Host tags will be inherited by all items and triggers on the host
An event will inherit all the host, item and trigger tags
HOST
Legend
Host tag
ITEM
Item tag
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 91
MACROS
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 20 minutes 92
MACROS
Macros resolve to a specific value depending on the context:
Save time and make Zabbix configuration more flexible
Can be used in item names, trigger expressions, operation steps, etc.
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 93
BUILT-IN MACROS
Built-in macros are predefined names which will resolve to a value:
Syntax: {MACRO}
A full list of macros and supported locations is available in the documentation
Must be used in a proper location, otherwise they will not resolve
If a macro value is not resolved the macro name will be displayed instead
i https://www.zabbix.com/documentation/6.0/manual/appendix/macros/supported_by_location
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 94
USER MACROS
User macros are user-defined variables:
Syntax: {$USER.MACRO}
If a macro value is not resolved the macro name will be displayed instead
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 95
USER MACRO LEVELS
User macros can be defined on three levels:
Global GLOBAL MACRO
Administration > General > Macros
Overridden by Template and Host macro values
Template (recommended) TEMPLATE MACRO
Configuration > Templates > {template} > Macros
Overridden by Host macro values
Host (change template macro value if needed) HOST MACRO
Configuration > Hosts > {host} > Macros
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 96
INHERITED MACROS
Inherited macros are not displayed by default:
Only macros defined (or redefined) on the host level are visible by default
Template Global
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 97
Host groups
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 15 minutes 98
HOST GROUPS
Hosts and Templates may have one or multiple Host groups:
Host groups are used for logical grouping of hosts and templates
A host group can contain both hosts and/or templates
Each host or template must have at least one host group assigned
Host or Template may belong to multiple host groups
Each host group may have multiple hosts or templates assigned
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 99
HOST GROUP PAGE
Host group page contains:
Host group name
Number of hosts and templates in the group
Clicking on Hosts or Templates will display the entries which belong to a group
List of host group members
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 100
HOST GROUPS AND PERMISSIONS
In Zabbix all access rights are based on user groups and host groups:
read only
Users Hosts
Even if a single user needs access to a single host it is done through groups:
read write
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 101
NESTED HOST GROUPS
Zabbix supports nested host groups:
Nested representation is accomplished by using the '/' forward slash
It is not required to create the "parent" group to create nested groups
Nested host groups can inherit access permissions from parent groups
London
Location Europe
Location
Paris Location/Europe
North Location/Europe/London
America New York Location/Europe/Paris
Location/North America/New York
South Los Angeles Location/North America/Los Angeles
America Location/North America/Chicago
Chicago Location/South America
Location/Japan
Japan
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 102
CREATE HOST GROUP
It is possible to create a Host group using one of the two options:
Use Configuration > Host Groups > "Create Host group" button
Create a host group on demand from the host configuration form
Create a new
host group
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 103
DELETE HOST GROUP
Delete Host group button:
Located at the bottom of Host groups configuration form
Will delete an existing host group
Deleting a host group will only delete the logical group, not hosts in the group
It is not possible to delete a host group if this is the only group for some hosts
A warning will be displayed with names of hosts who have this as a last host group
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 104
ENABLING OR DISABLING HOSTS
Enable/Disable hosts button:
Located at the bottom of Host groups configuration form
Will enable or disable all hosts belonging to the selected groups
Hosts are
disabled
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 105
Hosts
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 20 minutes 106
HOST DEFINITION
Typical Zabbix hosts are the devices you wish to monitor:
Host can be a physical device (server, workstation, switch, etc.)
Host can be a virtual services (virtual machine, docker container, etc.)
Host can also be just an application (Database, Java application, Web page, etc.)
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 107
CONFIGURING HOSTS
Configuration > Hosts is the section where users can create and configure hosts:
Filter area allows to find specific hosts based on a host group, a host name, etc.
The filter can be displayed or hidden by clicking on the filter sign
Configuration area allows to change host properties
Clicking on a host name will open the host configuration popup form
Clicking on an entity type will open its configuration page
Filter
area
Configuration
area
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 108
HOST TAB
The Host tab contains general host attributes:
Host name and at least one host group must be defined
All other fields are optional
Configuration tabs
General attributes
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 109
CONFIGURATION TABS
Host configuration page has a multi tab interface:
Information on more than one tab can be updated at once
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 110
HOST OBJECT
Host properties Host entities
User macros
Items
Tags
Value maps
Triggers
Graphs
Web scenarios
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 111
HOST NAME
Host name must be defined:
Is case sensitive and must be unique {HOST.HOST}
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 112
HOST GROUP
A host must have at least one host group:
Select button allows to select one or more existing groups
Groups input field can also be used:
Type a part of the existing group name and select the correct group name
Type a non-existing group name and click on the name followed by (new)
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 113
HOST TAGS
Tags can be created on a host level:
Defined using the Tags tab interface
Host tags will be inherited by all items and triggers on the host
HOST
ITEM
TRIGGER
Item
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 114
PRACTICAL SETUP
1) Create the following host groups:
Training
Training/Servers
2) Use filter to filter out only host groups with Training in the name
3) Create a new host training.lan:
Name: training.lan
Visible name: Training resources
Host group: Training/Servers
Description: Training server with common resources
Do not create any interfaces
4) Specify tags for the new host:
Location <use your location>
Environment Training
5) Use filter to display only hosts in the "Training/Servers" host group
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 20 minutes Practical task No: 4 115
Interfaces
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 20 minutes 116
HOST INTERFACES
Zabbix needs host interfaces to monitor different network objects:
Zabbix agents
Network devices
Hardware sensors
Java applications
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 117
INTERFACE TYPES
Interface defines an IP address or a DNS name of the monitoring target
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 118
HOSTS WITHOUT INTERFACES
No interfaces are defined on the host by default:
Interfaces required for monitoring must be created manually
Interface can use IP or DNS address
Interfaces that are in use by any existing items cannot be removed
Interface of the correct type is always required for following item types:
Zabbix agent passive items
SNMP agent items
JMX agent items
IPMI agent items
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 119
ITEMS WITHOUT INTERFACES
Some item types do not require any interface:
Zabbix agent in active mode
Zabbix trapper
Internal items
Calculated checks
Database monitor
HTTP agent
Script
Some item types require any interface, but may use it or not:
Simple check
External check
Telnet and SSH
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 120
HOST INTERFACES
Each host may have multiple interfaces defined:
Interfaces of different types on the same host is a typical scenario:
Multiple interfaces of the same type also can be used on a single host:
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 121
INTERFACE MACROS
Built-in macros can be used to get the interface parameters:
{HOST.CONN}
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 122
AVAILABILITY ICON
Each interface type has the availability icon:
Green all interfaces of this type are available
Yellow at least one interface of this type is available and at least one unavailable
Red all interfaces of this type are unavailable
Gray at least one interface has unknown status and none unavailable
Clicking on the availability icon will display detailed status and error messages:
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 123
AVAILABILITY ICON
If an interface type is not defined, availability icon not displayed at all:
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 124
UNKNOWN STATUS
Zabbix server will set the interface availability to unknown if:
The host is disabled
There are no enabled items on the corresponding interface:
All items for this interface are disabled
This interface is not used in any item at all
The host is monitored by a proxy that appears to be offline
The host has been switched to be monitored by other server or proxy (until the config
cache updates)
Unknown
availability
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 125
AVAILABILITY ICON
For multiple interfaces, the status of every interface will be displayed:
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 126
UNREACHABLE POLLERS
Unreachable pollers are responsible for the failed checks on interfaces:
The data is gathered by the data collectors (usually some poller process)
When a data collection error occurs, unreachable pollers will be utilized:
### Option: StartPollersUnreachable
# Number of pre-forked instances of pollers for unreachable hosts (including IPMI and Java).
# Range: 0-1000
StartPollersUnreachable=5
Unreachable pollers will start checking the interface based on Unreachable and Unavailable
settings after the first data collection failure
Start more unreachable pollers if a lot of network errors happen frequently
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 127
INTERFACE AVAILABILITY
Interface availability is calculated by Zabbix server internally:
First 45 seconds after the item check fails, the interface is unreachable:
Different item keys are checked each time every 15 seconds
The interface is still marked as available
After 60 seconds, the interface is marked as not available
From this moment, the item keys are checked only every 60 seconds
Status changes can be tracked in Zabbix server log file
12:20220824:103500 Zabbix agent item "system.localtime" failed: first network error, wait for 15 sec
15:20220824:103515 Zabbix agent item "system.sw.arch" failed: another network error, wait for 15 sec
15:20220824:103530 Zabbix agent item "kernel.maxproc" failed: another network error, wait for 15 sec
15:20220824:103545 disabling Zabbix agent checks on host "PROD Server": interface unavailable
15:20220824:103745 enabling Zabbix agent checks on host "PROD Server": interface became available
Unreachable poller
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 128
PRACTICAL SETUP
1) Link template "Zabbix agent" to "Training resources" host:
Add Zabbix agent interface with a DNS name training.lan
Check interface status
Link template "Zabbix agent"
Check interface status
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 10 minutes Practical task No: 5 129
Data collection
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 40 minutes 130
DATA COLLECTION
Zabbix supports multiple ways of data collection:
Using Zabbix agent
Zabbix agent is installed on monitoring targets
Monitoring can be done in active or passive mode directly or using Zabbix proxies
Agentless
Monitoring is performed directly from Zabbix server or Zabbix proxy
To monitor Java applications Zabbix Java gateway can be deployed
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 131
ITEM FORM
Data is gathered from a host using Items:
Create a new host or use an existing one
Create a new item and set parameters:
Name
Type
Key (must be unique on a host)
Interface (if required)
Data type
Units
Update interval
History and trends storage period
Other (based on item type)
! Multiple items with the same name can be created on a host if their keys are unique
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 132
ITEM NAME
Item name is used to display information in the other frontend sections:
Naming guide:
Choose a simple, descriptive name for each item
Prefix item names (metric) with the object name (metric location):
<metric location>: <metric name>, for example:
Interface eth0: Bits in
Interface eth0: Bits out
You may use the # if the metric location is just a number or index:
#0: CPU utilization
#1: CPU utilization
Consider adding suffixes such as “per second”, “per hour”, etc., to describe the metric
better.
i https://www.zabbix.com/documentation/guidelines/doc
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 133
ITEM TYPE
Item type describes how the metric will be collected:
Passive (Polling) Active (Trapping)
Zabbix agent Zabbix agent (active)
Simple check SNMP trap
SNMP agent Zabbix trapper
IPMI agent HTTP agent if "Enable trapping" is set
JMX agent
HTTP agent
SSH agent
Telnet agent
Database monitor
Other (processed internally)
External check
Zabbix internal
Script
Calculated
Dependent item
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 134
ITEM KEY
Item key has the following syntax: key[parameters,<optional parameters>]
Key
Predefined for some item types (Zabbix agent, Internal item, Simple check, etc.)
Free form string for other types (SNMP, Zabbix trapper, HTTP agent, etc.)
Only item key must be unique per host/template
Parameters
If parameters are specified, they are mandatory. Some item keys do not have parameters
Key parameters may be a quoted string, an unquoted string or a list
Macros can be used in parameters
<Optional parameters>
The "<>" means optional parameter, which may be left empty
Optional parameters will use default values if not specified
i https://www.zabbix.com/documentation/6.0/manual/config/items/item/key
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 135
ITEM KEY EXAMPLES
Without parameters: With mandatory and optional parameters:
agent.ping net.if.in[interface,<mode>]
agent.variant net.if.in[eth0]
system.boottime net.if.in[eth0,]
net.if.in[eth0,errors]
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 136
PARAMETER QUOTING
Item key parameters may require quoting:
To quote item key parameters, use double quotes only
A key parameter must be quoted if it contains:
Comma ,
Square brackets []
Quotation mark (must be escaped with a backslash \ ) \"
Incorrect use of quoting may lead to unsupported or incorrectly working items
If the key parameter is a quoted string, any Unicode character is allowed
Correct Wrong
net.if.in["eth0",errors] net.if.in["eth0,errors"]
log[/var/log/messages,"Error: [A-Za-z,.]"] log[/var/log/messages,Error: [A-Za-z,.]]
vfs.file.exists[/tmp/application.pid,"file,dir"] vfs.file.exists[/tmp/application.pid,file,dir]
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 137
TYPE OF INFORMATION
Zabbix item may have one of the following data types:
Numeric unsigned 64-bit unsigned integer
Numeric float double precision floating point
Character 255 characters of text
Text 64 kilobytes of text
Log data with log related properties: timestamp, source, etc. (64 KB)
Text values will be truncated to match the database value type limit
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 138
AUTOMATIC SUGGESTION OF TYPE
Frontend will suggest "Type of information" automatically for some item types:
Zabbix agent
Simple checks
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 139
HISTORY STORAGE
History and trends are two ways of storing collected data in Zabbix:
History keeps each collected value with a UNIX timestamp and nanoseconds
Trends keep aggregated information on hourly basis and are less resource-hungry:
Minimum
Maximum
Average
Number of values
You can set for how many days history or trends will be kept:
Per item in the item configuration form (or by mass updating)
Globally by using override in Housekeeping settings
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 140
TRENDS
Trends are very efficient to store data for longer time periods:
Recalculated automatically with every new value and stored every hour
Can be calculated only for numerical item types
Timestamp Value
2020-04-21 18:00:02 2365456
2020-04-21 18:01:02 2889365
History
2020-04-21 18:03:02 3275493
60 values
1 Hour
.................................... ...............
2020-04-21 18:58:02 8743255
2020-04-21 18:59:02 4223525
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 141
EXPIRED DATA
Expired data is removed from Zabbix database by the housekeeper process:
Only historical data is removed:
Item history and trends
Expired events and problems
Expired audit logs, sessions, etc.
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 142
CLEAR HISTORY
Collected values can be deleted on demand by pressing Clear history
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 143
TIMEOUT
Data collection is affected by the timeout setting on Zabbix server or proxy:
### Option: Timeout
# Specifies how long we wait for agent, SNMP device or external check (in seconds).
# Range: 1-30
# Default:
Timeout=10
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 144
Simple checks
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 20 minutes 145
SIMPLE CHECKS
Simple checks are used for remote agent-less checks of services:
They are executed from Zabbix server or proxy without any agent
Timeout in Zabbix server / proxy configuration file affects simple checks
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 146
USING INTERFACE ADDRESS
The address of any interface can be used as a destination address (optionally):
If <target> is not specified in the item parameters, the address from the selected interface
is used
Interface address
is used
If <target> is specified in the item parameters, the interface address is not used at all
Interface address
is not used
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 147
SIMPLE CHECKS AND INTERFACES
Simple checks may use interface address, but they do not rely on the availability:
Interface availability status does not affect simple checks
Simple checks are not affecting any of the interface availabilities
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 148
ICMP PING
It is possible to use ICMP packets to test host accessibility:
fping utility is used for sending ICMP packets:
fping binary file must have correct suid/permission settings (executable by Zabbix)
fping defaults can differ depending on the platform and version
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 149
ICMP ITEMS
Zabbix supports the following ICMP items:
icmpping[<target>,<packets>,<interval>,<size>,<timeout>]
icmppingloss[<target>,<packets>,<interval>,<size>,<timeout>]
icmppingsec[<target>,<packets>,<interval>,<size>,<timeout>,<mode>]
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 150
TCP AND UDP CHECKS
Availability and performance of remote TCP or UDP services:
Syntax
net.tcp.service[service,<ip>,<port>] net.udp.service[service,<ip>,<port>]
net.tcp.service.perf[service,<ip>,<port>] net.udp.service.perf[service,<ip>,<port>]
It is possible to check any TCP service by using tcp as a service name and a port
Examples:
net.tcp.service[ssh]
net.tcp.service.perf[http,,8080]
Services that have predefined default ports and responses (except http) to check for:
ssh, ldap, smtp, ftp, pop, nntp, imap, http, https, telnet
i https://www.zabbix.com/documentation/6.0/manual/appendix/items/service_check_details
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 151
PRACTICAL SETUP
1) Create two simple check items on the "Training resources" host using the host interface:
ICMP ping status with tag Application : ICMP
Service Web performance with tag Application : Web
2) Create a simple check without using the host interface:
Service NTP availability using DNS address: training.lan and with tags Application : NTP
3) Check that all items are receiving data:
Use Latest data view
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 20 minutes Practical task No: 6 152
Zabbix agent
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 20 minutes 153
ZABBIX AGENT
Zabbix agent is a process deployed on monitoring targets:
May run on various supported platforms (Linux, UNIX, macOS, Windows, etc.)
Collects data from a device or an application
Has very low memory footprint and resource usage
Can work in the passive or active mode (simultaneously)
Supports native communication encryption
Passive
mode
Active
mode
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 154
ZABBIX AGENT INSTALLATION
Zabbix agent can be installed from packages for most Linux distributions:
Use Zabbix repository and package manager to install
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 155
ZABBIX AGENT GENERATIONS
Two agent types are currently developed in parallel:
Zabbix agent
The "classic" Zabbix agent
Written in C language
Can be executed on all platforms
Still will be developed for future versions of Zabbix
Zabbix agent 2
The next generation of Zabbix agent
Written in Go Language
Requires monitored platform to have Go language support
Easily extendable with plugins
Supports all the functionality of Zabbix agent
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 156
AGENT VS AGENT 2
Parameter Agent Agent 2
Supported platforms All (Including BSD, HP-UX, Solaris, etc.) Linux, Windows
Concurrency Active checks are executed sequentially All checks can be executed concurrently
i https://www.zabbix.com/documentation/6.0/en/manual/appendix/agent_comparison
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 157
ZABBIX AGENT ITEM TYPES
Only two item types are using Zabbix agent for data collection:
Zabbix agent
Zabbix agent (active)
The type of information must match the value type returned by the agent, for
example:
system.cpu.load numeric (float)
system.uptime numeric (unsigned)
agent.version character
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 158
FRONTEND REFERENCE
Frontend has a quick reference to all built-in item keys:
Press the Select button next to the Key field to bring up the list of supported item keys
If an agent version differs from a frontend version, some keys may not work
It is recommended to read Zabbix documentation to fully understand the potential of an
item
Read documentation
i https://www.zabbix.com/documentation/6.0/manual/config/items/itemtypes/zabbix_agent
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 159
ZABBIX AGENT ON LINUX
Zabbix agent on Linux / *NIX systems:
Runs from a limited zabbix account by default
User = zabbix; Group = zabbix
Additional privileges may be required to launch scripts or monitor files
Configuration file is located at /etc/zabbix/zabbix_agentd.conf by default
/etc/zabbix/zabbix_agentd.d directory is included by default
Log file is located at /var/log/zabbix/zabbix_agentd.log by default
20220103:095804.178 Starting Zabbix Agent [Production server]. Zabbix 6.0.0 (revision d3db14ccb5).
20220103:095804.178 **** Enabled features ****
20220103:095804.178 IPv6 support: YES
20220103:095804.178 TLS support: YES
20220103:095804.178 **************************
20220103:095804.178 using configuration file: /etc/zabbix/zabbix_agentd.conf
20220103:095804.179 agent #0 started [main process]
20220103:095804.186 agent #2 started [listener #1]
20220103:095804.189 agent #3 started [listener #2]
20220103:095804.191 agent #1 started [collector]
20220103:095804.191 agent #4 started [listener #3]
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 160
RUNNING AGENT AS ROOT
Running Zabbix agent as root is not recommended but possible:
Systemd service settings must be modified: [Service]
/etc/systemd/system/zabbix-agent.service.d/override.conf User=root
Group=root
Only for C-based Zabbix agent additional configuration settings are required:
A user must be specified
### Option: User
# Drop privileges to a specific, existing user on the system.
# Only has effect if run as 'root' and AllowRoot is disabled.
User=root
! Run Zabbix agent as root only if there are no other options! Sudo is a much safer choice.
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 161
COMMAND-LINE PARAMETERS
Zabbix agent supports command-line options and runtime commands:
Get help information
zabbix_agentd --help
zabbix_agentd -h
Change log level (increase/decrease, change for one process only, etc.)
zabbix_agentd -R log_level_increase="listener"
zabbix_agentd --print
zabbix_agentd -p
zabbix_agentd -t system.cpu.load
system.cpu.load [d|0.75]
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 162
SAME KEY, DIFFERENT RESULTS
Different item types may have the same item key, which will perform differently:
Simple check is executed from Zabbix server or proxy
Simple check
www.example.com
Zabbix agent
Agent service item checks may be used to check connectivity between hosts
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 163
PRACTICAL SETUP
1) Install Zabbix agent (C-based) on your virtual machine:
Use Zabbix official repository to install agent package
Start Zabbix agent and enable auto-start
Check Zabbix agent log file
Make sure that host "Zabbix server" is available and collecting data
2) Check Zabbix agent version using frontend and command line
3) Test few agent keys using the command line:
The agent generation
Memory used by zabbix_server process
4) Test agent key using Zabbix frontend test functionality:
Zabbix log files directory size
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 15 minutes Practical task No: 7 164
Zabbix agent on Windows
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved 10 minutes 165
ZABBIX AGENT INSTALLATION
On Windows, there are two ways to install Zabbix agent:
Use precompiled binaries and command-line commands
zabbix_agentd.exe --install --config C:\Program Files\Zabbix\zabbix_agentd.conf
zabbix_agentd.exe --start
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 166
ZABBIX AGENT ON WINDOWS
By default, Zabbix agent on MS Windows:
Runs from the "Local system" account with full access to everything on the OS
Is installed as a standard Windows service
For all modern x64 systems 64-bit agent is recommended
64-bit agent cannot access 32-bit performance counters and vice versa
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 167
WINDOWS SPECIFIC AGENT KEYS
Some Zabbix item keys are Windows specific:
Windows service monitoring
service.info[service,<param>] monitors Windows service state
services[<type>,<state>,<exclude>] lists all services that match specified parameters
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 168
EVENT LOG MONITORING
Windows event logs can be monitored by Zabbix
eventlog[name,<regexp>,<severity>,<source>,<eventid>,<maxlines>,<mode>]
name of the event log (System, Security etc)
regexp - regular expression describing the required pattern
severity - regular expression describing severity (“Information”, “Warning”, “Error”, “Critical”, etc.)
source - regular expression describing source identifier
eventid - regular expression describing the event identifier, for example (529|680)
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 169
PERFORMANCE COUNTER MONITORING
Zabbix can gather information from Windows performance counters:
perf_counter[counter,<interval>] performance counter values
perf_counter_en[counter,<interval>] performance counter in English (recommended)
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 170
WMI QUERY MONITORING
WMI queries is another way how to collect metrics from Windows machines:
wmi.get[<namespace>,<query>] Execute WMI query and return the object value
Windows Management Instrumentation Query Language is used
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved Theory 171
QUESTIONS?
Zabbix 6.0 Certified Specialist ● Day 1 © 2022 by Zabbix. All rights reserved