Table of Contents

  1. Install Zabbix Server
  2. Configuration via web
  3. Quick start guide
  4. Exercise: stress zabbix server
  5. Example application
  6. Next Steps
  7. Web monitoring (web scenario)
  8. SLA, SLO and SLI — the key concepts
  9. SLA 99% — hands-on with Zabbix
  10. Full test
  11. Error budget burn rate

Install Zabbix Server

https://www.zabbix.com/download

rpm -Uvh https://repo.zabbix.com/zabbix/7.4/release/amazonlinux/2023/noarch/zabbix-release-latest-7.4.amzn2023.noarch.rpm
 
dnf clean all

Install Zabbix server, frontend, agent on zabbix-server

sudo dnf install      \
  zabbix-server-mysql \
  zabbix-web-mysql    \
  zabbix-apache-conf  \
  zabbix-sql-scripts  \
  zabbix-agent2       \
  mariadb1011-server

Create a password

date +%N | md5sum > password.txt

[!warning]Password is stored on unencrypted format. For production encrypt with base64

Create initial database

sudo mysql

Run the following on your database host.

create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by '0DAYZj8xeFRo23c';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;

On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.

zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz \
  | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
 

Disable log_bin_trust_function_creators option after importing database schema.

# start mariadb
sudo mysql
 
[(none)]>  set global log_bin_trust_function_creators = 0;
[(none)]>  quit;

Configure the database for Zabbix server

/etc/zabbix/zabbix_server.conf

 118 ### Option: DBPassword
 119 #       Database password.
 120 #       Comment this line if no password is used.
 121 #
 122 # Mandatory: no
 123 # Default:
 124 DBPassword=0DAYZj8xeFRo23c

Start Zabbix server and agent processes

# start zabbix
sudo systemctl enable --now zabbix-server zabbix-agent2
# restart httpd
sudo systemctl restart httpd

Configuration via web

ss -lnt
State          Recv-Q         Send-Q                   Local Address:Port                    Peer Address:Port         Process         
LISTEN         0              80                           127.0.0.1:3306                         0.0.0.0:*                            
LISTEN         0              4096                           0.0.0.0:10051                        0.0.0.0:*                            
LISTEN         0              4096                           0.0.0.0:10050                        0.0.0.0:*                            
LISTEN         0              128                            0.0.0.0:22                           0.0.0.0:*                            
LISTEN         0              4096                     127.0.0.53%lo:53                           0.0.0.0:*                            
LISTEN         0              4096                         127.0.0.1:39705                        0.0.0.0:*                            
LISTEN         0              4096                              [::]:10051                           [::]:*                            
LISTEN         0              4096                              [::]:10050                           [::]:*                            
LISTEN         0              128                               [::]:22                              [::]:*                            
LISTEN         0              511                                  *:80                                 *:*                            
 

Create a tunnel on VSCODE and goto http://<public-ip-address>/zabbix

Enter the user name Admin with password zabbix to log in as a Zabbix superuser. Access to all menu sections will be granted.
img-20260921-190902.png

img-20260921-190915.png

Quick start guide

https://www.zabbix.com/documentation/6.4/en/manual/quickstart/login

login: Admin / zabbix

Exercise: stress zabbix server

Monitor resources like CPU, memory, disk

Install stress on zabbix-server

sudo dnf install stress

Load average

CPU Stress

stress -c 2

Memory

stress --vm 1 --vm-bytes 1G

Disk space

stress --vm 1 --hdd-bytes 2G --hdd 2

Example application

docker run -d --name redis -p 127.0.0.1:6379:6379 redis:alpine
docker run -d --name webcounter -p 8080:5000 \
	-e REDIS_URL=redis --link=redis cfreire70/webcounter:latest

Open browser on http://<public-ip-address>:8080/

img-20260921-190934.png

Next Steps

Test redis agent

sudo systemctl enable --now zabbix-agent2
zabbix_agent2 -t redis.ping["tcp://127.0.0.1:6379"]
# redis.ping["tcp://127.0.0.1:6379"]        [s|1]

1 means the agent received PONG.

Web monitoring (web scenario)

No agent needed — the Zabbix server executes HTTP requests.

Data collection → Hosts → webcounter → Web → Create web scenario:

FieldValue
Namewebcounter
ApplicationWebcounter

One step:

FieldValue
Namehome
URLhttp://127.0.0.1:8080/
Timeout10 s
Required status codes200
Follow redirectschecked

The browser URL is http://<public-ip>:8080/; here it is equivalent — the check runs on the server itself, and the webcounter container is on the same host.

Create triggers (Host → Triggers, or the scenario’s Triggers tab):

NameExpressionSeverity
webcounter is downlast(/webcounter/web.test.fail[webcounter])=1High
webcounter step errorlast(/webcounter/web.test.error[webcounter,home])>0Warning
webcounter response is slowavg(/webcounter/web.test.time[webcounter,home,resp],5m)>5Warning

Add the tag service: webcounter on each trigger — required for the SLA service (next section).

The web scenario keys:

  • web.test.fail[<scenario>] — 1 if the whole scenario failed
  • web.test.error[<scenario>,<step>] — 1 if a step failed
  • web.test.time[<scenario>,<step>,resp] — response time in seconds

