summaryrefslogtreecommitdiffstats
path: root/src/plugins/influxdb-writer.c
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-06-01 15:08:52 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-07-10 23:41:15 +0200
commit9f65896316418d257670bc65e83aa87c5683579d (patch)
tree9bfbb971e39dc3d918743f8bd15519987965ddb6 /src/plugins/influxdb-writer.c
parent7234b8adf3627338e9f34e2ce0f31b7e8754628d (diff)
Escaped special characters for measurement, tags and fields
See https://docs.influxdata.com/influxdb/v1.5/write_protocols/line_protocol_reference/#special-characters for more info. Change-Id: Iad2f7d00b7d6c42dbea33df03a75353e9cac97a9 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'src/plugins/influxdb-writer.c')
-rw-r--r--src/plugins/influxdb-writer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/influxdb-writer.c b/src/plugins/influxdb-writer.c
index aaa8991..be02e34 100644
--- a/src/plugins/influxdb-writer.c
+++ b/src/plugins/influxdb-writer.c
@@ -56,7 +56,7 @@ static size_t format_write_args(char *query, struct series_t *serie)
struct list *tags = serie->serie_columns.tags;
struct list *fields = serie->serie_columns.fields;
- strncat(query, serie->name, strlen(serie->name));
+ concatenate(query, serie->name, NULL);
if(tags) {
while(tags != NULL) {
concatenate(query, tags->key, ",");
@@ -132,6 +132,8 @@ CURL *make_curl_write_post(AFB_ApiT apiHandle, const char *url, json_object *met
}
}
+ AFB_ApiDebug(apiHandle, "influx curl: url=%s data=%s", url, (const char*) *post_data);
+
/* Check that we just do not broke the for loop before trying preparing CURL
request object */
curl = i == lpd ?