Skip to content

Commit

Permalink
Prefixed Prometheus metrics with service name
Browse files Browse the repository at this point in the history
  • Loading branch information
boivie-at-sony committed Sep 22, 2017
1 parent fccb446 commit 2fd3e14
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,74 +8,74 @@ var (
// HTTPResponseCtr allows the counting of Http Responses and their status codes
HTTPResponseCtr = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "http_resp_total",
Name: "undergang_http_response_total",
Help: "Number of http responses",
},
[]string{"code"},
)
// BackendActive allows the counting of active (registered) backends
BackendActive = prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "backend_active_total",
Name: "undergang_backend_active_total",
Help: "Number of active backends",
},
)
// BackendsRegistered allows the counting of backends that have been registered
BackendsRegistered = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "backend_registered_total",
Name: "undergang_backend_registered_total",
Help: "Number of backends that have been registered",
},
)
// BackendsStarted allows the counting of backends that have been started
BackendsStarted = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "backend_started_total",
Name: "undergang_backend_started_total",
Help: "Number of backends that have been started",
},
)
// BackendsUnregistered allows the counting of backends that have been unregistered
BackendsUnregistered = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "backend_unregistered_total",
Name: "undergang_backend_unregistered_total",
Help: "Number of backends that have been unregistered",
},
)
// BackendFailure allows the counting of backends and the corresponding failure reason
BackendFailure = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "backend_failure_total",
Name: "undergang_backend_failure_total",
Help: "Number of backends that have failed",
},
[]string{"reason"},
)
// BackendReconnectSSH allows the counting of backends that have reconnected to the SSH server
BackendReconnectSSH = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "backend_reconnect_ssh_total",
Name: "undergang_backend_reconnect_ssh_total",
Help: "Number of backends that have reconnected to SSH",
},
)
// BackendProvisioningDuration allows the histogram of provisioning durations
BackendProvisioningDuration = prometheus.NewHistogram(
prometheus.HistogramOpts{
Name: "backend_provisioning_seconds",
Name: "undergang_backend_provisioning_seconds",
Help: "Provisioning duration for backends",
Buckets: []float64{1, 5, 10, 30, 1 * 60, 2 * 60, 3 * 60, 4 * 60, 5 * 60, 10 * 60, 20 * 60},
},
)
// BackendConnectSSHDuration allows the histogram of provisioning durations
BackendConnectSSHDuration = prometheus.NewHistogram(
prometheus.HistogramOpts{
Name: "backend_connect_ssh_seconds",
Name: "undergang_backend_connect_ssh_seconds",
Help: "SSH connection duration for backends",
Buckets: []float64{1, 5, 10, 30, 1 * 60, 2 * 60, 3 * 60, 4 * 60, 5 * 60},
},
)
// BackendBootstrapDuration allows the histogram of provisioning durations
BackendBootstrapDuration = prometheus.NewHistogram(
prometheus.HistogramOpts{
Name: "backend_bootstrap_seconds",
Name: "undergang_backend_bootstrap_seconds",
Help: "SSH bootstrap duration for backends",
Buckets: []float64{1, 5, 10, 30, 1 * 60, 2 * 60, 3 * 60, 4 * 60, 5 * 60, 10 * 60, 20 * 60},
},
Expand Down

0 comments on commit 2fd3e14

Please sign in to comment.