-
Notifications
You must be signed in to change notification settings - Fork 0
/
metrics.go
40 lines (33 loc) · 1.09 KB
/
metrics.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
package main
import "github.com/prometheus/client_golang/prometheus"
const (
namespace = "telegram"
subsystem = "bot_api"
)
var (
metricaUp = prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, "up"),
"true, if api is up",
[]string{"bot"}, nil,
)
metricaPendingUpdates = prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, "pending_updates"),
"number of updates awaiting delivery",
[]string{"bot"}, nil,
)
metricaMaxConns = prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, "max_conns"),
"Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery",
[]string{"bot"}, nil,
)
metricaLastDeliveryError = prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, "last_delivery_error"),
"time and message for the most recent error that happened when trying to deliver an update via webhook",
[]string{"bot", "msg"}, nil,
)
metricaResponseTime = prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, "response_time"),
"gauge of bot api response time",
[]string{"bot"}, nil,
)
)