aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/influxdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/influxdb.c b/src/plugins/influxdb.c
index f2f8fe1..5cc09b0 100644
--- a/src/plugins/influxdb.c
+++ b/src/plugins/influxdb.c
@@ -32,7 +32,7 @@ CTLP_ONLOAD(plugin, ret)
int err = 0;
char* result;
size_t result_size;
- CURL* request = curl_wrap_prepare_get("localhost:" DEFAULT_DBPORT "/ping", NULL, NULL);
+ CURL* request = curl_wrap_prepare_get(DEFAULT_DBHOST ":" DEFAULT_DBPORT "/ping", NULL, NULL);
struct reader_args r_args = { NULL, NULL, 1000000 };
plugin->context = (void*)&r_args;
@@ -54,7 +54,7 @@ CTLP_CAPI(influxdb_ping, source, argsJ, eventJ)
char* result;
size_t result_size;
- CURL* curl_req = curl_wrap_prepare_get("localhost:" DEFAULT_DBPORT "/ping", NULL, NULL);
+ CURL* curl_req = curl_wrap_prepare_get(DEFAULT_DBHOST ":" DEFAULT_DBPORT "/ping", NULL, NULL);
curl_wrap_perform(curl_req, &result, &result_size);
@@ -99,7 +99,7 @@ int create_database(afb_req_t request)
post_data[0] = "q=CREATE DATABASE \"" DEFAULT_DB "\"";
post_data[1] = NULL;
- CURL* curl_req = curl_wrap_prepare_post_unescaped("localhost:" DEFAULT_DBPORT "/query", NULL, " ", post_data);
+ CURL* curl_req = curl_wrap_prepare_post_unescaped(DEFAULT_DBHOST ":" DEFAULT_DBPORT "/query", NULL, " ", post_data);
curl_wrap_perform(curl_req, &result, &result_size);
if (curl_wrap_response_code_get(request) != 200) {