#include "graphs/knot-resolver.h"
#include "graphs/loadavg.h"
#include "graphs/memory.h"
+#include "graphs/openvpn.h"
#include "graphs/pressure.h"
#include "graphs/processor.h"
#include "graphs/processor-power-consumption.h"
&interface_throughput_graph,
&interface_packets_graph,
+ // OpenVPN
+ &openvpn_client_throughput_graph,
+
// Pressure (PSI)
&pressure_cpu_graph,
&pressure_io_graph,
--- /dev/null
+/*#############################################################################
+# #
+# telemetryd - The IPFire Telemetry Collection Service #
+# Copyright (C) 2026 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 "../openvpn.h"
+#include "../string.h"
+#include "graph.h"
+#include "openvpn.h"
+
+static int openvpn_client_can_render(td_ctx* ctx, td_graph* graph,
+ const td_graph_render_options* options, const char* object) {
+ char name[OPENVPN_NAME_MAX];
+ int r;
+
+ // Escape the name
+ r = openvpn_escape_name(name, object);
+ if (r < 0)
+ return r;
+
+ return td_graph_requires_source(graph, "openvpn", name);
+}
+
+static int openvpn_client_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 openvpn_client_throughput_render(td_ctx* ctx,td_graph* graph,
+ const td_graph_render_options* options, td_args* args, const char* object) {
+ char name[OPENVPN_NAME_MAX];
+ int r;
+
+ // Escape the name
+ r = openvpn_escape_name(name, object);
+ if (r < 0)
+ return r;
+
+ // Require the source
+ r = td_graph_load_source(graph, args, "openvpn", name);
+ if (r < 0)
+ return r;
+
+ // Header
+ PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum"));
+
+ // Draw the bandwidth graph
+ DRAW_BANDWIDTH(args, name, "rx_bytes", "tx_bytes");
+
+ return 0;
+}
+
+const td_graph_impl openvpn_client_throughput_graph = {
+ .name = "OpenVPNClientThroughput",
+ .can_render = openvpn_client_can_render,
+ .render = openvpn_client_throughput_render,
+ .title = openvpn_client_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) 2026 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_OPENVPN_H
+#define TELEMETRY_GRAPH_OPENVPN_H
+
+#include "../graph.h"
+
+extern const td_graph_impl openvpn_client_throughput_graph;
+
+#endif /* TELEMETRY_GRAPH_OPENVPN_H */