Initial commit
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
const client = require("prom-client");
|
||||
|
||||
const collectDefaultMetrics = client.collectDefaultMetrics;
|
||||
collectDefaultMetrics();
|
||||
|
||||
const onlinePlayers = new client.Gauge({
|
||||
name: "game_online_players",
|
||||
help: "Number of currently online players",
|
||||
collect() {
|
||||
this.set(Math.floor(Math.random() * 1000));
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
register: client.register,
|
||||
onlinePlayers
|
||||
};
|
||||
Reference in New Issue
Block a user