Skip to content

Commit

Permalink
split telegraf
Browse files Browse the repository at this point in the history
  • Loading branch information
Doron-Bargo committed Sep 4, 2023
1 parent 3129eb9 commit b3578c1
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 89 deletions.
7 changes: 7 additions & 0 deletions docs/shipping/Other/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Other",
"link": {
"type": "generated-index",
"description": "More tools"
}
}
95 changes: 6 additions & 89 deletions docs/shipping/Other/prometheus.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,19 @@
---
id: Prometheus-data
title: Prometheus
overview: This integration lets you send Prometheus-format metrics and traces to Logz.io.
product: ['metrics', 'logs']
id: Prometheus-remote-write
title: Prometheus Remote Write
overview: This integration lets you send Prometheus-format metrics to Logz.io.
product: ['metrics']
os: ['windows', 'linux']
filters: ['Other', 'Most Popular']
logo: https://logzbucket.s3.eu-west-1.amazonaws.com/logz-docs/shipper-logos/mascot-telegraf.png
logo: https://dytvr9ot2sszz.cloudfront.net/logz-docs/shipper-logos/prometheusio-icon.svg
logs_dashboards: []
logs_alerts: []
logs2metrics: []
metrics_dashboards: ['32X5zm8qW7ByLlp1YPFkrJ']
metrics_dashboards: []
metrics_alerts: []
drop_filter: []
---

## Using Telegraf

This project lets you configure a Telegraf agent to send your collected Prometheus-format metrics to Logz.io.

Telegraf is a plug-in driven server agent for collecting and sending metrics and events from databases, systems, and IoT sensors.

To send your Prometheus-format metrics to Logz.io, you add the **outputs.http** plug-in to your Telegraf configuration file.

<!-- logzio-inject:install:grafana:dashboards ids=["32X5zm8qW7ByLlp1YPFkrJ"] -->

#### Configure Telegraf to send your metrics data to Logz.io

##### Set up Telegraf v1.17 or higher:

**Ubuntu & Debian**

```shell
sudo apt-get update && sudo apt-get install telegraf
```

The configuration file is located at `/etc/telegraf/telegraf.conf`.

**RedHat and CentOS**

```shell
sudo yum install telegraf
```

The configuration file is located at `/etc/telegraf/telegraf.conf`.

**SLES & openSUSE**

```shell
# add go repository
zypper ar -f obs://devel:languages:go/ go
# install latest telegraf
zypper in telegraf
```

The configuration file is located at `/etc/telegraf/telegraf.conf`.

**FreeBSD/PC-BSD**

```shell
sudo pkg install telegraf
```

The configuration file is located at `/etc/telegraf/telegraf.conf`.
##### Add the outputs.http plug-in

After you create a config file for Telegraf, configure the output plug-in to enable your data to be sent to Logz.io in Prometheus-format and add the following code to the configuration file:


``` yaml
[[outputs.http]]
url = "https://<<LISTENER-HOST>>:8053"
data_format = "prometheusremotewrite"
[outputs.http.headers]
Content-Type = "application/x-protobuf"
Content-Encoding = "snappy"
X-Prometheus-Remote-Write-Version = "0.1.0"
Authorization = "Bearer <<PROMETHEUS-METRICS-SHIPPING-TOKEN>>"
```

{@include: ../../_include/general-shipping/replace-placeholders-prometheus.html}

:::note
The full list of data scraping and configuring options can be found [here](https://docs.influxdata.com/telegraf/v1.18/plugins/).
:::



##### Check Logz.io for your metrics

{@include: ../../_include/metric-shipping/custom-dashboard.html} Install the pre-built dashboard to enhance the observability of your metrics.

<!-- logzio-inject:install:grafana:dashboards ids=["32X5zm8qW7ByLlp1YPFkrJ"] -->

{@include: ../../_include/metric-shipping/generic-dashboard.html}


## Using Prometheus


To send your Prometheus application metrics to a Logz.io Infrastructure Monitoring account, use remote write to connect to Logz.io as the endpoint. Your data is formatted as JSON documents by the Logz.io listener.

Expand Down
93 changes: 93 additions & 0 deletions docs/shipping/Other/telegraf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
id: Telegraf
title: Telegraf
overview: This integration lets you send Prometheus-format metrics to Logz.io.
product: ['metrics']
os: ['windows', 'linux']
filters: ['Other', 'Most Popular']
logo: https://logzbucket.s3.eu-west-1.amazonaws.com/logz-docs/shipper-logos/mascot-telegraf.png
logs_dashboards: []
logs_alerts: []
logs2metrics: []
metrics_dashboards: ['32X5zm8qW7ByLlp1YPFkrJ']
metrics_alerts: []
drop_filter: []
---

This project lets you configure a Telegraf agent to send your collected Prometheus-format metrics to Logz.io.

Telegraf is a plug-in driven server agent for collecting and sending metrics and events from databases, systems, and IoT sensors.

To send your Prometheus-format metrics to Logz.io, you add the **outputs.http** plug-in to your Telegraf configuration file.

<!-- logzio-inject:install:grafana:dashboards ids=["32X5zm8qW7ByLlp1YPFkrJ"] -->

#### Configure Telegraf to send your metrics data to Logz.io

##### Set up Telegraf v1.17 or higher:

**Ubuntu & Debian**

```shell
sudo apt-get update && sudo apt-get install telegraf
```

The configuration file is located at `/etc/telegraf/telegraf.conf`.

**RedHat and CentOS**

```shell
sudo yum install telegraf
```

The configuration file is located at `/etc/telegraf/telegraf.conf`.

**SLES & openSUSE**

```shell
# add go repository
zypper ar -f obs://devel:languages:go/ go
# install latest telegraf
zypper in telegraf
```

The configuration file is located at `/etc/telegraf/telegraf.conf`.

**FreeBSD/PC-BSD**

```shell
sudo pkg install telegraf
```

The configuration file is located at `/etc/telegraf/telegraf.conf`.
##### Add the outputs.http plug-in

After you create a config file for Telegraf, configure the output plug-in to enable your data to be sent to Logz.io in Prometheus-format and add the following code to the configuration file:


``` yaml
[[outputs.http]]
url = "https://<<LISTENER-HOST>>:8053"
data_format = "prometheusremotewrite"
[outputs.http.headers]
Content-Type = "application/x-protobuf"
Content-Encoding = "snappy"
X-Prometheus-Remote-Write-Version = "0.1.0"
Authorization = "Bearer <<PROMETHEUS-METRICS-SHIPPING-TOKEN>>"
```

{@include: ../../_include/general-shipping/replace-placeholders-prometheus.html}

:::note
The full list of data scraping and configuring options can be found [here](https://docs.influxdata.com/telegraf/v1.18/plugins/).
:::



##### Check Logz.io for your metrics

{@include: ../../_include/metric-shipping/custom-dashboard.html} Install the pre-built dashboard to enhance the observability of your metrics.

<!-- logzio-inject:install:grafana:dashboards ids=["32X5zm8qW7ByLlp1YPFkrJ"] -->

{@include: ../../_include/metric-shipping/generic-dashboard.html}

0 comments on commit b3578c1

Please sign in to comment.