Enable promlinter and enhance exposed metrics. (#2550)
* Enable promlinter * Rename archives metric and update dashboard, linter Co-authored-by: shaunak_deshmukh <shaunak@infracloud.io>
This commit is contained in:
co-authored by
shaunak_deshmukh
parent
b36e0516f4
commit
b19d18c8bc
@@ -14,6 +14,7 @@ linters:
|
|||||||
- misspell
|
- misspell
|
||||||
- nakedret
|
- nakedret
|
||||||
- unconvert
|
- unconvert
|
||||||
|
- promlinter
|
||||||
# Enable in future
|
# Enable in future
|
||||||
# - bodyclose
|
# - bodyclose
|
||||||
# - dogsled
|
# - dogsled
|
||||||
|
|||||||
@@ -8,6 +8,4 @@ exclusions:
|
|||||||
target-instance-rule:
|
target-instance-rule:
|
||||||
reason: "Most panels dont need to be filtered by instance"
|
reason: "Most panels dont need to be filtered by instance"
|
||||||
panel-units-rule:
|
panel-units-rule:
|
||||||
reason: "Some panels are using the 'number' unit which throws a linting error."
|
reason: "Some panels are using the 'number' unit which throws a linting error."
|
||||||
target-counter-agg-rule:
|
|
||||||
reason: "disabled for fission_archives_total. This metric should be not have total due to naming conventions as its a gauge, not a counter"
|
|
||||||
@@ -879,7 +879,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "fission_archives_total",
|
"expr": "fission_archives",
|
||||||
"legendFormat": "Namespace: {{namespace}} Pod: {{pod}}",
|
"legendFormat": "Namespace: {{namespace}} Pod: {{pod}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@@ -970,7 +970,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "rate(fission_archives_total[$__rate_interval])",
|
"expr": "rate(fission_archives[$__rate_interval])",
|
||||||
"legendFormat": "Namespace: {{namespace}} Pod: {{pod}}",
|
"legendFormat": "Namespace: {{namespace}} Pod: {{pod}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ var (
|
|||||||
functionLabels = []string{}
|
functionLabels = []string{}
|
||||||
totalArchives = promauto.NewGaugeVec(
|
totalArchives = promauto.NewGaugeVec(
|
||||||
prometheus.GaugeOpts{
|
prometheus.GaugeOpts{
|
||||||
Name: "fission_archives_total",
|
Name: "fission_archives",
|
||||||
Help: "Number of archives stored",
|
Help: "Number of archives stored",
|
||||||
},
|
},
|
||||||
functionLabels,
|
functionLabels,
|
||||||
|
|||||||
Reference in New Issue
Block a user