โ˜• XOPSSCHOOL โ€” LEARNING MADE AFFORDABLE
Build the Skills Your Next Career Move Demands.
For the Price of One Coffee a Month.
Why spend hundreds on individual courses? Unlock an entire year of technical learning with one Coffee Pass.
US$4.90 /month
US$58.80/year
โ‚น499 + GST/month
โ‚น5,988 + GST/year
โ‚ฌ4.90 /month
โ‚ฌ58.80/year
12 Months of Access • Billed Annually • No Automatic Renewal
DevOps • Cloud • SRE • Kubernetes • Terraform • DevSecOps • AI • AIOps • MLOps • LLMOps • FinOps • GitOps • Platform Engineering & Much More
192
Premium Courses
1,085
Video Sessions
99
Ops Disciplines
86
Tool Courses
340
Assignments
227
Quizzes
โœ“ QR-Verifiable Certificates   โœ“ Learn at Your Own Pace   โœ“ Hands-on Learning   โœ“ New Courses Included
Learn from real-world, instructor-led video sessions by
Rajesh Kumar
Principal Architect • Trainer • Mentor • 15+ Years of Industry Experience
โ˜• Get My Coffee Pass โ€” Start Learning Today →
One Payment. Every Premium Course. One Full Year.
The best investment you can make is in the person you are becoming.

Understanding Zabbix Server Configuration

zabbix_server.conf is the file the Zabbix server daemon reads at startup. It sets how the server connects to its database, where it writes logs, how many worker processes it starts and how much shared memory it uses for caches. This page explains the example file above and covers which lines to change, how to test and apply a change, how to size the caches, how to secure the file, and how to fix common startup errors.

Example of Zabbix zabbix_server.conf


How zabbix_server.conf works

The file is a list of Parameter=Value lines. Lines that start with # are comments. In the shipped file, every parameter appears commented out with its default value, so a commented line tells you what the server uses if you leave it alone. To change a setting, add an uncommented line with the new value. The example above follows this pattern: it changes only about a dozen parameters and leaves everything else at the default.

Installation methodDefault config path
Official packages (RHEL, Debian, Ubuntu, SUSE)/etc/zabbix/zabbix_server.conf
Compiled from source/usr/local/etc/zabbix_server.conf (depends on the --sysconfdir you pass to configure)
Docker imagesGenerated from environment variables such as DB_SERVER_HOST, ZBX_CACHESIZE, ZBX_STARTPOLLERS

