Zabbix and Nagios Monitoring Tutorial
Learn Zabbix and Nagios Monitoring step by step: 37 lessons in 9 chapters with examples, quizzes, diagrams and projects.
Start learning →
of lessons completed
Getting Started
- What Is Infrastructure Monitoring? Zabbix and Nagios Compared Learn what infrastructure monitoring is, what problems it solves, and how Zabbix and Nagios differ in design, configuration style, data storage and typical use cases.
- Zabbix Architecture: Server, Database, Frontend, Agents and Proxies Understand every Zabbix component: server, database, web frontend, agent, agent 2, proxy, plus the tools zabbix_get and zabbix_sender, default ports and data flow.
- Installing the Zabbix Server on Linux: Packages, Database and Frontend Step-by-step Zabbix 7.0 LTS server installation on Ubuntu or Debian: repository, MySQL database, schema import, zabbix_server.conf, nginx frontend and a setup checklist.
- Zabbix Web Interface Tour: Menus, Dashboards and First Settings Tour the Zabbix 7.0 web interface: Dashboards, Monitoring, Services, Inventory, Reports, Data collection, Alerts, Users and Administration, plus the first settings to change.
- Installing and Configuring the Zabbix Agent on Linux and Windows Install Zabbix agent 2 on Linux and Windows, edit Server, ServerActive and Hostname in zabbix_agent2.conf, open port 10050, test with zabbix_get and add the host in the frontend.
Monitoring Concepts
- Passive vs Active Checks, Polling vs Push, and Check Types in Zabbix Understand polling and push monitoring: Zabbix passive and active agent checks, trapper items, simple checks, agentless methods, and when each approach is the right choice.
- SNMP Monitoring: OIDs, MIBs, Communities, Walks and Traps Learn SNMP for network monitoring: versions v1, v2c and v3, OIDs and MIBs, snmpget and snmpwalk, counters and interface rates, traps, and how Zabbix and Nagios use SNMP.
- Nagios Core: Objects, Plugins, Return Codes and Soft/Hard States Learn how Nagios Core is configured: hosts, services, commands, contacts and time periods, plugin exit codes and thresholds, soft and hard states, and NRPE remote checks.
- Availability, Uptime and SLA Math: Nines, Downtime Budgets, MTTR Calculate availability and downtime budgets: the nines table, serial and parallel systems, MTBF and MTTR, error budgets, and how Zabbix and Nagios measure uptime for an SLA.
Hosts and Items
- Zabbix Hosts, Host Groups, Interfaces, Tags and Macros Create and organize Zabbix hosts: host names vs visible names, host groups, agent/SNMP/JMX/IPMI interfaces, tags, user macros, inventory and the host status settings.
- Zabbix Items and Item Keys: Types, Intervals, Parameters and Testing Learn what a Zabbix item is: item types, key syntax with parameters, update intervals and custom intervals, units, the Test button, and troubleshooting unsupported items.
- Zabbix Agent Item Keys Reference: CPU, Memory, Disk, Network, Processes, Logs A practical guide to the most used Zabbix agent item keys for CPU, memory, filesystems, network, processes, services and logs, plus UserParameter for custom metrics.
- Zabbix Value Types and Item Preprocessing: Rates, JSONPath, Regex, Discard Learn Zabbix types of information and preprocessing steps: change per second, multiplier, regular expressions, JSONPath, XPath, discard unchanged, custom scripts and error handling.
- Zabbix History, Trends and Housekeeping: Storage Periods and Database Size Understand how Zabbix stores raw history and hourly trends, how the housekeeper deletes old data, how to estimate database size, and how partitioning and TimescaleDB help.
Triggers and Alerts
- Zabbix Trigger Expressions: Functions, Time Windows, nodata and Operators Write Zabbix 7.0 trigger expressions: item references, last(), avg(), min(), max(), count(), nodata(), find(), forecast(), time windows, #N values, logic operators and macros.
- Zabbix Trigger Severity, Recovery Expressions, Hysteresis and Flapping Control alert noise in Zabbix: the six severity levels, problem and OK events, recovery expressions for hysteresis, multiple problem events, operational data, tags and manual close.
- Zabbix Actions, Media Types and Notifications: Email, Webhooks, Escalations Configure Zabbix alerting: trigger actions with conditions, operations and escalation steps, media types (email, webhook, script), user media, message macros and recovery operations.
- Zabbix Maintenance, Trigger Dependencies and Event Correlation Reduce alert noise in Zabbix: maintenance periods with and without data collection, trigger dependencies for network outages, problem suppression, and event correlation basics.
Templates and Discovery
- Templates and Template Inheritance Learn how Zabbix templates bundle items, triggers and graphs, how nesting and linking work, and how to avoid conflicts when many templates meet on one host.
- Low-Level Discovery (LLD) Understand Zabbix low-level discovery: how a discovery rule returns JSON, how LLD macros feed item prototypes, and how filters and lost-resource handling work.
- Discovery Rules, Prototypes and Network Discovery Build Zabbix discovery rules step by step: item, trigger, graph and host prototypes, overrides, dependent items, and the separate network discovery with actions.
- Nagios Object Inheritance and Config Generation See how Nagios Core uses templates with the use directive, register 0 objects and hostgroups to avoid repetition, and how to generate config files with scripts.
Dashboards and Reporting
- Dashboards and Widgets Design useful Zabbix dashboards: global, host and template dashboards, key widgets like Problems, Graph and Top hosts, filters, sharing and what to avoid.
- Graphs, Maps and Screens Learn the three kinds of Zabbix graphs, how to build network maps with link indicators, how screens became dashboards, and how Nagios graphs via add-ons.
- SLA and Availability Reports Define services, SLIs and SLOs in Zabbix, calculate availability and downtime budgets, configure SLA reports and scheduled PDF reports, and compare with Nagios reports.
Scaling and Proxies
- Zabbix Architecture and Sizing Understand Zabbix components, the server's internal caches and poller processes, how to estimate new values per second and database size, and how to size hardware.
- Proxies and Active versus Passive Checks Learn when to deploy Zabbix proxies, how active and passive modes differ for agents and proxies, proxy groups and buffering, encryption, and firewall planning.
- Database Tuning, Housekeeping and Partitioning Keep a Zabbix database healthy: history and trend retention, how the housekeeper deletes data, partitioning and TimescaleDB, and the Nagios retention settings.
- Nagios Distributed Monitoring: NRPE, NSCA and Satellites Scale Nagios Core with NRPE, NCPA, passive checks via NSCA or NRDP, and satellite servers, and compare these approaches with Zabbix agents and proxies.
Integration and Operations
- The Zabbix API and Automation Use the Zabbix JSON-RPC API: request format, API tokens, host.create and problem.get examples, bulk onboarding scripts, error handling, and automation tools.
- Webhooks, Media Types and Nagios Notifications Send Zabbix alerts to chat and ticket systems: media types, user media, JavaScript webhook scripts, message templates, escalation tips, and Nagios notification commands.
- Security, Encryption and Permissions Secure a monitoring system: TLS with PSK or certificates, user roles and host group permissions, secret macros, hardening the frontend, and Nagios security basics.
- Backup, Upgrade and Troubleshooting Back up Zabbix configuration and database, plan version upgrades with proxies and agents, and diagnose unsupported items, queue growth and log errors step by step.
Projects and Practice
- Project: Monitor a Linux Web Stack Plan monitoring for a Linux web stack with nginx, PHP-FPM and a database: what to collect, thresholds, triggers, templates, dashboards and a checklist to verify.
- Project: A Custom Discovery Script and Template Build a custom low-level discovery for application queues: a script that outputs discovery JSON, a user parameter, a data collector, prototypes, and tests.
- Project: Reviewing and Reducing Alert Noise Analyze a month of alerts, find flapping and duplicate notifications, apply hysteresis, dependencies and routing, and measure the improvement with simple scripts.
- Practice: Monitoring Scenarios and Interview Questions Test what you learned about Zabbix and Nagios with scenario drills, calculation exercises, troubleshooting cases and common interview questions with worked answers.