Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix static mode operational dash for agent-logs namespace #4300

Merged
merged 9 commits into from
Jun 29, 2023

Conversation

thampiotr
Copy link
Contributor

@thampiotr thampiotr commented Jun 29, 2023

PR Description

When using dashboard mixin, on the "Agent Operational" dashboard, the all option for pod template expects that pods have grafana-agent-.* prefix. This is not always the case for every user. At the same time filtering pods in some way is useful, so this PR changes the templates so that they use the previous templates' scope to reduce list of values in the drop-down.

Also gave some panels more descriptive names as I found some of them quite cryptic.

Notes to the Reviewer

PR Checklist

  • CHANGELOG updated
  • Documentation added
  • Tests updated

@thampiotr thampiotr force-pushed the thampiotr/fix-agent-logs-operational-dash branch from 9855e7c to cb10989 Compare June 29, 2023 09:51
@thampiotr thampiotr marked this pull request as ready for review June 29, 2023 09:54
@thampiotr thampiotr requested a review from a team as a code owner June 29, 2023 09:54
@@ -376,7 +376,7 @@
},
"yaxes": [
{
"format": "short",
"format": "decbytes",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Finally we won't have to switch this manually 😄 @tpaschalis

@@ -916,7 +916,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Series/Config",
"title": "Series per Config",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I personally find / notation such as Series/Config easier to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does look a bit worse when we have Heap Used /Series/Pod - looks like some kind of resource path or hierarchy. Since per fits on the screen, I'd prefer to use that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, let's try out the "per" notation - I'd be happy with it

@@ -284,7 +284,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "CPU",
"title": "CPU Usage [time/s]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only problem with including units in the title that I can think of, is that if someone edits an axis on the dashboard to have different units it might be confusing, or they'd have to update the title manually.

Wouldn't it be better to just set the unit in the Grafana settings for each axis, and then Grafana will just display them on each axis?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if someone changes the axis, they can also change the title. I didn't put unit everywhere as it's sometimes obvious (e.g. bytes), but I think it's helpful for some less obvious charts, like CPU Usage which is "how many seconds of CPU time was used every second".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even in those cases I think I'd prefer to have the units on the actual axes instead of in the title. But I'm ok with having this in the title like this, it's still an improvement and I think it'll work ok.

Comment on lines +9 to +11
.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')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think making the templates depending on each other helps better in navigating the hierarchy of k8s resources.

@@ -284,7 +284,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "CPU",
"title": "CPU Usage [time/s]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even in those cases I think I'd prefer to have the units on the actual axes instead of in the title. But I'm ok with having this in the title like this, it's still an improvement and I think it'll work ok.

@@ -916,7 +916,7 @@
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Series/Config",
"title": "Series per Config",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, let's try out the "per" notation - I'd be happy with it

@tpaschalis tpaschalis merged commit 84d1f54 into main Jun 29, 2023
6 checks passed
@tpaschalis tpaschalis deleted the thampiotr/fix-agent-logs-operational-dash branch June 29, 2023 15:35
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 23, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants