summaryrefslogtreecommitdiffstats
path: root/libnetdata
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2019-06-07 11:48:32 +0300
committerChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-06-07 10:48:32 +0200
commit77781d033da95d91e00970572e0abf95946907af (patch)
treeb4cd12ab3e7a0369118f45dbe2b24db8139a5022 /libnetdata
parent56c502be51dc7e441751e0de23a06d7e3ff78e2b (diff)
Prometheus remote write backend (#6062)
* Add Prometheus remote write backend prototype * Fix autotools issues * Send HTTP POST request * Add parameters to HTTP header * Discard HTTP responce 200 * Update CMake build configuration * Fix Codacy issue * Check for C++ binary * Fix compilation without remote write backend * Add options to the installer script * Fix configure script warning * Fix make dist * Downgrade to ByteSize for better compatibility * Integrate remote write more tightly into the existing backends code * Cleanup * Fix build error * Parse host tags * Fix Codacy issue * Fix counters for buffered data * Rename preprocessor symbol * Better error handling * Cleanup * Update the documentation
Diffstat (limited to 'libnetdata')
-rw-r--r--libnetdata/socket/socket.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libnetdata/socket/socket.c b/libnetdata/socket/socket.c
index 31a2e12da3..2827100815 100644
--- a/libnetdata/socket/socket.c
+++ b/libnetdata/socket/socket.c
@@ -819,11 +819,15 @@ int connect_to_one_of(const char *destination, int default_port, struct timeval
while(*s) {
const char *e = s;
+ // skip path, moving both s(tart) and e(nd)
+ if(*e == '/')
+ while(!isspace(*e) && *e != ',') s = ++e;
+
// skip separators, moving both s(tart) and e(nd)
while(isspace(*e) || *e == ',') s = ++e;
// move e(nd) to the first separator
- while(*e && !isspace(*e) && *e != ',') e++;
+ while(*e && !isspace(*e) && *e != ',' && *e != '/') e++;
// is there anything?
if(!*s || s == e) break;