diff --git a/Makefile b/Makefile index 5d020de7a..6148027f5 100644 --- a/Makefile +++ b/Makefile @@ -397,14 +397,20 @@ check-licenses: install-wwhrd wwhrd check -f .wwhrd.yml copy-docs: - echo "---\nsort: ${ORDER}\n---\n" > ${DST} + > ${DST} + @if [[ ${ORDER} > 0 ]]; then \ + echo "---\nsort: ${ORDER}\n---\n" > ${DST}; \ + fi cat ${SRC} >> ${DST} + sed -i '' 's/ + +

+To configure DataDog agent via ENV variable add the following prefix:
-```console -echo ' -{ - "series": [ - { - "host": "test.example.com", - "interval": 20, - "metric": "system.load.1", - "points": [[ - 0, - 0.5 - ]], - "tags": [ - "environment:test" - ], - "type": "rate" - } - ] -} -' | curl -X POST --data-binary @- http://vminsert-host:8480/insert/0/datadog/api/v1/series +``` +DD_DD_URL=http://victoriametrics:8428/datadog ```
+_Choose correct URL for VictoriaMetrics [here](https://docs.victoriametrics.com/url-examples.html#datadog)._ -The imported data can be read via [export API](https://docs.victoriametrics.com/url-examples.html#apiv1export): - -### Single-node VictoriaMetrics: +To configure DataDog agent via [configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files) +add the following line:
-```console -curl http://victoriametrics-host:8428/api/v1/export -d 'match[]=system.load.1' +``` +dd_url: http://victoriametrics:8428/datadog ```
-### Cluster version of VictoriaMetrics: +vmagent also can accept Datadog metrics format. Depending on where vmagent will forward data, +pick [single-node or cluster URL]((https://docs.victoriametrics.com/url-examples.html#datadog)) formats. + +### Sending metrics to Datadog and VictoriaMetrics + +DataDog allows configuring [Dual Shipping](https://docs.datadoghq.com/agent/guide/dual-shipping/) for metrics +sending via ENV variable `DD_ADDITIONAL_ENDPOINTS` or via configuration file `additional_endpoints`. + +

+ +

+ +Run DataDog using the following ENV variable with VictoriaMetrics as additional metrics receiver:
-```console -curl http://vmselect-host:8481/select/0/prometheus/api/v1/export -d 'match[]=system.load.1' +``` +DD_ADDITIONAL_ENDPOINTS='{\"http://victoriametrics:8428/datadog\"}' ```
-This command should return the following output if everything is OK: +_Choose correct URL for VictoriaMetrics [here](https://docs.victoriametrics.com/url-examples.html#datadog)._ + + +To configure DataDog Dual Shipping via [configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files) +add the following line: + +
-```json -{"metric":{"__name__":"system.load.1","environment":"test","host":"test.example.com"},"values":[0.5],"timestamps":[1632833641000]} ``` +additional_endpoints: http://victoriametrics:8428/datadog +``` + +
+ +### Send via cURL + +See how to send data to VictoriaMetrics via +[DataDog "submit metrics"](https://docs.victoriametrics.com/url-examples.html#datadogapiv1series) from command line. + +The imported data can be read via [export API](https://docs.victoriametrics.com/url-examples.html#apiv1export). + +### Additional details VictoriaMetrics automatically sanitizes metric names for the data ingested via DataDog protocol according to [DataDog metric naming recommendations](https://docs.datadoghq.com/metrics/custom_metrics/#naming-custom-metrics). @@ -451,7 +437,7 @@ See [these docs](https://docs.victoriametrics.com/vmagent.html#adding-labels-to- ## How to send data from InfluxDB-compatible agents such as [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) -Use `http://:8428` url instead of InfluxDB url in agents' configs. +Use `http://:8428` url instead of InfluxDB url in agents' configs. For instance, put the following lines into `Telegraf` config, so it sends data to VictoriaMetrics instead of InfluxDB: ```toml diff --git a/docs/README.md b/docs/README.md index fb466698a..9a2539643 100644 --- a/docs/README.md +++ b/docs/README.md @@ -337,100 +337,86 @@ See also [vmagent](https://docs.victoriametrics.com/vmagent.html), which can be ## How to send data from DataDog agent -VictoriaMetrics accepts data from [DataDog agent](https://docs.datadoghq.com/agent/) or [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/) via ["submit metrics" API](https://docs.datadoghq.com/api/latest/metrics/#submit-metrics) at `/datadog/api/v1/series` path. +VictoriaMetrics accepts data from [DataDog agent](https://docs.datadoghq.com/agent/) +or [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/) +via ["submit metrics" API](https://docs.datadoghq.com/api/latest/metrics/#submit-metrics) +at `/datadog/api/v1/series` path. -### Single-node VictoriaMetrics: +### Sending metrics to VictoriaMetrics -Run DataDog agent with environment variable `DD_DD_URL=http://victoriametrics-host:8428/datadog`. Alternatively, set `dd_url` param at [DataDog agent configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/) to `http://victoriametrics-host:8428/datadog`. +DataDog agent allows configuring destinations for metrics sending via ENV variable `DD_DD_URL` +or via [configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/) in section `dd_url`. -### Cluster version of VictoriaMetrics: - -Run DataDog agent with environment variable `DD_DD_URL=http://vinsert-host:8480/insert/0/datadog`. Alternatively, set `dd_url` param at [DataDog agent configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/) to `DD_DD_URL=http://vinsert-host:8480/insert/0/datadog`. - -VictoriaMetrics doesn't check `DD_API_KEY` param, so it can be set to arbitrary value. - -Example of how to send data to VictoriaMetrics via [DataDog "submit metrics"](https://docs.victoriametrics.com/url-examples.html#datadogapiv1series) from command line: - -### Single-node VictoriaMetrics: - -```console -echo ' -{ - "series": [ - { - "host": "test.example.com", - "interval": 20, - "metric": "system.load.1", - "points": [[ - 0, - 0.5 - ]], - "tags": [ - "environment:test" - ], - "type": "rate" - } - ] -} -' | curl -X POST --data-binary @- http://victoriametrics-host:8428/datadog/api/v1/series -``` - -### Cluster version of VictoriaMetrics: +

+ +

+To configure DataDog agent via ENV variable add the following prefix:
-```console -echo ' -{ - "series": [ - { - "host": "test.example.com", - "interval": 20, - "metric": "system.load.1", - "points": [[ - 0, - 0.5 - ]], - "tags": [ - "environment:test" - ], - "type": "rate" - } - ] -} -' | curl -X POST --data-binary @- http://vminsert-host:8480/insert/0/datadog/api/v1/series +``` +DD_DD_URL=http://victoriametrics:8428/datadog ```
+_Choose correct URL for VictoriaMetrics [here](https://docs.victoriametrics.com/url-examples.html#datadog)._ -The imported data can be read via [export API](https://docs.victoriametrics.com/url-examples.html#apiv1export): - -### Single-node VictoriaMetrics: +To configure DataDog agent via [configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files) +add the following line:
-```console -curl http://victoriametrics-host:8428/api/v1/export -d 'match[]=system.load.1' +``` +dd_url: http://victoriametrics:8428/datadog ```
-### Cluster version of VictoriaMetrics: +vmagent also can accept Datadog metrics format. Depending on where vmagent will forward data, +pick [single-node or cluster URL]((https://docs.victoriametrics.com/url-examples.html#datadog)) formats. + +### Sending metrics to Datadog and VictoriaMetrics + +DataDog allows configuring [Dual Shipping](https://docs.datadoghq.com/agent/guide/dual-shipping/) for metrics +sending via ENV variable `DD_ADDITIONAL_ENDPOINTS` or via configuration file `additional_endpoints`. + +

+ +

+ +Run DataDog using the following ENV variable with VictoriaMetrics as additional metrics receiver:
-```console -curl http://vmselect-host:8481/select/0/prometheus/api/v1/export -d 'match[]=system.load.1' +``` +DD_ADDITIONAL_ENDPOINTS='{\"http://victoriametrics:8428/datadog\"}' ```
-This command should return the following output if everything is OK: +_Choose correct URL for VictoriaMetrics [here](https://docs.victoriametrics.com/url-examples.html#datadog)._ + + +To configure DataDog Dual Shipping via [configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files) +add the following line: + +
-```json -{"metric":{"__name__":"system.load.1","environment":"test","host":"test.example.com"},"values":[0.5],"timestamps":[1632833641000]} ``` +additional_endpoints: http://victoriametrics:8428/datadog +``` + +
+ +### Send via cURL + +See how to send data to VictoriaMetrics via +[DataDog "submit metrics"](https://docs.victoriametrics.com/url-examples.html#datadogapiv1series) from command line. + +The imported data can be read via [export API](https://docs.victoriametrics.com/url-examples.html#apiv1export). + +### Additional details VictoriaMetrics automatically sanitizes metric names for the data ingested via DataDog protocol according to [DataDog metric naming recommendations](https://docs.datadoghq.com/metrics/custom_metrics/#naming-custom-metrics). @@ -451,7 +437,7 @@ See [these docs](https://docs.victoriametrics.com/vmagent.html#adding-labels-to- ## How to send data from InfluxDB-compatible agents such as [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) -Use `http://:8428` url instead of InfluxDB url in agents' configs. +Use `http://:8428` url instead of InfluxDB url in agents' configs. For instance, put the following lines into `Telegraf` config, so it sends data to VictoriaMetrics instead of InfluxDB: ```toml diff --git a/docs/Sending_DD_metrics_to_VM.png b/docs/Single-server-VictoriaMetrics-sending_DD_metrics_to_VM.png similarity index 100% rename from docs/Sending_DD_metrics_to_VM.png rename to docs/Single-server-VictoriaMetrics-sending_DD_metrics_to_VM.png diff --git a/docs/Sending_DD_metrics_to_VM_and_DDhq.png b/docs/Single-server-VictoriaMetrics-sending_DD_metrics_to_VM_and_DD.png similarity index 100% rename from docs/Sending_DD_metrics_to_VM_and_DDhq.png rename to docs/Single-server-VictoriaMetrics-sending_DD_metrics_to_VM_and_DD.png diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 100a9457a..da3e76d27 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -341,19 +341,21 @@ See also [vmagent](https://docs.victoriametrics.com/vmagent.html), which can be ## How to send data from DataDog agent -VictoriaMetrics accepts data from [DataDog agent](https://docs.datadoghq.com/agent/) or [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/) via ["submit metrics" API](https://docs.datadoghq.com/api/latest/metrics/#submit-metrics) at `/datadog/api/v1/series` path. +VictoriaMetrics accepts data from [DataDog agent](https://docs.datadoghq.com/agent/) +or [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/) +via ["submit metrics" API](https://docs.datadoghq.com/api/latest/metrics/#submit-metrics) +at `/datadog/api/v1/series` path. ### Sending metrics to VictoriaMetrics -DataDog agent allows configuring destinations for metrics sending via ENV variable `DD_DD_URL` or via [configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/) in section `dd_url`. +DataDog agent allows configuring destinations for metrics sending via ENV variable `DD_DD_URL` +or via [configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/) in section `dd_url`.

- +

-Depending on where you want to send metrics, the [URL for VictoriaMetrics](https://docs.victoriametrics.com/url-examples.html#datadog) will be different: -1. Run DataDog using this ENV variable for sending metrics to VictoriaMetrics - +To configure DataDog agent via ENV variable add the following prefix:
``` @@ -362,7 +364,10 @@ DD_DD_URL=http://victoriametrics:8428/datadog
-Alternatively add this `dd_url` to DataDog YAML configuration file. +_Choose correct URL for VictoriaMetrics [here](https://docs.victoriametrics.com/url-examples.html#datadog)._ + +To configure DataDog agent via [configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files) +add the following line:
@@ -372,17 +377,19 @@ dd_url: http://victoriametrics:8428/datadog
-2. vmagent also can accept Datadog metrics format. Depending on where vmagent will forward data, pick the single-node or cluster URL formats. +vmagent also can accept Datadog metrics format. Depending on where vmagent will forward data, +pick [single-node or cluster URL]((https://docs.victoriametrics.com/url-examples.html#datadog)) formats. ### Sending metrics to Datadog and VictoriaMetrics -DataDog allows configuring [Dual Shipping](https://docs.datadoghq.com/agent/guide/dual-shipping/) for metrics sending via ENV variable `DD_ADDITIONAL_ENDPOINTS` or via configuration file `additional_endpoints` described in section YAML configuration. +DataDog allows configuring [Dual Shipping](https://docs.datadoghq.com/agent/guide/dual-shipping/) for metrics +sending via ENV variable `DD_ADDITIONAL_ENDPOINTS` or via configuration file `additional_endpoints`.

- +

-Run DataDog using this ENV variable for sending metrics to the single-node VictoriaMetrics on top of DataDoghq. +Run DataDog using the following ENV variable with VictoriaMetrics as additional metrics receiver:
@@ -392,103 +399,26 @@ DD_ADDITIONAL_ENDPOINTS='{\"http://victoriametrics:8428/datadog\"}'
-Alternatively add an `additional_endpoints` to [DataDog agent configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/). +_Choose correct URL for VictoriaMetrics [here](https://docs.victoriametrics.com/url-examples.html#datadog)._ + + +To configure DataDog Dual Shipping via [configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files) +add the following line:
``` -dd_url: http://victoriametrics:8428/datadog +additional_endpoints: http://victoriametrics:8428/datadog ```
### Send via cURL -Example of how to send data to VictoriaMetrics via [DataDog "submit metrics"](https://docs.victoriametrics.com/url-examples.html#datadogapiv1series) from command line: +See how to send data to VictoriaMetrics via +[DataDog "submit metrics"](https://docs.victoriametrics.com/url-examples.html#datadogapiv1series) from command line. -### Single-node VictoriaMetrics: - -
- -```console -echo ' -{ - "series": [ - { - "host": "test.example.com", - "interval": 20, - "metric": "system.load.1", - "points": [[ - 0, - 0.5 - ]], - "tags": [ - "environment:test" - ], - "type": "rate" - } - ] -} -' | curl -X POST --data-binary @- http://victoriametrics:8428/datadog/api/v1/series -``` -
- -### Cluster version of VictoriaMetrics: - -
- -```console -echo ' -{ - "series": [ - { - "host": "test.example.com", - "interval": 20, - "metric": "system.load.1", - "points": [[ - 0, - 0.5 - ]], - "tags": [ - "environment:test" - ], - "type": "rate" - } - ] -} -' | curl -X POST --data-binary @- http://vminsert:8480/insert/0/datadog/api/v1/series -``` - -
- - -The imported data can be read via [export API](https://docs.victoriametrics.com/url-examples.html#apiv1export): - -### Single-node VictoriaMetrics: - -
- -```console -curl http://victoriametrics:8428/api/v1/export -d 'match[]=system.load.1' -``` - -
- -### Cluster version of VictoriaMetrics: - -
- -```console -curl http://vmselect:8481/select/0/prometheus/api/v1/export -d 'match[]=system.load.1' -``` - -
- -This command should return the following output if everything is OK: - -```json -{"metric":{"__name__":"system.load.1","environment":"test","host":"test.example.com"},"values":[0.5],"timestamps":[1632833641000]} -``` +The imported data can be read via [export API](https://docs.victoriametrics.com/url-examples.html#apiv1export). ### Additional details