author | Florian Forster <octo@collectd.org> | |
Fri, 6 Oct 2017 13:32:01 +0000 (15:32 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 6 Oct 2017 13:32:01 +0000 (15:32 +0200) |
1 | 2 | |||
---|---|---|---|---|
src/collectd.conf.in | patch | | diff1 | | diff2 | | blob | history |
src/collectd.conf.pod | patch | | diff1 | | diff2 | | blob | history |
src/varnish.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc src/collectd.conf.in
Simple merge
diff --cc src/collectd.conf.pod
Simple merge
diff --cc src/varnish.c
index d57413c6ecce7fd8005f8c56ae7fcf951711a046,a0286d31e10e1db2046eac297eb77e289f5c7e61..e4daf4bf84b4e9f59b6215e4462c0d57e383e4ed
--- 1/src/varnish.c
--- 2/src/varnish.c
+++ b/src/varnish.c
return varnish_submit_derive(conf->instance, "mempool",
"total_operations", "frees", val);
else if (strcmp(name, "recycle") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "recycled", val);
else if (strcmp(name, "timeout") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "timed_out", val);
else if (strcmp(name, "toosmall") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "too_small", val);
else if (strcmp(name, "surplus") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "surplus", val);
else if (strcmp(name, "randry") == 0)
- return varnish_submit_derive(conf->instance, "mempool",
+ return varnish_submit_gauge(conf->instance, "mempool",
"objects", "ran_dry", val);
}
+
+ if (conf->collect_mse) {
+ if (strcmp(name, "c_full") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "full_allocs", val);
+ else if (strcmp(name, "c_truncated") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "truncated_allocs", val);
+ else if (strcmp(name, "c_expanded") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "expanded_allocs", val);
+ else if (strcmp(name, "c_failed") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "failed_allocs", val);
+ else if (strcmp(name, "c_bytes") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_bytes", "bytes_allocated", val);
+ else if (strcmp(name, "c_freed") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_bytes", "bytes_freed", val);
+ else if (strcmp(name, "g_fo_alloc") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "fo_allocs_outstanding", val);
+ else if (strcmp(name, "g_fo_bytes") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "bytes", "fo_bytes_outstanding", val);
+ else if (strcmp(name, "g_membuf_alloc") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "objects", "membufs_allocated", val);
+ else if (strcmp(name, "g_membuf_inuse") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "objects", "membufs_inuse", val);
+ else if (strcmp(name, "g_bans_bytes") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "bytes", "persisted_banspace_used", val);
+ else if (strcmp(name, "g_bans_space") == 0)
+ return varnish_submit_gauge(conf->instance, "mse",
+ "bytes", "persisted_banspace_available", val);
+ else if (strcmp(name, "g_bans_persisted") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "bans_persisted", val);
+ else if (strcmp(name, "g_bans_lost") == 0)
+ return varnish_submit_derive(conf->instance, "mse",
+ "total_operations", "bans_lost", val);
+
+ /* mse seg */
+ else if (strcmp(name, "g_journal_bytes") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_reg",
+ "bytes", "journal_bytes_used", val);
+ else if (strcmp(name, "g_journal_space") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_reg",
+ "bytes", "journal_bytes_free", val);
+
+ /* mse segagg */
+ else if (strcmp(name, "g_bigspace") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "bytes", "big_extents_bytes_available", val);
+ else if (strcmp(name, "g_extfree") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "free_extents", val);
+ else if (strcmp(name, "g_sparenode") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "spare_nodes_available", val);
+ else if (strcmp(name, "g_objnode") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "object_nodes_in_use", val);
+ else if (strcmp(name, "g_extnode") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "extent_nodes_in_use", val);
+ else if (strcmp(name, "g_bigextfree") == 0)
+ return varnish_submit_gauge(conf->instance, "mse_segagg",
+ "objects", "free_big_extents", val);
+ else if (strcmp(name, "c_pruneloop") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "prune_loops", val);
+ else if (strcmp(name, "c_pruned") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_objects", "pruned_objects", val);
+ else if (strcmp(name, "c_spared") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "spared_objects", val);
+ else if (strcmp(name, "c_skipped") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "missed_objects", val);
+ else if (strcmp(name, "c_nuked") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "nuked_objects", val);
+ else if (strcmp(name, "c_sniped") == 0)
+ return varnish_submit_derive(conf->instance, "mse_segagg",
+ "total_operations", "sniped_objects", val);
+
+ }
+
#endif
return 0;