[Live Webinar] Next-Level O11y: Why Every DevOps Team Needs a RUM Strategy Register today!

Back to All Docs

Zabbix Zabbix

Last Updated: Mar. 05, 2024

Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual machines (VMs), and cloud services. Zabbix provides monitoring metrics, such as network utilization, CPU load, and disk space consumption.

This tutorial demonstrates how to send your metrics to Coralogix via Zabbix.

Prerequisites

Configuration

To tail the logs with Fluentbit, we must first enable the Zabbix export directory.
The steps differ if you’re using Docker or VM, follow the one that suits your use case.

VM

  • The relevant config is located in: /etc/zabbix/zabbix_server.conf
  • Edit the config
  • Uncomment and update the lines mentioned as follows (use a custom path to store the data from Zabbix, the path will later be used in Fluentbit):
ExportDir=<Path_To_Export_TheData>
ExportFileSize=1M

Note: If the service doesn’t run, check the permissions on the path used for the export.

Docker

  • Enter Zabbix dir
  • Paste the following commands:
    This will export the data from Zabbix to this path: /var/lib/zabbix/export
echo "ZBX_EXPORTFILESIZE=1M" >> ./env_vars/.env_srv
echo "ZBX_EXPORTDIR=/var/lib/zabbix/export" >> ./env_vars/.env_srv

Fluent Bit Configuration

Below will be the config needed for Fluentbit to tail the data from Zabbix and forward it to Coralogix.
Paste the config to the fluent-bit.conf and fill in the mandatory fields:

FieldDescription
Host ingress.coralogix.in
Port443
URI/zabbix/api/v1/real-time-export
Path_To_Data:Location of the exported data from Zabbix
AppNameApplication name added to your metric attributes
SubsystemNameSubsystem name added to your metric attributes
PrivateKeyCoralogix Send-Your-Data API key
[INPUT]
    Name    tail
    Path    <Path_To_Data>/history-history-syncer-*.ndjson
    Tag     Item
[OUTPUT]
    Name                  http
    Match                 Item
    Host                  <Endpoint>
    Port                  443
    URI                   /zabbix/api/v1/real-time-export
    Format                json
    TLS                   On
    Json_date_key         false
    Header                Authorization Bearer <PrivateKey>
    Header                data-type Item
    Header                destination Metrics
    Header                application-name <AppName>
    Header                subsystem <SubsystemName>
    compress              gzip
    Retry_Limit           10

[INPUT]
    Name    tail
    Path    <Path_To_DATA>/trends-history-syncer-*.ndjson
    Tag     Trend
[OUTPUT]
    Name                  http
    Match                 Trend
    Host                  <Endpoint>
    Port                  443
    URI                   /zabbix/api/v1/real-time-export
    Format                json
    TLS                   On
    Json_date_key         false
    Header                Authorization Bearer <PrivateKey>
    Header                data-type Trend
    Header                destination Metrics
    Header                application-name <AppName>
    Header                subsystem <SubsystemName>
    compress              gzip
    Retry_Limit           10


[INPUT]
    Name    tail
    Path    <Path_To_DATA>/problems-history-syncer-*.ndjson
    Tag     Trigger
[OUTPUT]
    Name                  http
    Match                 Trigger
    Host                  <Endpoint>
    Port                  443
    URI                   /zabbix/api/v1/real-time-export
    Format                json
    TLS                   On
    Json_date_key         false
    Header                Authorization Bearer <PrivateKey>
    Header                data-type Trigger
    Header                destination Metrics
    Header                application-name <AppName>
    Header                subsystem <SubsystemName>
    compress              gzip
    Retry_Limit           10

Notes:

  • The header “destination Metrics” will send Coralogix metrics only.
  • To access data for both logs and metrics, delete the header. The default is “LogsAndMetrics”

Support

Need help?

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].

On this page

Live Webinar
Next-Level O11y: Why Every DevOps Team Needs a RUM Strategy
April 30th at 12pm ET | 6pm CET
Save my Seat