SLA, SLO and SLI — the key concepts

These three terms are often confused. In Zabbix they map to concrete objects:

TermMeaningWho defines itZabbix equivalent
SLA (Service Level Agreement)The contract with the customer: what is promised, over which period, and the consequences of missing itBusiness / contractThe SLA object (Alerts → Services → SLA)
SLO (Service Level Objective)The measurable target inside the SLA, e.g. 99% availability per monthEngineering + businessThe SLO % value configured in the SLA object
SLI (Service Level Indicator)The actual measured value, e.g. 99.95% availability this monthMeasured by the monitoring systemThe SLI reported by Zabbix from the service’s problem time

Simple analogy

An SLA is the promise (“we will be up 99% of the time”), the SLO is the target (“99% per month”), and the SLI is the report card (“you were actually up 99.87%”).

Error budget

For a 99% SLO over a month, the error budget is 1% of 30 days = 7 h 12 min. It is the amount of downtime you are allowed before the SLA is broken. Zabbix shows the remaining budget in the Service Info tab.

PeriodAllowed downtime at 99%
Daily14 min 24 s
Weekly1 h 40 min 48 s
Monthly (30 d)7 h 12 min
Yearly87 h 36 min (~3.6 days)

Why 99% is not "mission critical"

99.999% (“five nines”) allows only ~26 s of downtime per month. Each extra “9” costs roughly 10× the engineering effort — high availability, redundancy, failover testing.

SLA 99% — hands-on with Zabbix

In this lab we configure an SLA with a 99% SLO. Zabbix measures the SLI (real availability) and tracks the error budget — how much downtime remains before the agreement is broken.

Create the SLA

Alerts → Services → SLA → Create SLA:

FieldValue
Namewebcounter 99%
SLO99
Reporting periodMonthly
Schedule24x7
Service tagsservice = webcounter
Enabledchecked

SLAs and services are matched by service tags — the tag service: webcounter on the SLA will match any service carrying the same tag.

Create the service

Alerts → Services → Service tree → Create service:

FieldValue
Namewebcounter
Tagsservice: webcounter
Problem tags (Status calculation & propagation tab)service = webcounter (Equals)
Set status to OK if no problemschecked

The service enters problem state when any problem with a matching tag exists — that is why the web scenario triggers in Web monitoring (web scenario) got the service: webcounter tag. Tag the template’s Redis trigger too if Redis outages should also count against the SLA.

Check the result:

  • Service Info tab → shows the SLA, current SLI and error budget
  • Alerts → Services → SLA → webcounter 99% → SLA report

Add the SLA report to a dashboard

Dashboards → new dashboard → Add widget → SLA report → select webcounter 99%. The widget shows SLI vs SLO per reporting period.

Full test

docker stop webcounter
# watch: triggers fire, service status, SLA counter
docker start webcounter

Observation: the monthly error budget of 7 h 12 min disappears after a single long weekend outage — a good argument for why 99% is not “mission critical” grade.

Error budget burn rate

The SLI compares downtime to the whole period, so early in the month one outage can look like a breach even though the budget is fine. A burn rate answers the better question: how fast are we consuming the budget compared to the elapsed time?

Example: 10min downtime on day #1 at 13h00 for a SLA of 99% consider monthly

At 13:00 on day 1:

  • Elapsed time = 13h × 60 = 780 minutes
  • Allowed downtime so far = 780 × 0.01 = 7.8 minutes
  • Actual downtime = 10 minutes
  • Since 10 > 7.8, the error budget is already exceeded by 2.2 minutes at that point in time
  • SLI at that instant = (780 − 10) / 780 = 770/780 ≈ 98.72% — already below the 99% target

What happens next (this is the key mechanic):

Since the total error budget for the whole month is fixed (432 min), but only 10 minutes have been consumed, as the month continues without further downtime, the denominator (elapsed time) keeps growing while the numerator (downtime) stays at 10 minutes. So:

  • The SLI will climb back above 99% as more clean time accumulates
  • By day 2 (2880 min elapsed): SLI = (2880-10)/2880 ≈ 99.65%
  • By end of month (43200 min elapsed): SLI ≈ 99.977% (well above target, as calculated before)

img-20260922-080972.png

Example of 10min on day #1, day #15, day #29
img-20260922-080993.png

Key takeaway: all three scenarios converge to the same final SLI (~99.98%) by month-end — the total budget consumed is identical (10 min out of 432 min). But the timing matters a lot for real-time alerting:

  • Day 1 outage: causes a real dip below 99% for ~17 hours — Zabbix would flag an SLA breach that day, even though the month recovers fine.
  • Day 15 outage: barely dents the SLI (elapsed time is already large enough to dilute it) — dips to 99.95%, no real scare.
  • Day 29 outage: virtually invisible on the SLI — 41,760 minutes of accumulated good time swallows it completely.

This is why relying only on the “period-to-date SLI vs. 99%” number early in the month can trigger false alarms — a burn-rate-style alert (how fast you’re consuming budget relative to elapsed time) is usually a better leading indicator in Zabbix than the raw SLI threshold, especially in the first few days of a monthly SLA period.