summaryrefslogtreecommitdiffstats
path: root/collectors/proc.plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:10 +0000
commitb5321aff06d6ea8d730d62aec2ffd8e9271c1ffc (patch)
tree36c41e35994786456154f9d3bf88c324763aeea4 /collectors/proc.plugin
parentAdding upstream version 1.33.1. (diff)
downloadnetdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.tar.xz
netdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.zip
Adding upstream version 1.34.0.upstream/1.34.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/proc.plugin')
-rw-r--r--collectors/proc.plugin/README.md2
-rw-r--r--collectors/proc.plugin/proc_interrupts.c2
-rw-r--r--collectors/proc.plugin/proc_net_dev.c87
-rw-r--r--collectors/proc.plugin/proc_net_softnet_stat.c2
-rw-r--r--collectors/proc.plugin/proc_softirqs.c2
-rw-r--r--collectors/proc.plugin/sys_fs_btrfs.c8
6 files changed, 72 insertions, 31 deletions
diff --git a/collectors/proc.plugin/README.md b/collectors/proc.plugin/README.md
index a9ce2dfa5..32e2112af 100644
--- a/collectors/proc.plugin/README.md
+++ b/collectors/proc.plugin/README.md
@@ -604,4 +604,4 @@ As far as the message queue charts are dynamic, sane limits are applied for the
# max dimensions in memory allowed = 50
```
-[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Fproc.plugin%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)
+
diff --git a/collectors/proc.plugin/proc_interrupts.c b/collectors/proc.plugin/proc_interrupts.c
index 2db980a03..78883c475 100644
--- a/collectors/proc.plugin/proc_interrupts.c
+++ b/collectors/proc.plugin/proc_interrupts.c
@@ -210,7 +210,7 @@ int do_proc_interrupts(int update_every, usec_t dt) {
snprintfz(id, 50, "cpu%d_interrupts", c);
char title[100+1];
- snprintfz(title, 100, "CPU%d Interrupts", c);
+ snprintfz(title, 100, "CPU Interrupts");
core_st[c] = rrdset_create_localhost(
"cpu"
, id
diff --git a/collectors/proc.plugin/proc_net_dev.c b/collectors/proc.plugin/proc_net_dev.c
index e06da69aa..2d1ae93ae 100644
--- a/collectors/proc.plugin/proc_net_dev.c
+++ b/collectors/proc.plugin/proc_net_dev.c
@@ -75,6 +75,19 @@ static struct netdev {
const char *chart_id_net_carrier;
const char *chart_id_net_mtu;
+ const char *chart_ctx_net_bytes;
+ const char *chart_ctx_net_packets;
+ const char *chart_ctx_net_errors;
+ const char *chart_ctx_net_fifo;
+ const char *chart_ctx_net_events;
+ const char *chart_ctx_net_drops;
+ const char *chart_ctx_net_compressed;
+ const char *chart_ctx_net_speed;
+ const char *chart_ctx_net_duplex;
+ const char *chart_ctx_net_operstate;
+ const char *chart_ctx_net_carrier;
+ const char *chart_ctx_net_mtu;
+
const char *chart_family;
struct label *chart_labels;
@@ -241,6 +254,19 @@ static void netdev_free_chart_strings(struct netdev *d) {
freez((void *)d->chart_id_net_carrier);
freez((void *)d->chart_id_net_mtu);
+ freez((void *)d->chart_ctx_net_bytes);
+ freez((void *)d->chart_ctx_net_compressed);
+ freez((void *)d->chart_ctx_net_drops);
+ freez((void *)d->chart_ctx_net_errors);
+ freez((void *)d->chart_ctx_net_events);
+ freez((void *)d->chart_ctx_net_fifo);
+ freez((void *)d->chart_ctx_net_packets);
+ freez((void *)d->chart_ctx_net_speed);
+ freez((void *)d->chart_ctx_net_duplex);
+ freez((void *)d->chart_ctx_net_operstate);
+ freez((void *)d->chart_ctx_net_carrier);
+ freez((void *)d->chart_ctx_net_mtu);
+
freez((void *)d->chart_family);
}
@@ -384,40 +410,42 @@ static inline void netdev_rename_cgroup(struct netdev *d, struct netdev_rename *
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_%s", r->container_device);
d->chart_id_net_bytes = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_compressed_%s", r->container_device);
d->chart_id_net_compressed = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_drops_%s", r->container_device);
d->chart_id_net_drops = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_errors_%s", r->container_device);
d->chart_id_net_errors = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_events_%s", r->container_device);
d->chart_id_net_events = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_fifo_%s", r->container_device);
d->chart_id_net_fifo = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_packets_%s", r->container_device);
d->chart_id_net_packets = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_speed_%s", r->container_device);
d->chart_id_net_speed = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_duplex_%s", r->container_device);
d->chart_id_net_duplex = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_operstate_%s", r->container_device);
d->chart_id_net_operstate = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_carrier_%s", r->container_device);
d->chart_id_net_carrier = strdupz(buffer);
-
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net_mtu_%s", r->container_device);
d->chart_id_net_mtu = strdupz(buffer);
+ d->chart_ctx_net_bytes = strdupz("cgroup.net_net");
+ d->chart_ctx_net_compressed = strdupz("cgroup.net_compressed");
+ d->chart_ctx_net_drops = strdupz("cgroup.net_drops");
+ d->chart_ctx_net_errors = strdupz("cgroup.net_errors");
+ d->chart_ctx_net_events = strdupz("cgroup.net_events");
+ d->chart_ctx_net_fifo = strdupz("cgroup.net_fifo");
+ d->chart_ctx_net_packets = strdupz("cgroup.net_packets");
+ d->chart_ctx_net_speed = strdupz("cgroup.net_speed");
+ d->chart_ctx_net_duplex = strdupz("cgroup.net_duplex");
+ d->chart_ctx_net_operstate = strdupz("cgroup.net_operstate");
+ d->chart_ctx_net_carrier = strdupz("cgroup.net_carrier");
+ d->chart_ctx_net_mtu = strdupz("cgroup.net_mtu");
+
snprintfz(buffer, RRD_ID_LENGTH_MAX, "net %s", r->container_device);
d->chart_family = strdupz(buffer);
@@ -541,6 +569,19 @@ static struct netdev *get_netdev(const char *name) {
d->chart_id_net_carrier = strdupz(d->name);
d->chart_id_net_mtu = strdupz(d->name);
+ d->chart_ctx_net_bytes = strdupz("net.net");
+ d->chart_ctx_net_compressed = strdupz("net.compressed");
+ d->chart_ctx_net_drops = strdupz("net.drops");
+ d->chart_ctx_net_errors = strdupz("net.errors");
+ d->chart_ctx_net_events = strdupz("net.events");
+ d->chart_ctx_net_fifo = strdupz("net.fifo");
+ d->chart_ctx_net_packets = strdupz("net.packets");
+ d->chart_ctx_net_speed = strdupz("net.speed");
+ d->chart_ctx_net_duplex = strdupz("net.duplex");
+ d->chart_ctx_net_operstate = strdupz("net.operstate");
+ d->chart_ctx_net_carrier = strdupz("net.carrier");
+ d->chart_ctx_net_mtu = strdupz("net.mtu");
+
d->chart_family = strdupz(d->name);
d->priority = NETDATA_CHART_PRIO_FIRST_NET_IFACE;
@@ -825,7 +866,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_bytes
, NULL
, d->chart_family
- , "net.net"
+ , d->chart_ctx_net_bytes
, "Bandwidth"
, "kilobits/s"
, PLUGIN_PROC_NAME
@@ -881,7 +922,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_speed
, NULL
, d->chart_family
- , "net.speed"
+ , d->chart_ctx_net_speed
, "Interface Speed"
, "kilobits/s"
, PLUGIN_PROC_NAME
@@ -916,7 +957,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_duplex
, NULL
, d->chart_family
- , "net.duplex"
+ , d->chart_ctx_net_duplex
, "Interface Duplex State"
, "state"
, PLUGIN_PROC_NAME
@@ -947,7 +988,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_operstate
, NULL
, d->chart_family
- , "net.operstate"
+ , d->chart_ctx_net_operstate
, "Interface Operational State"
, "state"
, PLUGIN_PROC_NAME
@@ -978,7 +1019,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_carrier
, NULL
, d->chart_family
- , "net.carrier"
+ , d->chart_ctx_net_carrier
, "Interface Physical Link State"
, "state"
, PLUGIN_PROC_NAME
@@ -1009,7 +1050,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_mtu
, NULL
, d->chart_family
- , "net.mtu"
+ , d->chart_ctx_net_mtu
, "Interface MTU"
, "octets"
, PLUGIN_PROC_NAME
@@ -1045,7 +1086,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_packets
, NULL
, d->chart_family
- , "net.packets"
+ , d->chart_ctx_net_packets
, "Packets"
, "packets/s"
, PLUGIN_PROC_NAME
@@ -1093,7 +1134,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_errors
, NULL
, d->chart_family
- , "net.errors"
+ , d->chart_ctx_net_errors
, "Interface Errors"
, "errors/s"
, PLUGIN_PROC_NAME
@@ -1139,7 +1180,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_drops
, NULL
, d->chart_family
- , "net.drops"
+ , d->chart_ctx_net_drops
, "Interface Drops"
, "drops/s"
, PLUGIN_PROC_NAME
@@ -1185,7 +1226,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_fifo
, NULL
, d->chart_family
- , "net.fifo"
+ , d->chart_ctx_net_fifo
, "Interface FIFO Buffer Errors"
, "errors"
, PLUGIN_PROC_NAME
@@ -1231,7 +1272,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_compressed
, NULL
, d->chart_family
- , "net.compressed"
+ , d->chart_ctx_net_compressed
, "Compressed Packets"
, "packets/s"
, PLUGIN_PROC_NAME
@@ -1277,7 +1318,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
, d->chart_id_net_events
, NULL
, d->chart_family
- , "net.events"
+ , d->chart_ctx_net_events
, "Network Interface Events"
, "events/s"
, PLUGIN_PROC_NAME
diff --git a/collectors/proc.plugin/proc_net_softnet_stat.c b/collectors/proc.plugin/proc_net_softnet_stat.c
index a29ccccd1..1f704a427 100644
--- a/collectors/proc.plugin/proc_net_softnet_stat.c
+++ b/collectors/proc.plugin/proc_net_softnet_stat.c
@@ -117,7 +117,7 @@ int do_proc_net_softnet_stat(int update_every, usec_t dt) {
st = rrdset_find_active_bytype_localhost("cpu", id);
if(unlikely(!st)) {
char title[100+1];
- snprintfz(title, 100, "CPU%zu softnet_stat", l);
+ snprintfz(title, 100, "CPU softnet_stat");
st = rrdset_create_localhost(
"cpu"
diff --git a/collectors/proc.plugin/proc_softirqs.c b/collectors/proc.plugin/proc_softirqs.c
index d68c69bb7..bb14c1596 100644
--- a/collectors/proc.plugin/proc_softirqs.c
+++ b/collectors/proc.plugin/proc_softirqs.c
@@ -201,7 +201,7 @@ int do_proc_softirqs(int update_every, usec_t dt) {
snprintfz(id, 50, "cpu%d_softirqs", c);
char title[100 + 1];
- snprintfz(title, 100, "CPU%d softirqs", c);
+ snprintfz(title, 100, "CPU softirqs");
core_st[c] = rrdset_create_localhost(
"cpu"
diff --git a/collectors/proc.plugin/sys_fs_btrfs.c b/collectors/proc.plugin/sys_fs_btrfs.c
index 4e58a1a4c..e28b60a7a 100644
--- a/collectors/proc.plugin/sys_fs_btrfs.c
+++ b/collectors/proc.plugin/sys_fs_btrfs.c
@@ -552,7 +552,7 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
snprintf(id, RRD_ID_LENGTH_MAX, "disk_%s", node->id);
snprintf(name, RRD_ID_LENGTH_MAX, "disk_%s", node->label);
- snprintf(title, 200, "BTRFS Physical Disk Allocation for %s", node->label);
+ snprintf(title, 200, "BTRFS Physical Disk Allocation");
netdata_fix_chart_id(id);
netdata_fix_chart_name(name);
@@ -610,7 +610,7 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
snprintf(id, RRD_ID_LENGTH_MAX, "data_%s", node->id);
snprintf(name, RRD_ID_LENGTH_MAX, "data_%s", node->label);
- snprintf(title, 200, "BTRFS Data Allocation for %s", node->label);
+ snprintf(title, 200, "BTRFS Data Allocation");
netdata_fix_chart_id(id);
netdata_fix_chart_name(name);
@@ -653,7 +653,7 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
snprintf(id, RRD_ID_LENGTH_MAX, "metadata_%s", node->id);
snprintf(name, RRD_ID_LENGTH_MAX, "metadata_%s", node->label);
- snprintf(title, 200, "BTRFS Metadata Allocation for %s", node->label);
+ snprintf(title, 200, "BTRFS Metadata Allocation");
netdata_fix_chart_id(id);
netdata_fix_chart_name(name);
@@ -698,7 +698,7 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
snprintf(id, RRD_ID_LENGTH_MAX, "system_%s", node->id);
snprintf(name, RRD_ID_LENGTH_MAX, "system_%s", node->label);
- snprintf(title, 200, "BTRFS System Allocation for %s", node->label);
+ snprintf(title, 200, "BTRFS System Allocation");
netdata_fix_chart_id(id);
netdata_fix_chart_name(name);