projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5' into collectd-5.6
[collectd.git]
/
src
/
ceph.c
diff --git
a/src/ceph.c
b/src/ceph.c
index
5b79239
..
e6d3767
100644
(file)
--- a/
src/ceph.c
+++ b/
src/ceph.c
@@
-297,6
+297,11
@@
ceph_cb_number(void *ctx, const char *number_val, yajl_len_t number_len)
{
latency_type = 1;
{
latency_type = 1;
+ /* depth >= 2 => (stack[-1] != NULL && stack[-2] != NULL) */
+ assert ((state->depth < 2)
+ || ((state->stack[state->depth - 1] != NULL)
+ && (state->stack[state->depth - 2] != NULL)));
+
/* Super-special case for filestore.journal_wr_bytes.avgcount: For
* some reason, Ceph schema encodes this as a count/sum pair while all
* other "Bytes" data (excluding used/capacity bytes for OSD space) uses
/* Super-special case for filestore.journal_wr_bytes.avgcount: For
* some reason, Ceph schema encodes this as a count/sum pair while all
* other "Bytes" data (excluding used/capacity bytes for OSD space) uses
@@
-1579,8
+1584,6
@@
static int ceph_read(void)
/******* lifecycle *******/
static int ceph_init(void)
{
/******* lifecycle *******/
static int ceph_init(void)
{
- int ret;
-
#if defined(HAVE_SYS_CAPABILITY_H) && defined(CAP_DAC_OVERRIDE)
if (check_capability (CAP_DAC_OVERRIDE) != 0)
{
#if defined(HAVE_SYS_CAPABILITY_H) && defined(CAP_DAC_OVERRIDE)
if (check_capability (CAP_DAC_OVERRIDE) != 0)
{
@@
-1598,9
+1601,13
@@
static int ceph_init(void)
ceph_daemons_print();
ceph_daemons_print();
- ret = cconn_main_loop(ASOK_REQ_VERSION);
+ if (g_num_daemons < 1)
+ {
+ ERROR ("ceph plugin: No daemons configured. See the \"Daemon\" config option.");
+ return ENOENT;
+ }
- return
(ret) ? ret : 0
;
+ return
cconn_main_loop(ASOK_REQ_VERSION)
;
}
static int ceph_shutdown(void)
}
static int ceph_shutdown(void)