# Zabbix

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fintegrations%2Fmetrics%2Fzabbix.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fintegrations%2Fmetrics%2Fzabbix.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual machines (VMs), and cloud services. [Zabbix](https://www.zabbix.com/) 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[​](#prerequisites "Direct link to Prerequisites")

* Active Coralogix [account](https://dashboard.eu2.coralogix.com/#/signup) with [metric bucket](https://coralogix.com/docs/docs/user-guides/data-flow/s3-archive/connect-s3-archive/.md) and a working Grafana dashboard for metrics

* Zabbix [installed](https://www.zabbix.com/download)

* Fluent Bit [installed](https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bit)

## Configuration[​](#configuration "Direct link to Configuration")

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

### VM[​](#vm "Direct link to 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[​](#docker "Direct link to Docker")

* Enter Zabbix dir

* Paste the following commands:<br /><!-- -->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[​](#fluent-bit-configuration "Direct link to Fluent Bit Configuration")

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

| Field           | Description                                                                                                                                                             |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Host            | ingress.                                                                                                                                                                |
| Port            | 443                                                                                                                                                                     |
| URI             | /zabbix/api/v1/real-time-export                                                                                                                                         |
| Path\_To\_Data: | Location of the exported data from Zabbix                                                                                                                               |
| AppName         | [Application name](https://coralogix.com/docs/docs/user-guides/account-management/account-settings/application-and-subsystem-names/.md) added to your metric attributes |
| SubsystemName   | [Subsystem name](https://coralogix.com/docs/docs/user-guides/account-management/account-settings/application-and-subsystem-names/.md) added to your metric attributes   |
| PrivateKey      | Coralogix [Send-Your-Data API key](https://coralogix.com/docs/docs/user-guides/account-management/api-keys/send-your-data-api-key/.md)                                  |

```
[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"
