You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by we...@apache.org on 2021/11/12 02:41:45 UTC

[apisix] branch master updated: docs: custom configuration for datadog plugin (#5486)

This is an automated email from the ASF dual-hosted git repository.

wenming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a57523  docs: custom configuration for datadog plugin (#5486)
4a57523 is described below

commit 4a57523627d9b3bbd96b1b2c20aa6689c0cc1877
Author: Bisakh <bi...@gmail.com>
AuthorDate: Fri Nov 12 08:11:37 2021 +0530

    docs: custom configuration for datadog plugin (#5486)
---
 docs/en/latest/plugins/datadog.md | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/docs/en/latest/plugins/datadog.md b/docs/en/latest/plugins/datadog.md
index 7842018..f99e9b5 100644
--- a/docs/en/latest/plugins/datadog.md
+++ b/docs/en/latest/plugins/datadog.md
@@ -30,6 +30,7 @@ title: datadog
 - [Exported Metrics](#exported-metrics)
 - [How To Enable](#how-to-enable)
 - [Disable Plugin](#disable-plugin)
+- [Custom Configuration](#custom-configuration)
 
 ## Name
 
@@ -129,3 +130,30 @@ $ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f
     }
 }'
 ```
+
+## Custom Configuration
+
+In the default configuration, the plugin expects the dogstatsd service to be available at `127.0.0.1:8125`. If you wish to update the config, please update the plugin metadata. To know more about the fields of the datadog metadata, see [here](#metadata).
+
+Make a request to _/apisix/admin/plugin_metadata_ endpoint with the updated metadata as following:
+
+```shell
+$ curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/datadog -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "host": "172.168.45.29",
+    "port": 8126,
+    "constant_tags": [
+        "source:apisix",
+        "service:custom"
+    ],
+    "namespace": "apisix"
+}'
+```
+
+This HTTP PUT request will update the metadata and subsequent metrics will be pushed to the `172.168.45.29:8126` endpoint via UDP StatsD. Everything will be hot-loaded, there is no need to restart Apache APISIX instances.
+
+In case, if you wish to revert the datadog metadata schema to the default values, just make another PUT request to the same endpoint with an empty body. For example:
+
+```shell
+$ curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/datadog -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '{}'
+```