diff --git a/README.md b/README.md index 3d72e3eeb..dc351320d 100644 --- a/README.md +++ b/README.md @@ -326,11 +326,19 @@ See also [vmagent](https://docs.victoriametrics.com/vmagent.html), which can be 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. -Run DataDog agent with `DD_DD_URL=http://victoriametrics-host:8428/datadog` environment variable in order to write data to VictoriaMetrics at `victoriametrics-host` host. Another option is to set `dd_url` param at [DataDog agent configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/) to `http://victoriametrics-host:8428/datadog`. +Single-node 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`. + +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 on how to send data to VictoriaMetrics via DataDog "submit metrics" API from command line: +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 ' @@ -351,15 +359,56 @@ echo ' } ] } -' | curl -X POST --data-binary @- http://localhost:8428/datadog/api/v1/series +' | curl -X POST --data-binary @- http://victoriametrics-host:8428/datadog/api/v1/series ``` -The imported data can be read via [export API](https://docs.victoriametrics.com/#how-to-export-data-in-json-line-format): +Cluster version of VictoriaMetrics:
```console -curl http://localhost:8428/api/v1/export -d 'match[]=system.load.1' +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 +``` + +
+ + +The imported data can be read via [export API](https://docs.victoriametrics.com/url-examples.html#apiv1export): + +Single-node VictoriaMetrics: + +
+ +```console +curl http://victoriametrics-host:8428/api/v1/export -d 'match[]=system.load.1' +``` + +
+ +Cluster version of VictoriaMetrics: + +
+ +```console +curl http://vmselect-host:8481/select/0/prometheus/api/v1/export -d 'match[]=system.load.1' ```
diff --git a/docs/README.md b/docs/README.md index 3d72e3eeb..dc351320d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -326,11 +326,19 @@ See also [vmagent](https://docs.victoriametrics.com/vmagent.html), which can be 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. -Run DataDog agent with `DD_DD_URL=http://victoriametrics-host:8428/datadog` environment variable in order to write data to VictoriaMetrics at `victoriametrics-host` host. Another option is to set `dd_url` param at [DataDog agent configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/) to `http://victoriametrics-host:8428/datadog`. +Single-node 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`. + +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 on how to send data to VictoriaMetrics via DataDog "submit metrics" API from command line: +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 ' @@ -351,15 +359,56 @@ echo ' } ] } -' | curl -X POST --data-binary @- http://localhost:8428/datadog/api/v1/series +' | curl -X POST --data-binary @- http://victoriametrics-host:8428/datadog/api/v1/series ``` -The imported data can be read via [export API](https://docs.victoriametrics.com/#how-to-export-data-in-json-line-format): +Cluster version of VictoriaMetrics:
```console -curl http://localhost:8428/api/v1/export -d 'match[]=system.load.1' +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 +``` + +
+ + +The imported data can be read via [export API](https://docs.victoriametrics.com/url-examples.html#apiv1export): + +Single-node VictoriaMetrics: + +
+ +```console +curl http://victoriametrics-host:8428/api/v1/export -d 'match[]=system.load.1' +``` + +
+ +Cluster version of VictoriaMetrics: + +
+ +```console +curl http://vmselect-host:8481/select/0/prometheus/api/v1/export -d 'match[]=system.load.1' ```
diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index aef1b2404..0af953557 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -330,11 +330,19 @@ See also [vmagent](https://docs.victoriametrics.com/vmagent.html), which can be 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. -Run DataDog agent with `DD_DD_URL=http://victoriametrics-host:8428/datadog` environment variable in order to write data to VictoriaMetrics at `victoriametrics-host` host. Another option is to set `dd_url` param at [DataDog agent configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/) to `http://victoriametrics-host:8428/datadog`. +Single-node 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`. + +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 on how to send data to VictoriaMetrics via DataDog "submit metrics" API from command line: +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 ' @@ -355,15 +363,56 @@ echo ' } ] } -' | curl -X POST --data-binary @- http://localhost:8428/datadog/api/v1/series +' | curl -X POST --data-binary @- http://victoriametrics-host:8428/datadog/api/v1/series ``` -The imported data can be read via [export API](https://docs.victoriametrics.com/#how-to-export-data-in-json-line-format): +Cluster version of VictoriaMetrics:
```console -curl http://localhost:8428/api/v1/export -d 'match[]=system.load.1' +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 +``` + +
+ + +The imported data can be read via [export API](https://docs.victoriametrics.com/url-examples.html#apiv1export): + +Single-node VictoriaMetrics: + +
+ +```console +curl http://victoriametrics-host:8428/api/v1/export -d 'match[]=system.load.1' +``` + +
+ +Cluster version of VictoriaMetrics: + +
+ +```console +curl http://vmselect-host:8481/select/0/prometheus/api/v1/export -d 'match[]=system.load.1' ```
diff --git a/docs/url-examples.md b/docs/url-examples.md index ca00f3680..35e610765 100644 --- a/docs/url-examples.md +++ b/docs/url-examples.md @@ -101,6 +101,7 @@ Additional information: * [How to export time series](https://docs.victoriametrics.com/#how-to-export-time-series) * [How to import time series](https://docs.victoriametrics.com/#how-to-import-time-series-data) +* [How to export data in JSON line format](https://docs.victoriametrics.com/#how-to-export-data-in-json-line-format) * [URL format for VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#url-format) ## /api/v1/export/csv