Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4a07ee0a
Commit
4a07ee0a
authored
Mar 29, 2019
by
Reuben Pereira
Committed by
Phil Hughes
Mar 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add requested resources to cluster health - frontend
Reorders the chart queries Adds line thickness
parent
da0d31c0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
6 deletions
+47
-6
app/assets/javascripts/monitoring/components/charts/area.vue
app/assets/javascripts/monitoring/components/charts/area.vue
+5
-5
app/assets/javascripts/monitoring/constants.js
app/assets/javascripts/monitoring/constants.js
+0
-1
config/prometheus/cluster_metrics.yml
config/prometheus/cluster_metrics.yml
+28
-0
ee/changelogs/unreleased/tr-add-requested-resource-metric.yml
...hangelogs/unreleased/tr-add-requested-resource-metric.yml
+5
-0
spec/javascripts/monitoring/charts/area_spec.js
spec/javascripts/monitoring/charts/area_spec.js
+4
-0
spec/javascripts/monitoring/mock_data.js
spec/javascripts/monitoring/mock_data.js
+5
-0
No files found.
app/assets/javascripts/monitoring/components/charts/area.vue
View file @
4a07ee0a
...
...
@@ -69,17 +69,17 @@ export default {
appearance
&&
appearance
.
line
&&
appearance
.
line
.
type
?
appearance
.
line
.
type
:
lineTypes
.
default
;
const
lineColor
=
lineType
===
lineTypes
.
threshold
?
this
.
primaryColor
:
undefined
;
const
lineWidth
=
appearance
&&
appearance
.
line
&&
appearance
.
line
.
width
?
appearance
.
line
.
width
:
undefined
;
return
{
name
:
this
.
formatLegendLabel
(
query
),
data
:
this
.
concatenateResults
(
query
.
result
),
lineStyle
:
{
type
:
lineType
,
color
:
lineColor
,
},
itemStyle
:
{
color
:
lineColor
,
width
:
lineWidth
,
},
areaStyle
:
{
opacity
:
...
...
app/assets/javascripts/monitoring/constants.js
View file @
4a07ee0a
...
...
@@ -6,5 +6,4 @@ export const graphTypes = {
export
const
lineTypes
=
{
default
:
'
solid
'
,
threshold
:
'
dashed
'
,
};
config/prometheus/cluster_metrics.yml
View file @
4a07ee0a
...
...
@@ -9,12 +9,26 @@
-
query_range
:
'
avg(sum(rate(container_cpu_usage_seconds_total{id="/"}[15m]))
by
(job))
without
(job)'
label
:
Usage
unit
:
"
cores"
appearance
:
line
:
width
:
2
area
:
opacity
:
0
-
query_range
:
'
sum(kube_pod_container_resource_requests_cpu_cores{kubernetes_namespace="gitlab-managed-apps"})'
label
:
Requested
unit
:
"
cores"
appearance
:
line
:
width
:
2
area
:
opacity
:
0
-
query_range
:
'
sum(kube_node_status_capacity_cpu_cores{kubernetes_namespace="gitlab-managed-apps"})'
label
:
Capacity
unit
:
"
cores"
appearance
:
line
:
type
:
'
dashed'
width
:
2
area
:
opacity
:
0
-
title
:
"
Memory
usage"
...
...
@@ -25,11 +39,25 @@
-
query_range
:
'
avg(sum(container_memory_usage_bytes{id="/"})
by
(job))
without
(job)
/
2^30'
label
:
Usage
unit
:
"
GiB"
appearance
:
line
:
width
:
2
area
:
opacity
:
0
-
query_range
:
'
sum(kube_pod_container_resource_requests_memory_bytes{kubernetes_namespace="gitlab-managed-apps"})/2^30'
label
:
Requested
unit
:
"
GiB"
appearance
:
line
:
width
:
2
area
:
opacity
:
0
-
query_range
:
'
sum(kube_node_status_capacity_memory_bytes{kubernetes_namespace="gitlab-managed-apps"})/2^30'
label
:
Capacity
unit
:
"
GiB"
appearance
:
line
:
type
:
'
dashed'
width
:
2
area
:
opacity
:
0
ee/changelogs/unreleased/tr-add-requested-resource-metric.yml
0 → 100644
View file @
4a07ee0a
---
title
:
Add requested resources to cluster health metrics
merge_request
:
10135
author
:
type
:
changed
spec/javascripts/monitoring/charts/area_spec.js
View file @
4a07ee0a
...
...
@@ -203,6 +203,10 @@ describe('Area component', () => {
.
length
,
).
toBe
(
data
.
length
);
});
it
(
'
formats line width correctly
'
,
()
=>
{
expect
(
chartData
[
0
].
lineStyle
.
width
).
toBe
(
2
);
});
});
describe
(
'
scatterSeries
'
,
()
=>
{
...
...
spec/javascripts/monitoring/mock_data.js
View file @
4a07ee0a
...
...
@@ -330,6 +330,11 @@ export const metricsGroupsAPIResponse = {
weight
:
1
,
queries
:
[
{
appearance
:
{
line
:
{
width
:
2
,
},
},
query_range
:
'
avg(rate(container_cpu_usage_seconds_total{%{environment_filter}}[2m])) * 100
'
,
label
:
'
Core Usage
'
,
...
...
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