src/daemon/graphs/hostapd-station-rate-info.h \
src/daemon/graphs/hostapd-station-signal.c \
src/daemon/graphs/hostapd-station-signal.h \
+ src/daemon/graphs/interface-throughput.c \
+ src/daemon/graphs/interface-throughput.h \
src/daemon/graphs/legacy-gateway-latency4.c \
src/daemon/graphs/legacy-gateway-latency4.h \
src/daemon/graphs/legacy-suricata.c \
#include "graphs/hostapd-station-bandwidth.h"
#include "graphs/hostapd-station-rate-info.h"
#include "graphs/hostapd-station-signal.h"
+#include "graphs/interface-throughput.h"
#include "graphs/loadavg.h"
#include "graphs/memory.h"
#include "graphs/pressure.h"
&disk_io_graph,
&disk_temp_graph,
+ // Interfaces
+ &interface_throughput_graph,
+
// Pressure (PSI)
&pressure_cpu_graph,
&pressure_io_graph,
--- /dev/null
+/*#############################################################################
+# #
+# telemetryd - The IPFire Telemetry Collection Service #
+# Copyright (C) 2025 IPFire Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#include <limits.h>
+
+#include "../string.h"
+#include "graph.h"
+#include "interface-throughput.h"
+
+static int interface_throughput_title(td_ctx* ctx, td_graph* graph,
+ const char* object, char* title, size_t length) {
+ return __td_string_format(title, length, _("Throughput - %s"), object);
+}
+
+static int interface_throughput_render(td_ctx* ctx,td_graph* graph,
+ const td_graph_render_options* options, td_args* args, const char* object) {
+ int r;
+
+ // Require the source
+ r = td_graph_require_source(graph, args, "interfaces", object);
+ if (r < 0)
+ return r;
+
+ // Header
+ PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum"));
+
+ // Draw the bandwidth graph
+ DRAW_BANDWIDTH(args, object, "rx_bytes", "tx_bytes");
+
+ return 0;
+}
+
+const td_graph_impl interface_throughput_graph = {
+ .name = "InterfaceThroughput",
+ .render = interface_throughput_render,
+ .title = interface_throughput_title,
+ .vlabel = td_graph_vlabel_bps,
+
+ // Limits
+ .lower_limit = 0,
+ .upper_limit = LONG_MAX,
+};
--- /dev/null
+/*#############################################################################
+# #
+# telemetryd - The IPFire Telemetry Collection Service #
+# Copyright (C) 2025 IPFire Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#ifndef TELEMETRY_GRAPH_INTERFACE_THROUGHPUT_H
+#define TELEMETRY_GRAPH_INTERFACE_THROUGHPUT_H
+
+#include "../graph.h"
+
+extern const td_graph_impl interface_throughput_graph;
+
+#endif /* TELEMETRY_GRAPH_INTERFACE_THROUGHPUT_H */