Skip to content

Commit

Permalink
Merge pull request #5 from rsevilla87/fs-writes
Browse files Browse the repository at this point in the history
Container writes panel
  • Loading branch information
rsevilla87 authored Oct 26, 2020
2 parents e59d6ed + 041d853 commit 7a25081
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions templates/ocp-performance.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ local conntrackStats(nodeName) = genericGraphLegendPanel('Conntrack stats: ' + n
)
);


local top10ContainerCPU(nodeName) = genericGraphLegendPanel('Top 10 container CPU: ' + nodeName, 'percent').addTarget(
prometheus.target(
'topk(10, sum(irate(container_cpu_usage_seconds_total{container!="POD",name!="",node=~"' + nodeName + '",namespace!="",namespace=~"$namespace"}[5m])) by (namespace,name,service) * 100)',
Expand All @@ -155,6 +154,13 @@ local top10ContainerRSS(nodeName) = genericGraphLegendPanel('Top 10 container RS
)
);

local containerWriteBytes(nodeName) = genericGraphLegendPanel('Container fs write rate: ' + nodeName, 'Bps').addTarget(
prometheus.target(
'sum(rate(container_fs_writes_bytes_total{device!~".+dm.+", node=~"' + nodeName + '", container!=""}[5m])) by (device, container)',
legendFormat='{{ container }}: {{ device }}',
)
);

// Individual panel definitions

// OVN
Expand Down Expand Up @@ -267,7 +273,7 @@ local current_pod_count = grafana.statPanel.new(
datasource='$datasource',
).addTarget(
prometheus.target(
'sum(kube_pod_status_phase{namespace=~"$namespace"}) by (phase) > 0',
'sum(kube_pod_status_phase{}) by (phase) > 0',
legendFormat='{{ phase}} Pods',
)
);
Expand Down Expand Up @@ -570,6 +576,7 @@ grafana.dashboard.new(
conntrackStats('$_master_node') { gridPos: { x: 12, y: 24, w: 12, h: 8 } },
top10ContainerCPU('$_master_node') { gridPos: { x: 0, y: 24, w: 12, h: 8 } },
top10ContainerRSS('$_master_node') { gridPos: { x: 12, y: 24, w: 12, h: 8 } },
containerWriteBytes('$_master_node') { gridPos: { x: 0, y: 32, w: 12, h: 8 } },
],
), { gridPos: { x: 0, y: 1, w: 0, h: 8 } })

Expand Down

0 comments on commit 7a25081

Please sign in to comment.