zabbix how to configure "polling frequency".

I asked ChatGPT: "how do i configure zabbix, so it only polls every 15 seconds?" and this is its response:

To configure Zabbix to poll items every 15 seconds, you need to modify both Zabbix server/proxy configuration and the item configuration.
Here’s a step-by-step guide:

🔧 1. Zabbix Server Configuration

Zabbix by default polls items at minimum 60 seconds. To allow faster intervals like 15 seconds, you need to enable this behavior.
✔️ Edit the Zabbix server config file:

sudo nano /etc/zabbix/zabbix_server.conf

✔️ Add or update the following line:

StartPollers=20
StartPollersUnreachable=10
StartTimers=10
CacheUpdateFrequency=60
CacheSize=128M
TrendCacheSize=64M

While these aren't strictly for 15s polling, they help improve responsiveness. More importantly, for polling faster than 60 seconds, Zabbix supports "preprocessing" and "Zabbix agent (active)" or external checks.

🕒 2. Enable Fast Polling for Items

Zabbix allows item intervals below 60s only for:

Zabbix agent (active)
Zabbix trapper
External checks
Zabbix agent (passive) (if configured appropriately)

✔️ Set the item interval to 15 seconds:

Go to: Configuration > Hosts > [Your Host] > Items

Create or edit an item.
Set:

Type: Zabbix agent (active) (recommended for fast intervals)
Update interval: 15s (you can enter this manually)

Passive items might get ignored or throttled by the server if set below 60s due to default configuration.

🖥️ 3. Zabbix Agent Configuration (if using active checks)

On the monitored host:
✔️ Edit:

sudo nano /etc/zabbix/zabbix_agentd.conf

✔️ Set:

ServerActive=your_zabbix_server_ip_or_hostname
Hostname=your_host_name

Ensure your Hostname here matches what's configured in the Zabbix frontend exactly.
🔄 4. Restart Services

After changes, restart the relevant services:
On Zabbix server:

sudo systemctl restart zabbix-server

On monitored host (agent):

sudo systemctl restart zabbix-agent

🧪 5. Test and Monitor

Check the item’s latest data to verify it’s updating every 15 seconds.

Use zabbix_get or logs (/var/log/zabbix/zabbix_agentd.log) for debugging.

⚠️ Notes

Zabbix frontend might still show graph points every 60s depending on the trend settings, but raw item data will have 15s granularity.

Frequent polling increases load — monitor performance and scale accordingly.
 
It's in the item properties, it'll have a value how often that item should be queried. You typically set this up in your templates. Some values are fine to query once a day (hostname for example), some you want at 5 min. intervals (network traffic), some you may want at 1 min. intervals, etc.
 
A typical Zabbix template has a lot of items, yes. But you generally only go through those once. And you could create a copy of an existing template with different polling intervals. That's how we worked at one of my previous jobs. Normal templates used 5 min. polling intervals, and we had special "1 min." templates to use on systems we had to diagnose issues on. Whenever a system required a higher polling frequency we just swapped the templates on that host. Only did this temporarily because having hundreds, if not thousands, of items polling at a high frequency on hundreds of devices would flood the network and the monitoring servers.
 
You can also now have pre-processing in the item values before they are stored in the database, with options like “discard unchanged with heartbeat”, which can really cut down on the stored data while still maintaining your monitoring frequency.
 
Gemini's answer,
php_value[date.timezone] = Europe/Brussels ; Adjust to your timezone, e.g., "America/New_York" or "Asia/Tokyo"
php_value[max_execution_time] = 300
php_value[memory_limit] = 256M
php_value[post_max_size] = 16M
php_value[upload_max_filesize] = 2M
php_value[max_input_time] = 300

server {
listen 80;
server_name your_zabbix_domain.com; # Replace with your domain or IP address

root /usr/local/www/zabbix70;
index index.php;

location / {
try_files $uri $uri/ =404;
}

location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.sock; # Path to PHP-FPM socket
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location ~ /\.ht {
deny all;
}
}
 
You also need to configure ${WWW_ZABBIX}/conf/zabbix.conf.php and set your database, user, password, etc. Or access the setup.php from the browser, this will provide some form to fill in to configure various settings. Downside of going that route is that the www user would need to have write access to some files (which it doesn't have by default).

Oh, and if I remember correctly, php.ini also needed a couple of changes. Can't remember the specifics, but Zabbix will tell you if anything needs changing.
 
For nginx , i have a line in the config file : user www www
For the directory published , chown www:www , chmod 755 for directories , chmod 644 for files
 
Does someone knows the zabbix database scheme ?
I think some tables have the time series related to an id. And another table relating this id to a name.
Also too bad zabbix does not integrate with grafana.
 
Here my zabbix nginx.conf configuration file,

Code:
root@:/usr/local/etc/nginx # cat nginx.conf
user  www www;
worker_processes  auto;

# This default error log path is compiled-in to make sure configuration parsing
# errors are logged somewhere, especially during unattended boot when stderr
# isn't normally logged anywhere. This path will be touched on every nginx
# start regardless of error log location configured here. See
# https://trac.nginx.org/nginx/ticket/147 for more info.
#
#error_log  /var/log/nginx/error.log;
#

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

server {
listen 80;
    server_name myfreebsd; # Change to your domain name or IP address
    root /usr/local/www/zabbix74; # Your web root

    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ =404;
    }

    # This block processes PHP files
    location ~ \.php$ {
        root /usr/local/www/zabbix74; # Ensure this matches your web root
        fastcgi_pass 127.0.0.1:9000; # Use the IP address and port here
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

}
 
Did not worked,
Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
To clearify:
WHEN zabbix is up and running and have already collected data
AND
garafana a is up and running with dashboards working
THEN
use alexanderzobnin-zabbix-datasource to access zabbix data from grafana and display the zabbix data as dashboards in grafana.
 
I added to grafana.ini :
homepath = /usr/local/share/grafana

Same error :


root@:/usr/local/share/zabbix74 # grafana cli plugins install alexanderzobnin-zabbix-app
Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
root@:/usr/local/share/zabbix74 #

Yet zabbix works fine. ... No idea whats wrong.
 
Back
Top