template: 30min_packet_drops
on: net.drops
lookup: sum -30m unaligned absolute
- every: 10s
+ every: 1m
+ crit: $this > 0
+
+
+# check if an interface is having FIFO
+# buffer errors
+# the alarm is checked every 10 seconds
+# and examines the last 30 minutes of data
+
+template: 30min_fifo_errors
+ on: net.fifo
+ lookup: sum -30m unaligned absolute
+ every: 1m
crit: $this > 0
['a8feb36776005bf419c90278787a1be8']='health.d/entropy.conf'
['d8dc489e32f7114c6298fce94e86a8ef']='health.d/entropy.conf'
['373c1276dc9e65884ff2b26e1f08afe7']='health.d/named.conf'
+ ['2827de41cf34a91b7a8e4d8724f59668']='health.d/net.conf'
['43ebb7f224c3b232d8ad044d7e9508b6']='health.d/net.conf'
['d11711b3647bc2bdd0292dd7deebbeb1']='health.d/net.conf'
['de02f899a61f21b86adb646940f0bcae']='health.d/net.conf'
['80f109ff293ac94222bf3959432751bd']='health.d/qos.conf'
['325617412a628e3bc776e3fbb777a2a6']='health.d/redis.conf'
['23ae815aefa221b1929f96752a1f7556']='health.d/squid.conf'
- ['6b917300747e7e8314844237e2462261']='python.d/apache_cache.conf'
- ['e0e96cc47ed61d6492416be5236cd4d3']='python.d/apache_cache.conf'
- ['5278ebbae19c60db600f0a119cb3664e']='python.d/apache.conf'
- ['5829812db29598db5857c9f433e96fef']='python.d/apache.conf'
- ['6bf0de6e3b251b765b10a71d8c5c319d']='python.d/apache.conf'
['13141998a5d71308d9c119834c27bfd3']='python.d.conf'
['38d1bf04fe9901481dd6febcc0404a86']='python.d.conf'
['4b775fb31342f1478b3773d041a72911']='python.d.conf'
['bba2f3886587f137ea08a6e63dd3d376']='python.d.conf'
['d55be5bb5e108da1e7645da007c53cd4']='python.d.conf'
['f82924563e41d99cdae5431f0af69155']='python.d.conf'
+ ['5278ebbae19c60db600f0a119cb3664e']='python.d/apache.conf'
+ ['5829812db29598db5857c9f433e96fef']='python.d/apache.conf'
+ ['6bf0de6e3b251b765b10a71d8c5c319d']='python.d/apache.conf'
+ ['6b917300747e7e8314844237e2462261']='python.d/apache_cache.conf'
+ ['e0e96cc47ed61d6492416be5236cd4d3']='python.d/apache_cache.conf'
['7830066c46a7e5f9682b8d3f4566b4e5']='python.d/cpufreq.conf'
['b5b5a8d6d991fb1cef8d80afa23ba114']='python.d/cpufreq.conf'
['dc0d2b96378f290eec3fcf98b89ad824']='python.d/cpufreq.conf'
CHARTS = {
'sessions': {
- 'options': [None, "logins and sessions", 'number', 'IMAP', 'dovecot.imap', 'line'],
+ 'options': [None, "logins and sessions", 'number', 'IMAP', 'dovecot.sessions', 'line'],
'lines': [
['num_logins', 'logins', 'absolute'],
['num_connected_sessions', 'active sessions', 'absolute']
]},
'commands': {
- 'options': [None, "commands", "commands", 'IMAP', 'dovecot.imap', 'line'],
+ 'options': [None, "commands", "commands", 'IMAP', 'dovecot.commands', 'line'],
'lines': [
['num_cmds', 'commands', 'absolute']
]},
['invol_cs', 'involountary', 'absolute']
]},
'disk': {
- 'options': [None, "disk", 'bytes/s', 'Reads and Writes', 'dovecot.read_write', 'line'],
+ 'options': [None, "disk", 'bytes/s', 'Reads and Writes', 'dovecot.disk', 'line'],
'lines': [
['disk_input', 'read', 'incremental'],
['disk_output', 'write', 'incremental']
]},
'bytes': {
- 'options': [None, "bytes", 'bytes/s', 'Reads and Writes', 'dovecot.read_write', 'line'],
+ 'options': [None, "bytes", 'bytes/s', 'Reads and Writes', 'dovecot.bytes', 'line'],
'lines': [
['read_bytes', 'read', 'incremental'],
['write_bytes', 'write', 'incremental']
]},
'syscalls': {
- 'options': [None, "number of syscalls", 'syscalls/s', 'Reads and Writes', 'dovecot.read_write', 'line'],
+ 'options': [None, "number of syscalls", 'syscalls/s', 'Reads and Writes', 'dovecot.syscalls', 'line'],
'lines': [
['read_count', 'read', 'incremental'],
['write_count', 'write', 'incremental']
]},
'lookup': {
- 'options': [None, "lookups", 'number/s', 'Mail', 'dovecot.mail', 'line'],
+ 'options': [None, "lookups", 'number/s', 'Mail', 'dovecot.lookup', 'line'],
'lines': [
['mail_lookup_path', 'path', 'incremental'],
['mail_lookup_attr', 'attr', 'incremental']
]},
'cache': {
- 'options': [None, "hits", 'hits/s', 'Mail', 'dovecot.mail', 'line'],
+ 'options': [None, "hits", 'hits/s', 'Mail', 'dovecot.cache', 'line'],
'lines': [
['mail_cache_hits', 'hits', 'incremental']
]},
['auth_failures', 'failure', 'absolute']
]},
'auth_cache': {
- 'options': [None, "cache", 'number', 'Authentication', 'dovecot.auth', 'stacked'],
+ 'options': [None, "cache", 'number', 'Authentication', 'dovecot.auth_cache', 'stacked'],
'lines': [
['auth_cache_hits', 'hit', 'absolute'],
['auth_cache_misses', 'miss', 'absolute']
CHARTS = {
'qemails': {
- 'options': [None, "Exim Queue Emails", "emails", 'queue', 'exim.queued.emails', 'line'],
+ 'options': [None, "Exim Queue Emails", "emails", 'queue', 'exim.qemails', 'line'],
'lines': [
['emails', None, 'absolute']
]}
CHARTS = {
'temperatures': {
- 'options': ['disks_temp', 'temperature', 'Celsius', 'Disks temperature', 'hddtemp.temp', 'line'],
+ 'options': ['disks_temp', 'temperature', 'Celsius', 'Disks temperature', 'hddtemp.temperatures', 'line'],
'lines': [
# lines are created dynamically in `check()` method
]}
['bytes_written', 'written', 'incremental', 1, 1024]
]},
'connections': {
- 'options': [None, 'Connections', 'connections/s', 'Cluster', 'memcached.cluster', 'line'],
+ 'options': [None, 'Connections', 'connections/s', 'Cluster', 'memcached.connections', 'line'],
'lines': [
['curr_connections', 'current', 'incremental'],
['rejected_connections', 'rejected', 'incremental'],
['total_connections', 'total', 'incremental']
]},
'items': {
- 'options': [None, 'Items', 'items', 'Cluster', 'memcached.cluster', 'line'],
+ 'options': [None, 'Items', 'items', 'Cluster', 'memcached.items', 'line'],
'lines': [
['curr_items', 'current', 'absolute'],
['total_items', 'total', 'absolute']
['get_misses', 'misses', 'percent-of-absolute-row']
]},
'get_rate': {
- 'options': [None, 'Rate', 'requests/s', 'GET', 'memcached.get', 'line'],
+ 'options': [None, 'Rate', 'requests/s', 'GET', 'memcached.get_rate', 'line'],
'lines': [
['cmd_get', 'rate', 'incremental']
]},
'set_rate': {
- 'options': [None, 'Rate', 'requests/s', 'SET', 'memcached.set', 'line'],
+ 'options': [None, 'Rate', 'requests/s', 'SET', 'memcached.set_rate', 'line'],
'lines': [
['cmd_set', 'rate', 'incremental']
]},
['cas_badval', 'bad value', 'percent-of-absolute-row']
]},
'increment': {
- 'options': [None, 'Requests', 'requests', 'Increment', 'memcached.incr', 'stacked'],
+ 'options': [None, 'Requests', 'requests', 'Increment', 'memcached.increment', 'stacked'],
'lines': [
['incr_hits', 'hits', 'percent-of-absolute-row'],
['incr_misses', 'misses', 'percent-of-absolute-row']
]},
'decrement': {
- 'options': [None, 'Requests', 'requests', 'Decrement', 'memcached.decr', 'stacked'],
+ 'options': [None, 'Requests', 'requests', 'Decrement', 'memcached.decrement', 'stacked'],
'lines': [
['decr_hits', 'hits', 'percent-of-absolute-row'],
['decr_misses', 'misses', 'percent-of-absolute-row']
['touch_misses', 'misses', 'percent-of-absolute-row']
]},
'touch_rate': {
- 'options': [None, 'Rate', 'requests/s', 'Touch', 'memcached.touch', 'line'],
+ 'options': [None, 'Rate', 'requests/s', 'Touch', 'memcached.touch_rate', 'line'],
'lines': [
['cmd_touch', 'rate', 'incremental']
]}
["Select_scan", "scan", "incremental"]
]},
'sort_issues': {
- 'options': [None, 'mysql Sort Issues', 'issues/s', 'issues', 'mysql.sort.issues', 'line'],
+ 'options': [None, 'mysql Sort Issues', 'issues/s', 'issues', 'mysql.sort_issues', 'line'],
'lines': [
["Sort_merge_passes", "merge_passes", "incremental"],
["Sort_range", "range", "incremental"],
["requests", None, 'incremental']
]},
'connection_status': {
- 'options': [None, 'nginx Active Connections by Status', 'connections', 'nginx', 'nginx.connection.status', 'line'],
+ 'options': [None, 'nginx Active Connections by Status', 'connections', 'nginx', 'nginx.connection_status', 'line'],
'lines': [
["reading"],
["writing"],
["waiting", "idle"]
]},
'connect_rate': {
- 'options': [None, 'nginx Connections Rate', 'connections/s', 'nginx', 'nginx.performance', 'line'],
+ 'options': [None, 'nginx Connections Rate', 'connections/s', 'nginx', 'nginx.connect_rate', 'line'],
'lines': [
["accepts", "accepted", "incremental"],
["handled", None, "incremental"]
CHARTS = {
'qemails': {
- 'options': [None, "Postfix Queue Emails", "emails", 'queue', 'postfix.queued.emails', 'line'],
+ 'options': [None, "Postfix Queue Emails", "emails", 'queue', 'postfix.qemails', 'line'],
'lines': [
['emails', None, 'absolute']
]},
'qsize': {
- 'options': [None, "Postfix Queue Emails Size", "emails size in KB", 'queue', 'postfix.queued.size', 'area'],
+ 'options': [None, "Postfix Queue Emails Size", "emails size in KB", 'queue', 'postfix.qsize', 'area'],
'lines': [
["size", None, 'absolute']
]}
CHARTS = {
'operations': {
- 'options': [None, 'Operations', 'operations/s', 'Statistics', 'redis.statistics', 'line'],
+ 'options': [None, 'Operations', 'operations/s', 'Statistics', 'redis.operations', 'line'],
'lines': [
['instantaneous_ops_per_sec', 'operations', 'absolute']
]},
'hit_rate': {
- 'options': [None, 'Hit rate', 'percent', 'Statistics', 'redis.statistics', 'line'],
+ 'options': [None, 'Hit rate', 'percent', 'Statistics', 'redis.hit_rate', 'line'],
'lines': [
['hit_rate', 'rate', 'absolute']
]},
['blocked_clients', 'blocked', 'absolute']
]},
'slaves': {
- 'options': [None, 'Slaves', 'slaves', 'Replication', 'redis.replication', 'line'],
+ 'options': [None, 'Slaves', 'slaves', 'Replication', 'redis.slaves', 'line'],
'lines': [
['connected_slaves', 'connected', 'absolute']
]}
# This is a prototype of chart definition which is used to dynamically create self.definitions
CHARTS = {
'temperature': {
- 'options': [None, ' temperature', 'Celsius', 'temperature', 'sensors.temp', 'line'],
+ 'options': [None, ' temperature', 'Celsius', 'temperature', 'sensors.temperature', 'line'],
'lines': [
[None, None, 'absolute', 1, 1000]
]},
'voltage': {
- 'options': [None, ' voltage', 'Volts', 'voltage', 'sensors.volt', 'line'],
+ 'options': [None, ' voltage', 'Volts', 'voltage', 'sensors.voltage', 'line'],
'lines': [
[None, None, 'absolute', 1, 1000]
]},
'current': {
- 'options': [None, ' current', 'Ampere', 'current', 'sensors.curr', 'line'],
+ 'options': [None, ' current', 'Ampere', 'current', 'sensors.current', 'line'],
'lines': [
[None, None, 'absolute', 1, 1000]
]},
[None, None, 'absolute', 1, 1000000]
]},
'fan': {
- 'options': [None, ' fans speed', 'Rotations/min', 'fans', 'sensors.fans', 'line'],
+ 'options': [None, ' fans speed', 'Rotations/min', 'fans', 'sensors.fan', 'line'],
'lines': [
[None, None, 'absolute', 1, 1000]
]},
CHARTS = {
'clients_net': {
- 'options': [None, "Squid Client Bandwidth", "kilobits/s", "clients", "squid.clients.net", "area"],
+ 'options': [None, "Squid Client Bandwidth", "kilobits/s", "clients", "squid.clients_net", "area"],
'lines': [
["client_http_kbytes_in", "in", "incremental", 8, 1],
["client_http_kbytes_out", "out", "incremental", -8, 1],
["client_http_hit_kbytes_out", "hits", "incremental", -8, 1]
]},
'clients_requests': {
- 'options': [None, "Squid Client Requests", "requests/s", "clients", "squid.clients.requests", 'line'],
+ 'options': [None, "Squid Client Requests", "requests/s", "clients", "squid.clients_requests", 'line'],
'lines': [
["client_http_requests", "requests", "incremental"],
["client_http_hits", "hits", "incremental"],
["client_http_errors", "errors", "incremental", -1, 1]
]},
'servers_net': {
- 'options': [None, "Squid Server Bandwidth", "kilobits/s", "servers", "squid.servers.net", "area"],
+ 'options': [None, "Squid Server Bandwidth", "kilobits/s", "servers", "squid.servers_net", "area"],
'lines': [
["server_all_kbytes_in", "in", "incremental", 8, 1],
["server_all_kbytes_out", "out", "incremental", -8, 1]
]},
'servers_requests': {
- 'options': [None, "Squid Server Requests", "requests/s", "servers", "squid.servers.requests", 'line'],
+ 'options': [None, "Squid Server Requests", "requests/s", "servers", "squid.servers_requests", 'line'],
'lines': [
["server_all_requests", "requests", "incremental"],
["server_all_errors", "errors", "incremental", -1, 1]
+#include "common.h"
+
#ifdef INTERNAL_PLUGIN_NFACCT
#include <libmnl/libmnl.h>
#include <libnetfilter_acct/libnetfilter_acct.h>
-#include "common.h"
-
struct mynfacct {
const char *name;
uint64_t pkts;
// --------------------------------------------------------------------
gettimeofday(&now, NULL);
- usec = usecdiff(&now, &last) - susec;
+ usec = usec_dt(&now, &last) - susec;
debug(D_NFACCT_LOOP, "nfacct.plugin: last loop took %llu usec (worked for %llu, sleeped for %llu).", usec + susec, usec, susec);
if(usec < (rrd_update_every * 1000000ULL / 2ULL)) susec = (rrd_update_every * 1000000ULL) - usec;
}
else {
// second+ run
- usec = usecdiff(&now, &last) - susec;
+ usec = usec_dt(&now, &last) - susec;
error("PLUGINSD: %s last loop took %llu usec (worked for %llu, sleeped for %llu).\n", cd->fullfilename, usec + susec, usec, susec);
if(unlikely(usec < (rrd_update_every * 1000000ULL / 2ULL))) susec = (rrd_update_every * 1000000ULL) - usec;
else susec = rrd_update_every * 1000000ULL / 2ULL;
uint32_t hash;
char *chart_id;
+ uint32_t hash_chart;
+
char *chart_title;
struct cpuacct_stat cpuacct_stat;
freez(cg->chart_id);
cg->chart_id = strdupz(s);
-
netdata_fix_chart_id(cg->chart_id);
+ cg->hash_chart = simple_hash(cg->chart_id);
debug(D_CGROUP, "cgroup '%s' renamed to '%s' (title: '%s')", cg->id, cg->chart_id, cg->chart_title);
}
struct cgroup *cg = callocz(1, sizeof(struct cgroup));
- debug(D_CGROUP, "adding cgroup '%s'", id);
-
cg->id = strdupz(id);
cg->hash = simple_hash(cg->id);
cg->chart_id = strdupz(chart_id);
+ netdata_fix_chart_id(cg->chart_id);
+ cg->hash_chart = simple_hash(cg->chart_id);
+
cg->chart_title = strdupz(chart_id);
if(!cgroup_root)
// fix the name by calling the external script
cgroup_get_chart_id(cg);
+ debug(D_CGROUP, "adding cgroup '%s' with chart id '%s'", id, chart_id);
+
char option[FILENAME_MAX + 1];
snprintfz(option, FILENAME_MAX, "enable cgroup %s", cg->chart_title);
cg->enabled = config_get_boolean("plugin:cgroups", option, def);
+ if(cg->enabled) {
+ struct cgroup *t;
+ for (t = cgroup_root; t; t = t->next) {
+ if (t != cg && t->enabled && t->hash_chart == cg->hash_chart && !strcmp(t->chart_id, cg->chart_id)) {
+ if (!strncmp(t->chart_id, "/system.slice/", 14) && !strncmp(cg->chart_id, "/init.scope/system.slice/", 25)) {
+ error("Control group with chart id '%s' already exists with id '%s' and is enabled. Swapping them by enabling cgroup with id '%s' and disabling cgroup with id '%s'.",
+ cg->chart_id, t->id, cg->id, t->id);
+ t->enabled = 0;
+ } else {
+ error("Control group with chart id '%s' already exists with id '%s' and is enabled. Disabling cgroup with id '%s'.",
+ cg->chart_id, t->id, cg->id);
+ cg->enabled = 0;
+ }
+
+ break;
+ }
+ }
+ }
+
debug(D_CGROUP, "Added cgroup '%s' with chart id '%s' and title '%s' as %s (default was %s)", cg->id, cg->chart_id, cg->chart_title, (cg->enabled)?"enabled":"disabled", (def)?"enabled":"disabled");
return cg;