Skip to content

Commit

Permalink
Fix static mode operational dash for agent-logs namespace (#4300)
Browse files Browse the repository at this point in the history
  • Loading branch information
thampiotr authored and clayton-cornell committed Aug 14, 2023
1 parent 6b1a9c9 commit bad8c78
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 34 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Main (unreleased)

- The Grafana Agent mixin now includes a dashboard for the logs pipeline. (@thampiotr)

- The Agent Operational dashboard of Grafana Agent mixin now has more descriptive panel titles, Y-axis units

### Bugfixes

- Add signing region to remote.s3 component for use with custom endpoints so that Authorization Headers work correctly when
Expand All @@ -79,6 +81,8 @@ Main (unreleased)
- Fix issue where flow mode exports labeled as "string or secret" could not be
used in a binary operation. (@rfratto)

- Fix Grafana Agent mixin's "Agent Operational" dashboard expecting pods to always have `grafana-agent-.*` prefix. (@thampiotr)

v0.34.3 (2023-06-27)
--------------------

Expand Down
38 changes: 19 additions & 19 deletions example/docker-compose/grafana/dashboards/agent-operational.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "GCs",
"title": "GCs [count/s]",
"tooltip": {
"shared": true,
"sort": 2,
Expand Down Expand Up @@ -132,7 +132,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Go Heap",
"title": "Go Heap In Use",
"tooltip": {
"shared": true,
"sort": 2,
Expand Down Expand Up @@ -284,7 +284,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "CPU",
"title": "CPU Usage [time/s]",
"tooltip": {
"shared": true,
"sort": 2,
Expand Down Expand Up @@ -360,7 +360,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "WSS",
"title": "Working Set Size",
"tooltip": {
"shared": true,
"sort": 2,
Expand All @@ -376,7 +376,7 @@
},
"yaxes": [
{
"format": "short",
"format": "decbytes",
"label": null,
"logBase": 1,
"max": null,
Expand Down Expand Up @@ -436,7 +436,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Bad Words",
"title": "Promtail Bad Words",
"tooltip": {
"shared": true,
"sort": 2,
Expand Down Expand Up @@ -524,7 +524,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "RX by Pod",
"title": "Received Bytes [B/s]",
"tooltip": {
"shared": true,
"sort": 2,
Expand All @@ -540,7 +540,7 @@
},
"yaxes": [
{
"format": "short",
"format": "Bps",
"label": null,
"logBase": 1,
"max": null,
Expand Down Expand Up @@ -600,7 +600,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "TX by Pod",
"title": "Transmitted Bytes [B/s]",
"tooltip": {
"shared": true,
"sort": 2,
Expand All @@ -616,7 +616,7 @@
},
"yaxes": [
{
"format": "short",
"format": "Bps",
"label": null,
"logBase": 1,
"max": null,
Expand Down Expand Up @@ -688,7 +688,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Bytes/Series/Pod",
"title": "Heap Used per Series per Pod",
"tooltip": {
"shared": true,
"sort": 2,
Expand Down Expand Up @@ -764,7 +764,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Bytes/Series",
"title": "Avg Heap Used per Series",
"tooltip": {
"shared": true,
"sort": 2,
Expand Down Expand Up @@ -840,7 +840,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Series/Pod",
"title": "Series Count per Pod",
"tooltip": {
"shared": true,
"sort": 2,
Expand Down Expand Up @@ -916,7 +916,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Series/Config",
"title": "Series per Config",
"tooltip": {
"shared": true,
"sort": 2,
Expand Down Expand Up @@ -992,7 +992,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Series",
"title": "Total Series",
"tooltip": {
"shared": true,
"sort": 2,
Expand Down Expand Up @@ -1093,7 +1093,7 @@
"multi": true,
"name": "namespace",
"options": [ ],
"query": "label_values(agent_build_info, namespace)",
"query": "label_values(agent_build_info{cluster=~\"$cluster\"}, namespace)",
"refresh": 1,
"regex": "",
"sort": 2,
Expand All @@ -1117,7 +1117,7 @@
"multi": true,
"name": "container",
"options": [ ],
"query": "label_values(agent_build_info, container)",
"query": "label_values(agent_build_info{cluster=~\"$cluster\", namespace=\"$namespace\"}, container)",
"refresh": 1,
"regex": "",
"sort": 2,
Expand All @@ -1128,7 +1128,7 @@
"useTags": false
},
{
"allValue": "grafana-agent-.*",
"allValue": ".+",
"current": {
"selected": true,
"text": "All",
Expand All @@ -1141,7 +1141,7 @@
"multi": true,
"name": "pod",
"options": [ ],
"query": "label_values(agent_build_info{container=~\"$container\", namespace=\"$namespace\"}, pod)",
"query": "label_values(agent_build_info{cluster=~\"$cluster\", namespace=\"$namespace\", container=\"$container\"}, pod)",
"refresh": 1,
"regex": "",
"sort": 2,
Expand Down
33 changes: 18 additions & 15 deletions production/grafana-agent-mixin/debugging.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ local g = import 'grafana-builder/grafana.libsonnet';
'agent-operational.json':
utils.injectUtils(g.dashboard('Agent Operational'))
.addMultiTemplate('cluster', 'agent_build_info', 'cluster')
.addMultiTemplate('namespace', 'agent_build_info', 'namespace')
.addMultiTemplate('container', 'agent_build_info', 'container')
.addMultiTemplateWithAll('pod', 'agent_build_info{container=~"$container", namespace="$namespace"}', 'pod', all='grafana-agent-.*')
.addMultiTemplate('namespace', 'agent_build_info{cluster=~"$cluster"}', 'namespace')
.addMultiTemplate('container', 'agent_build_info{cluster=~"$cluster", namespace="$namespace"}', 'container')
.addMultiTemplate('pod', 'agent_build_info{cluster=~"$cluster", namespace="$namespace", container="$container"}', 'pod')
.addRow(
g.row('General')
.addPanel(
g.panel('GCs') +
g.panel('GCs [count/s]') +
g.queryPanel(
'rate(go_gc_duration_seconds_count{cluster=~"$cluster", namespace=~"$namespace", container=~"$container", pod=~"$pod"}[5m])',
'{{pod}}',
)
)
.addPanel(
g.panel('Go Heap') +
g.panel('Go Heap In Use') +
{ yaxes: g.yaxes('decbytes') } +
g.queryPanel(
'go_memstats_heap_inuse_bytes{cluster=~"$cluster", namespace=~"$namespace", container=~"$container", pod=~"$pod"}',
Expand All @@ -34,21 +34,22 @@ local g = import 'grafana-builder/grafana.libsonnet';
)
)
.addPanel(
g.panel('CPU') +
g.panel('CPU Usage [time/s]') +
g.queryPanel(
'rate(container_cpu_usage_seconds_total{cluster=~"$cluster", namespace=~"$namespace", container=~"$container", pod=~"$pod"}[5m])',
'{{pod}}',
)
)
.addPanel(
g.panel('WSS') +
g.panel('Working Set Size') +
{ yaxes: g.yaxes('decbytes') } +
g.queryPanel(
'container_memory_working_set_bytes{cluster=~"$cluster", namespace=~"$namespace", container=~"$container", pod=~"$pod"}',
'{{pod}}',
)
)
.addPanel(
g.panel('Bad Words') +
g.panel('Promtail Bad Words') +
g.queryPanel(
'rate(promtail_custom_bad_words_total{cluster=~"$cluster", exported_namespace=~"$namespace", exported_job=~"$job"}[5m])',
'{{job}}',
Expand All @@ -58,14 +59,16 @@ local g = import 'grafana-builder/grafana.libsonnet';
.addRow(
g.row('Network')
.addPanel(
g.panel('RX by Pod') +
g.panel('Received Bytes [B/s]') +
{ yaxes: g.yaxes('Bps') } +
g.queryPanel(
'sum by (pod) (rate(container_network_receive_bytes_total{cluster=~"$cluster", namespace=~"$namespace", pod=~"$pod"}[5m]))',
'{{pod}}',
)
)
.addPanel(
g.panel('TX by Pod') +
g.panel('Transmitted Bytes [B/s]') +
{ yaxes: g.yaxes('Bps') } +
g.queryPanel(
'sum by (pod) (rate(container_network_transmit_bytes_total{cluster=~"$cluster", namespace=~"$namespace", pod=~"$pod"}[5m]))',
'{{pod}}',
Expand All @@ -75,7 +78,7 @@ local g = import 'grafana-builder/grafana.libsonnet';
.addRow(
g.row('Prometheus Read')
.addPanel(
g.panel('Bytes/Series/Pod') +
g.panel('Heap Used per Series per Pod') +
{ yaxes: g.yaxes('decbytes') } +
g.queryPanel(
|||
Expand All @@ -87,7 +90,7 @@ local g = import 'grafana-builder/grafana.libsonnet';
)
)
.addPanel(
g.panel('Bytes/Series') +
g.panel('Avg Heap Used per Series') +
{ yaxes: g.yaxes('decbytes') } +
g.queryPanel(
|||
Expand All @@ -99,21 +102,21 @@ local g = import 'grafana-builder/grafana.libsonnet';
)
)
.addPanel(
g.panel('Series/Pod') +
g.panel('Series Count per Pod') +
g.queryPanel(
'sum by (pod) (agent_wal_storage_active_series{cluster=~"$cluster", namespace=~"$namespace", container=~"$container", pod=~"$pod"})',
'{{pod}}',
)
)
.addPanel(
g.panel('Series/Config') +
g.panel('Series per Config') +
g.queryPanel(
'sum by (instance_group_name) (agent_wal_storage_active_series{cluster=~"$cluster", namespace=~"$namespace", container=~"$container", pod=~"$pod"})',
'{{instance_group_name}}',
)
)
.addPanel(
g.panel('Series') +
g.panel('Total Series') +
g.queryPanel(
'sum by (container) (agent_wal_storage_active_series{cluster=~"$cluster", namespace=~"$namespace", container=~"$container", pod=~"$pod"})',
'{{container}}',
Expand Down

0 comments on commit bad8c78

Please sign in to comment.