Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
09eb9a45
Unverified
Commit
09eb9a45
authored
Jul 15, 2019
by
Oleg Gaidarenko
Committed by
GitHub
Jul 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Metrics: add LDAP active sync summary metric (#18079)
parent
7213e1f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
pkg/api/http_server.go
+2
-1
pkg/infra/metrics/metrics.go
+13
-1
No files found.
pkg/api/http_server.go
View file @
09eb9a45
...
@@ -269,7 +269,8 @@ func (hs *HTTPServer) metricsEndpoint(ctx *macaron.Context) {
...
@@ -269,7 +269,8 @@ func (hs *HTTPServer) metricsEndpoint(ctx *macaron.Context) {
return
return
}
}
promhttp
.
HandlerFor
(
prometheus
.
DefaultGatherer
,
promhttp
.
HandlerOpts
{})
.
promhttp
.
HandlerFor
(
prometheus
.
DefaultGatherer
,
promhttp
.
HandlerOpts
{})
.
ServeHTTP
(
ctx
.
Resp
,
ctx
.
Req
.
Request
)
ServeHTTP
(
ctx
.
Resp
,
ctx
.
Req
.
Request
)
}
}
...
...
pkg/infra/metrics/metrics.go
View file @
09eb9a45
...
@@ -40,6 +40,10 @@ var (
...
@@ -40,6 +40,10 @@ var (
M_Aws_CloudWatch_GetMetricData
prometheus
.
Counter
M_Aws_CloudWatch_GetMetricData
prometheus
.
Counter
M_DB_DataSource_QueryById
prometheus
.
Counter
M_DB_DataSource_QueryById
prometheus
.
Counter
// LDAPUsersSyncExecutionTime is a metric for
// how much time it took to sync the LDAP users
LDAPUsersSyncExecutionTime
prometheus
.
Summary
// Timers
// Timers
M_DataSource_ProxyReq_Timer
prometheus
.
Summary
M_DataSource_ProxyReq_Timer
prometheus
.
Summary
M_Alerting_Execution_Time
prometheus
.
Summary
M_Alerting_Execution_Time
prometheus
.
Summary
...
@@ -235,6 +239,12 @@ func init() {
...
@@ -235,6 +239,12 @@ func init() {
Namespace
:
exporterName
,
Namespace
:
exporterName
,
})
})
LDAPUsersSyncExecutionTime
=
prometheus
.
NewSummary
(
prometheus
.
SummaryOpts
{
Name
:
"ldap_users_sync_execution_time"
,
Help
:
"summary for LDAP users sync execution duration"
,
Namespace
:
exporterName
,
})
M_DataSource_ProxyReq_Timer
=
prometheus
.
NewSummary
(
prometheus
.
SummaryOpts
{
M_DataSource_ProxyReq_Timer
=
prometheus
.
NewSummary
(
prometheus
.
SummaryOpts
{
Name
:
"api_dataproxy_request_all_milliseconds"
,
Name
:
"api_dataproxy_request_all_milliseconds"
,
Help
:
"summary for dataproxy request duration"
,
Help
:
"summary for dataproxy request duration"
,
...
@@ -377,6 +387,7 @@ func initMetricVars() {
...
@@ -377,6 +387,7 @@ func initMetricVars() {
M_Aws_CloudWatch_ListMetrics
,
M_Aws_CloudWatch_ListMetrics
,
M_Aws_CloudWatch_GetMetricData
,
M_Aws_CloudWatch_GetMetricData
,
M_DB_DataSource_QueryById
,
M_DB_DataSource_QueryById
,
LDAPUsersSyncExecutionTime
,
M_Alerting_Active_Alerts
,
M_Alerting_Active_Alerts
,
M_StatTotal_Dashboards
,
M_StatTotal_Dashboards
,
M_StatTotal_Users
,
M_StatTotal_Users
,
...
@@ -390,7 +401,8 @@ func initMetricVars() {
...
@@ -390,7 +401,8 @@ func initMetricVars() {
StatsTotalActiveViewers
,
StatsTotalActiveViewers
,
StatsTotalActiveEditors
,
StatsTotalActiveEditors
,
StatsTotalActiveAdmins
,
StatsTotalActiveAdmins
,
grafanaBuildVersion
)
grafanaBuildVersion
,
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment