feat: build wahrwelt A/D toolkit
This commit is contained in:
1 parent
303438d206
commit
653924d8c6
564 files changed
+36310
-49998
No files matched your search
@@ -0,0 +1,51 @@
|
||||
package exploit
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
)
|
||||
|
||||
type Metrics struct {
|
||||
FlagsSubmitted *prometheus.CounterVec
|
||||
Teams prometheus.Gauge
|
||||
Queue *prometheus.GaugeVec
|
||||
}
|
||||
|
||||
func NewMetrics(namespace string) *Metrics {
|
||||
const subsystem = "exploit_runner"
|
||||
|
||||
return &Metrics{
|
||||
FlagsSubmitted: promauto.NewCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: subsystem,
|
||||
Name: "flags_submitted_total",
|
||||
Help: "Number of exploits finished",
|
||||
},
|
||||
[]string{
|
||||
"target_id",
|
||||
"target_ip",
|
||||
"exploit_id",
|
||||
"exploit_version",
|
||||
"exploit_type",
|
||||
},
|
||||
),
|
||||
|
||||
Teams: promauto.NewGauge(prometheus.GaugeOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: subsystem,
|
||||
Name: "teams",
|
||||
Help: "Number of teams scheduled for the current runner",
|
||||
}),
|
||||
|
||||
Queue: promauto.NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: subsystem,
|
||||
Name: "queue",
|
||||
Help: "Number of exploits in the queue",
|
||||
},
|
||||
[]string{"type"},
|
||||
),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user