@cryptotaxi247 / netdata-1 / commits / fdbee44a0

chore(go.d/vernemq): remove unused file (#18835)

Ilya Mashchenko committed Oct 21, 2024 at 13:41 UTC fdbee44a0b55adc9dd87f1b3f082b52393755c2d
2 files changed +11 -134
src/go/plugin/go.d/modules/vernemq/collect.go
+11 -11
@@ -78,17 +78,6 @@ func (v *VerneMQ) getNodesStats(mfs prometheus.MetricFamilies) map[string]*nodeS
78 }
79
80 for _, m := range mf.Metrics() {
81 - node := m.Labels().Get("node")
82 - if node == "" {
83 - continue
84 - }
85 -
86 - if _, ok := nodes[node]; !ok {
87 - nodes[node] = newNodeStats()
88 - }
89 -
90 - nst := nodes[node]
91 -
81 var value float64
82
83 switch mf.Type() {
@@ -100,6 +89,17 @@ func (v *VerneMQ) getNodesStats(mfs prometheus.MetricFamilies) map[string]*nodeS
89 continue
90 }
91
92 + node := m.Labels().Get("node")
93 + if node == "" {
94 + continue
95 + }
96 +
97 + if _, ok := nodes[node]; !ok {
98 + nodes[node] = newNodeStats()
99 + }
100 +
101 + nst := nodes[node]
102 +
103 if len(m.Labels()) == 1 {
104 nst.stats[name] += int64(value)
105 continue
src/go/plugin/go.d/modules/vernemq/node_stats.go deleted
-123
@@ -1,123 +0,0 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -package vernemq
4 -
5 -//type (
6 -// vernemqNode struct {
7 -// name string
8 -//
9 -// ns nodeStats
10 -// m4 *mqtt4Stats
11 -// m5 *mqtt5Stats
12 -// }
13 -// nodeStats struct {
14 -// sockets struct {
15 -// open int64
16 -// closed int64
17 -// error int64
18 -// closeTimeout int64
19 -// }
20 -// queue struct {
21 -// processes int64
22 -// setup int64
23 -// teardown int64
24 -// message struct {
25 -// in int64
26 -// out int64
27 -// drop int64
28 -// expired int64
29 -// unhandled int64
30 -// }
31 -// initFromStorage int64
32 -// }
33 -// router struct {
34 -// matchesLocal int64
35 -// matchesRemote int64
36 -// memory int64
37 -// subscriptions int64
38 -// }
39 -// erlangVm struct {
40 -// system struct {
41 -// utilization int64
42 -// processCount int64
43 -// reductions int64
44 -// contextSwitches int64
45 -// io struct {
46 -// in int64
47 -// out int64
48 -// }
49 -// runQueue int64
50 -// gcCount int64
51 -// wordsReclaimedByGC int64
52 -// }
53 -// vm struct {
54 -// memoryProcesses int64
55 -// memorySystem int64
56 -// }
57 -// }
58 -// bandwidth struct {
59 -// receivedBytes int64
60 -// sentBytes int64
61 -// }
62 -// retain struct {
63 -// memory int64
64 -// messages int64
65 -// }
66 -// cluster struct {
67 -// bytes struct {
68 -// received int64
69 -// sent int64
70 -// dropped int64
71 -// }
72 -// netsplit struct {
73 -// detected int64
74 -// resolved int64
75 -// }
76 -// }
77 -// wallclock int64
78 -// }
79 -//
80 -// mqtt5Stats struct {
81 -// mqttCommonStats
82 -// }
83 -// mqtt4Stats struct {
84 -// mqttCommonStats
85 -// }
86 -// mqttCommonStats struct {
87 -// connect struct {
88 -// received int64
89 -// sent int64
90 -// }
91 -// subscribe struct {
92 -// received int64
93 -// sent int64
94 -// error int64
95 -// authError int64
96 -// }
97 -// unsubscribe struct {
98 -// received int64
99 -// sent int64
100 -// error int64
101 -// }
102 -// publish struct {
103 -// received int64
104 -// sent int64
105 -// error int64
106 -// authError int64
107 -// }
108 -// puback struct {
109 -// received int64
110 -// sent int64
111 -// invalid int64
112 -// }
113 -// pubrec struct {
114 -// received int64
115 -// sent int64
116 -// //invalidError int64
117 -// }
118 -// pubrel struct {
119 -// received int64
120 -// sent int64
121 -// }
122 -// }
123 -//)