mirror of https://github.com/minio/minio.git
Compare commits
5 Commits
3aec5b5d62
...
bc2adf08a5
| Author | SHA1 | Date |
|---|---|---|
|
|
bc2adf08a5 | |
|
|
534f4a9fb1 | |
|
|
3a38da2d9f | |
|
|
3ce09d42a3 | |
|
|
f42f84686c |
|
|
@ -106,10 +106,9 @@ func (p *scannerMetrics) log(s scannerMetric, paths ...string) func(custom map[s
|
||||||
|
|
||||||
// time n scanner actions.
|
// time n scanner actions.
|
||||||
// Use for s < scannerMetricLastRealtime
|
// Use for s < scannerMetricLastRealtime
|
||||||
func (p *scannerMetrics) timeN(s scannerMetric) func(n int) func() {
|
func (p *scannerMetrics) timeN(s scannerMetric) func(n int) {
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
return func(n int) func() {
|
return func(n int) {
|
||||||
return func() {
|
|
||||||
duration := time.Since(startTime)
|
duration := time.Since(startTime)
|
||||||
|
|
||||||
atomic.AddUint64(&p.operations[s], uint64(n))
|
atomic.AddUint64(&p.operations[s], uint64(n))
|
||||||
|
|
@ -118,7 +117,6 @@ func (p *scannerMetrics) timeN(s scannerMetric) func(n int) func() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// time a scanner action.
|
// time a scanner action.
|
||||||
// Use for s < scannerMetricLastRealtime
|
// Use for s < scannerMetricLastRealtime
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,12 @@ metadata:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
jobName: {{ template "minio.fullname" . }}
|
jobName: {{ template "minio.fullname" . }}
|
||||||
|
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||||
|
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||||
|
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
tlsConfig:
|
tlsConfig:
|
||||||
ca:
|
ca:
|
||||||
|
|
@ -94,19 +100,13 @@ spec:
|
||||||
{{- if .Values.metrics.serviceMonitor.relabelConfigsCluster }}
|
{{- if .Values.metrics.serviceMonitor.relabelConfigsCluster }}
|
||||||
{{- toYaml .Values.metrics.serviceMonitor.relabelConfigsCluster | nindent 2 }}
|
{{- toYaml .Values.metrics.serviceMonitor.relabelConfigsCluster | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
targets:
|
|
||||||
staticConfig:
|
|
||||||
static:
|
|
||||||
- {{ template "minio.fullname" . }}.{{ .Release.Namespace }}
|
|
||||||
{{- if not .Values.metrics.serviceMonitor.public }}
|
{{- if not .Values.metrics.serviceMonitor.public }}
|
||||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
|
||||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
|
||||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
|
||||||
{{- end }}
|
|
||||||
bearerTokenSecret:
|
bearerTokenSecret:
|
||||||
name: {{ template "minio.fullname" . }}-prometheus
|
name: {{ template "minio.fullname" . }}-prometheus
|
||||||
key: token
|
key: token
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
targets:
|
||||||
|
staticConfig:
|
||||||
|
static:
|
||||||
|
- {{ template "minio.fullname" . }}.{{ .Release.Namespace }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue