2022-01-25 15:37:43 +01:00
|
|
|
# CCMetric receivers
|
2021-05-18 15:39:22 +02:00
|
|
|
|
2022-01-25 15:37:43 +01:00
|
|
|
This folder contains the ReceiveManager and receiver implementations for the cc-metric-collector.
|
2021-05-18 15:39:22 +02:00
|
|
|
|
2022-01-25 15:37:43 +01:00
|
|
|
# Configuration
|
2021-05-18 15:39:22 +02:00
|
|
|
|
2022-01-25 15:37:43 +01:00
|
|
|
The configuration file for the receivers is a list of configurations. The `type` field in each specifies which receiver to initialize.
|
2021-11-26 14:19:07 +01:00
|
|
|
|
|
|
|
```json
|
2022-02-22 16:33:38 +01:00
|
|
|
{
|
|
|
|
"myreceivername" : {
|
2022-02-28 17:26:28 +01:00
|
|
|
"type": "receiver-type",
|
2022-02-22 16:33:38 +01:00
|
|
|
<receiver-specific configuration>
|
2022-01-25 15:37:43 +01:00
|
|
|
}
|
2022-02-22 16:33:38 +01:00
|
|
|
}
|
2021-11-26 14:19:07 +01:00
|
|
|
```
|
|
|
|
|
2022-02-28 17:26:28 +01:00
|
|
|
This allows to specify
|
2022-01-25 15:37:43 +01:00
|
|
|
|
2022-02-28 17:26:28 +01:00
|
|
|
## Available receivers
|
2022-01-25 15:37:43 +01:00
|
|
|
|
2022-02-28 17:26:28 +01:00
|
|
|
- [`nats`](./natsReceiver.md): Receive metrics from the NATS network
|
|
|
|
- [`prometheus`](./prometheusReceiver.md): Scrape data from a Prometheus client
|
2022-03-05 17:30:55 +01:00
|
|
|
- [`http`](./httpReceiver.md): Listen for HTTP Post requests transporting metrics in InfluxDB line protocol
|
2021-11-26 14:19:07 +01:00
|
|
|
|
2021-05-18 15:39:22 +02:00
|
|
|
# Contributing own receivers
|
2022-02-22 16:33:38 +01:00
|
|
|
A receiver contains a few functions and is derived from the type `Receiver` (in `metricReceiver.go`):
|
2021-05-18 15:39:22 +02:00
|
|
|
|
2022-02-28 17:26:28 +01:00
|
|
|
For an example, check the [sample receiver](./sampleReceiver.go)
|