projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
virt plugin: Added ExtraStats selector 'memory'
[collectd.git]
/
src
/
write_stackdriver.c
diff --git
a/src/write_stackdriver.c
b/src/write_stackdriver.c
index
421df2d
..
fd0192a
100644
(file)
--- a/
src/write_stackdriver.c
+++ b/
src/write_stackdriver.c
@@
-22,12
+22,12
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "configfile.h"
#include "plugin.h"
#include "configfile.h"
#include "plugin.h"
-#include "utils_format_stackdriver.h"
-#include "utils_gce.h"
-#include "utils_oauth.h"
+#include "utils/common/common.h"
+#include "utils/format_stackdriver/format_stackdriver.h"
+#include "utils/gce/gce.h"
+#include "utils/oauth/oauth.h"
#include <curl/curl.h>
#include <pthread.h>
#include <curl/curl.h>
#include <pthread.h>
@@
-236,10
+236,10
@@
static int do_post(wg_callback_t *cb, char const *url, void const *payload,
curl_easy_getinfo(cb->curl, CURLINFO_RESPONSE_CODE, &http_code);
if (ret_content != NULL) {
curl_easy_getinfo(cb->curl, CURLINFO_RESPONSE_CODE, &http_code);
if (ret_content != NULL) {
- if ((
status >= 400) && (status
< 500)) {
+ if ((
http_code >= 400) && (http_code
< 500)) {
ERROR("write_stackdriver plugin: POST %s: %s", url,
API_ERROR_STRING(parse_api_error(ret_content->memory)));
ERROR("write_stackdriver plugin: POST %s: %s", url,
API_ERROR_STRING(parse_api_error(ret_content->memory)));
- } else if (
status
>= 500) {
+ } else if (
http_code
>= 500) {
WARNING("write_stackdriver plugin: POST %s: %s", url,
ret_content->memory);
}
WARNING("write_stackdriver plugin: POST %s: %s", url,
ret_content->memory);
}
@@
-341,11
+341,6
@@
static int wg_flush_nolock(cdtime_t timeout, wg_callback_t *cb) /* {{{ */
char *payload = sd_output_reset(cb->formatter);
int status = wg_call_timeseries_write(cb, payload);
char *payload = sd_output_reset(cb->formatter);
int status = wg_call_timeseries_write(cb, payload);
- if (status != 0) {
- ERROR("write_stackdriver plugin: Sending buffer failed with status %d.",
- status);
- }
-
wg_reset_buffer(cb);
return status;
} /* }}} wg_flush_nolock */
wg_reset_buffer(cb);
return status;
} /* }}} wg_flush_nolock */