diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:18 +0000 |
commit | 5da14042f70711ea5cf66e034699730335462f66 (patch) | |
tree | 0f6354ccac934ed87a2d555f45be4c831cf92f4a /src/go/collectors/go.d.plugin/modules/openvpn/charts.go | |
parent | Releasing debian version 1.44.3-2. (diff) | |
download | netdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz netdata-5da14042f70711ea5cf66e034699730335462f66.zip |
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/go/collectors/go.d.plugin/modules/openvpn/charts.go | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/openvpn/charts.go b/src/go/collectors/go.d.plugin/modules/openvpn/charts.go new file mode 100644 index 000000000..435c2151a --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/openvpn/charts.go @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package openvpn + +import "github.com/netdata/netdata/go/go.d.plugin/agent/module" + +type ( + // Charts is an alias for module.Charts + Charts = module.Charts + // Dims is an alias for module.Dims + Dims = module.Dims +) + +var charts = Charts{ + { + ID: "active_clients", + Title: "Total Number Of Active Clients", + Units: "clients", + Fam: "clients", + Ctx: "openvpn.active_clients", + Dims: Dims{ + {ID: "clients"}, + }, + }, + { + ID: "total_traffic", + Title: "Total Traffic", + Units: "kilobits/s", + Fam: "traffic", + Ctx: "openvpn.total_traffic", + Type: module.Area, + Dims: Dims{ + {ID: "bytes_in", Name: "in", Algo: module.Incremental, Mul: 8, Div: 1000}, + {ID: "bytes_out", Name: "out", Algo: module.Incremental, Mul: 8, Div: -1000}, + }, + }, +} + +var userCharts = Charts{ + { + ID: "%s_user_traffic", + Title: "User Traffic", + Units: "kilobits/s", + Fam: "user %s", + Ctx: "openvpn.user_traffic", + Type: module.Area, + Dims: Dims{ + {ID: "%s_bytes_received", Name: "received", Algo: module.Incremental, Mul: 8, Div: 1000}, + {ID: "%s_bytes_sent", Name: "sent", Algo: module.Incremental, Mul: 8, Div: -1000}, + }, + }, + { + ID: "%s_user_connection_time", + Title: "User Connection Time", + Units: "seconds", + Fam: "user %s", + Ctx: "openvpn.user_connection_time", + Dims: Dims{ + {ID: "%s_connection_time", Name: "time"}, + }, + }, +} |