The server reads the file only at startup. The exceptions are the settings you can change at runtime with zabbix_server -R (see below). Everything else needs a restart. To read settings from extra files, use Include=. It accepts a single file, a whole directory, or a wildcard such as /etc/zabbix/zabbix_server.d/*.conf. Putting overrides in separate include files makes package upgrades easier, because the main file stays untouched.

What the example above changes and why

These are the uncommented (active) lines in the example, with what each one does:

ParameterValue in examplePurpose
LogFile/var/log/zabbix/zabbix_server.logRequired when LogType=file (the default).
LogFileSize0Turns off Zabbix's own log rotation so the system logrotate job shipped with the package handles it.
PidFile/run/zabbix/zabbix_server.pidMust match the PID path in the systemd unit.
SocketDir/run/zabbixDirectory for internal IPC sockets. Moved out of /tmp so systemd's private /tmp and cleanup jobs don't interfere.
DBName / DBUser / DBPasswordzabbix / zabbix / (password)Database credentials. DBHost is not set, so it defaults to localhost, which means a local Unix socket for MySQL/MariaDB.
SNMPTrapperFile/var/log/snmptrap/snmptrap.logThe file where snmptrapd (through zabbix_trap_receiver.pl or SNMPTT) writes traps for Zabbix to read.
Timeout4Seconds to wait for agent, SNMP and external checks. Raised from the default of 3.
FpingLocation / Fping6Location/usr/bin/fping / /usr/bin/fping6Paths used for ICMP ping items. Debian and Ubuntu install fping in /usr/bin. RHEL-family systems use /usr/sbin.
LogSlowQueries3000Logs any database query that takes longer than 3 seconds. Very useful when tracking down performance problems.
StatsAllowedIP127.0.0.1Allows zabbix[stats,...] internal checks from localhost only.

Corrections and caveats for the example

  • Plain-text password in a public file. DBPassword=DevOpsSchool$123 has been published. If you used this password anywhere, change it in the database and in the config. A safer setup is shown in the security section below.
  • SNMP traps are not actually enabled. Setting SNMPTrapperFile does nothing while StartSNMPTrapper stays at its default of 0. To receive traps, add StartSNMPTrapper=1 and make sure the zabbix user can read the trap file.
  • Fping6Location may point to a file that doesn't exist. fping 4.0 and later handle IPv6 themselves, and many current distributions no longer ship a separate fping6 binary. If /usr/bin/fping6 is missing, set Fping6Location= (empty) so Zabbix uses fping for IPv6 as well.
  • The example comes from the Zabbix 6.0 series. Later releases add parameters. For example, Zabbix 7.0 adds asynchronous pollers controlled by StartAgentPollers, StartHTTPAgentPollers and StartSNMPPollers. Always start from the zabbix_server.conf that came with your installed version, not a copy from another release.
# Corrected lines for the example
StartSNMPTrapper=1
SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
FpingLocation=/usr/bin/fping
Fping6Location=
# DBPassword moved to a protected include file (see security section)
Include=/etc/zabbix/zabbix_server.d/*.confCode language: PHP (php)

A minimal working configuration

For a single server with a local MySQL or MariaDB database, this is enough to start. Every parameter you leave out uses its default.

LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/run/zabbix/zabbix_server.pid
SocketDir=/run/zabbix
DBHost=localhost
DBName=zabbix
DBUser=zabbix
Include=/etc/zabbix/zabbix_server.d/*.conf
Timeout=4
LogSlowQueries=3000
StatsAllowedIP=127.0.0.1Code language: JavaScript (javascript)

For PostgreSQL, either set DBHost to the database host name or leave it empty to connect through the local socket. Also set DBPort if PostgreSQL isn't on 5432, and set DBSchema if you don't use the default schema. With MySQL, localhost means a Unix socket. Use 127.0.0.1 to force a TCP connection.

Testing, applying and verifying changes

  1. Check the syntax before restarting. Zabbix 6.0 and later can validate a config file without starting the daemon: zabbix_server -T -c /etc/zabbix/zabbix_server.conf.
  2. Restart the service: sudo systemctl restart zabbix-server.
  3. Watch the log for errors: sudo tail -f /var/log/zabbix/zabbix_server.log.
  4. Confirm the trapper is listening on port 10051: sudo ss -tlnp | grep 10051.
  5. Open the frontend dashboard and check that the System information widget shows "Zabbix server is running: Yes".

Some changes don't need a restart. The runtime control option -R sends commands to the running server:

# Reload configuration cache from the database (hosts, items, triggers)
sudo zabbix_server -R config_cache_reload

# Raise or lower log verbosity for a process type without restarting
sudo zabbix_server -R log_level_increase=poller
sudo zabbix_server -R log_level_decrease=poller

# Run housekeeping now
sudo zabbix_server -R housekeeper_execute

# Show high-availability cluster node status (6.0+)
sudo zabbix_server -R ha_statusCode language: PHP (php)

Note: config_cache_reload reloads monitoring configuration from the database. It does not re-read zabbix_server.conf. Changes to the file itself, such as cache sizes or process counts, need a full service restart.

Sizing processes and caches

The defaults work for small installations. As the number of hosts grows, tune the process counts and cache sizes based on Zabbix's internal metrics rather than guesswork. The Zabbix server health template, which is linked to the Zabbix server host by default, collects these metrics.

SymptomInternal metric to checkParameter to adjust
Items show gaps or a growing queuezabbix[process,poller,avg,busy] above about 75%StartPollers (or the async poller settings in 7.0+)
"Configuration cache is full" / server stops at startupzabbix[rcache,buffer,pused]CacheSize
Values delayed before reaching the databasezabbix[wcache,history,pused]HistoryCacheSize, StartDBSyncers
Slow trigger evaluation and many DB readszabbix[vcache,cache,hits] and missesValueCacheSize
Unreachable hosts slow down normal pollingzabbix[process,unreachable poller,avg,busy]StartPollersUnreachable
Ping items latezabbix[process,icmp pinger,avg,busy]StartPingers

Change one parameter at a time, restart, and watch the metric for a while before changing anything else. More processes mean more database connections, so check the database's max_connections limit before raising process counts a lot.

Securing the server configuration

  • Restrict file permissions. The file contains credentials. Make it readable only by root and the zabbix group: sudo chown root:zabbix /etc/zabbix/zabbix_server.conf && sudo chmod 640 /etc/zabbix/zabbix_server.conf.
  • Keep the password in a separate include file with the same permissions, for example /etc/zabbix/zabbix_server.d/db.conf containing only DBPassword=.... The main file can then be stored in Git without exposing secrets.
  • Or use a secrets vault. Set VaultURL, provide the token through the VAULT_TOKEN environment variable (or VaultToken), and set VaultDBPath. DBUser and DBPassword must be left unset when VaultDBPath is used.
  • Encrypt database traffic when the database is on another host: DBTLSConnect=verify_full together with DBTLSCAFile.
  • Encrypt traffic to agents and proxies using TLSCAFile, TLSCertFile and TLSKeyFile for certificates, or PSK configured per host in the frontend.
  • Keep AllowRoot=0 so the daemon drops privileges to User=zabbix.
  • Limit listening and stats access. Use ListenIP to bind to specific interfaces, keep StatsAllowedIP narrow, and allow port 10051 through the firewall only from agents and proxies that need it.

High availability settings

Starting with Zabbix 6.0, the server has native high availability. Set a unique HANodeName on each server node and set NodeAddress to the address and port the frontend should use to reach that node. All nodes connect to the same database. One node is active and the others are on standby. If HANodeName is empty, the server runs in standalone mode.

# On node 1
HANodeName=zbx-node1
NodeAddress=10.0.0.11:10051

# On node 2
HANodeName=zbx-node2
NodeAddress=10.0.0.12:10051Code language: PHP (php)

Common startup errors

Log message or symptomLikely causeFix
Access denied for user 'zabbix'@'localhost'Wrong DBUser/DBPassword, or the user was granted access only from another hostCheck the grant with SHOW GRANTS FOR 'zabbix'@'localhost'; and correct the password
database is down: reconnectingDatabase not running, wrong DBHost/DBPort, or socket path mismatchStart the database. Set DBSocket or use 127.0.0.1 for TCP
cannot create IPC / socket errorsSocketDir missing or not writable by zabbixCreate /run/zabbix owned by zabbix. Packages normally create it through systemd-tmpfiles
out of memory / please increase CacheSizeConfiguration cache too small for the number of objectsRaise CacheSize (for example CacheSize=256M) and restart
Unknown parameter in config fileParameter from another Zabbix version, or a typoCompare against the default file for your installed version
Ping items unsupportedWrong FpingLocation, or fping lacks setuid/capabilitiesRun which fping and confirm the binary can be executed by the zabbix user

Frequently asked questions

Where is zabbix_server.conf located?

Package installations put it in /etc/zabbix/zabbix_server.conf. Source builds default to /usr/local/etc/zabbix_server.conf. To use a different file, start the daemon with zabbix_server -c /path/to/file.

Do I need to restart Zabbix server after editing zabbix_server.conf?

Yes. The file is read only at startup, so run systemctl restart zabbix-server. Only a few things, such as log levels, the housekeeper and the configuration cache reload, can be triggered at runtime with zabbix_server -R.

How do I test zabbix_server.conf for errors?

In Zabbix 6.0 and later, run zabbix_server -T -c /etc/zabbix/zabbix_server.conf. It parses the file and reports problems without starting the server.

What is the default port for Zabbix server?

The server trapper listens on TCP port 10051, set by ListenPort. Agents listen on 10050, and the Java gateway defaults to 10052.

How do I fix 'Configuration cache is full' in Zabbix?

Increase CacheSize in zabbix_server.conf, for example to 256M, then restart the server. Watch zabbix[rcache,buffer,pused] to check how much headroom is left.

Related tutorials

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals

Related Posts

Understanding Zabbix Agent Configuration

The Zabbix agent configuration file controls which Zabbix servers may query the agent, where it sends active checks, how it identifies itself, and which custom checks and…

Read More

Zabbix Tutorials: Example of zabbix_proxy.conf

The example above is the full, commented sample zabbix_proxy.conf shipped with Zabbix 7.0. It includes 7.0-only options such as ProxyBufferMode, ProxyMemoryBufferSize and the asynchronous agent, HTTP and…

Read More

Zabbix Tutorials: Example of zabbix_agentd.conf

zabbix_agentd.conf is the configuration file for the classic Zabbix agent on Linux and Unix. It sets which Zabbix servers may poll the agent, where it sends active…

Read More

Zabbix Tutorials: Example of zabbix_agentd.win.conf

zabbix_agentd.win.conf is the sample configuration file that comes with the classic Zabbix agent for Windows. The file above is the stock sample from a recent release, but…

Read More

Zabbix Tutorials: Example of zabbix_agent2.win.conf

The example above is the stock zabbix_agent2.win.conf that ships with Zabbix agent 2 for Windows. Nearly every line is a comment that documents a default value. Only…

Read More

Step by Step Guide to Monitor PostGreSQL using Zabbix Agent

To monitor PostgreSQL with the classic Zabbix agent, you install the agent on the database host, create a read-only monitoring role, and deploy the user parameters and…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x