-
Notifications
You must be signed in to change notification settings - Fork 0
/
exporter.go
60 lines (52 loc) · 1.37 KB
/
exporter.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package web
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
const (
namespace = "spacetraderinventory"
)
var (
Credits = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: namespace,
Name: "credits",
Help: "How much credits user has",
},
[]string{"username"})
GameStatus = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: namespace,
Name: "game_status",
Help: "Indicates if the game is up, running and available",
},
[]string{"username"})
ShipCount = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: namespace,
Name: "shipcount",
Help: "Total of ships user has",
},
[]string{"username"})
StructureCount = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: namespace,
Name: "structurecount",
Help: "Total of structure user has",
},
[]string{"username"})
ShipLoad = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: namespace,
Name: "shipload",
Help: "Unused space in ship cargo",
},
[]string{"username", "id", "class", "manufacturer", "type", "maxcargo", "plating", "speed", "weapons"})
UserRank = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: namespace,
Name: "userrank",
Help: "User rank in leaderboard",
},
[]string{"username"})
)