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
Monitoring dashboards: Initial commit #3771
Monitoring dashboards: Initial commit #3771
Conversation
/test analyze |
@cshinn @andybraren Will it be confusing for users that there are two different sets of dashboards, Home -> Dashboards and Monitoring -> Dashboards? Have we considered showing these under the existing Home -> Dashboards page? |
cc @alimobrem |
I've heard tell of changing the current cluster dashboard to "Overview" or somesuch. This monitoring section could also be called "metrics dashboards". Either way, we've had this situation for a couple releases now, It's just where the link goes that's different |
const [error, setError] = React.useState(); | ||
|
||
React.useEffect(() => { | ||
const path = `${k8sBasePath}/api/v1/namespaces/openshift-monitoring/configmaps/grafana-dashboard-${board}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok great, can take a look at the configmaps from here.
This is where we need to have the discussion about ConfigMap vs CRD and the RBAC ramifications, as users may not be able to access these resources.
@spadgett I do think it'll be confusing. We discussed this briefly back in October, but I think it's time to start calling what we know as "dashboards" today "overviews" instead (since that's what really what they are, philosophically) and free up that word to be used by these more traditional Metric Dashboards instead. To get there, we would:
I think this is worth POC'ing to see how it feels and see if we come across any major conflicts, but calling the existing things "overviews" seems better aligned with their purpose and our (prescriptive) extensibility plans for them, compared to these new traditional "dashboards". FYI @rawagner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this progress 👍
<HrefLink | ||
href="/monitoring/query-browser?query0=" | ||
name="Metrics" | ||
startsWith={['monitoring/query-browser']} | ||
/> | ||
)} | ||
{showGrafana && <ExternalLink href={grafanaURL} name="Dashboards" />} | ||
{canAccessPrometheus && <HrefLink href="/monitoring/dashboards" name="Dashboards" />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hide the nav item until we're ready to expose the dashboards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I reverted the changes in admin-nav.tsx
for now
|
||
import { Alert } from '@patternfly/react-core'; | ||
|
||
const ErrorAlert: React.FC<Props> = ({ message, title = 'An error occurred' }) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move this to shared components so it's a general utility we can use elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Moved to frontend/packages/console-shared/src/components/alerts/error.tsx
let result = s; | ||
_.each(variables, (v, k) => { | ||
result = result.replace(new RegExp(`\\$${k}`, 'g'), v); | ||
}); | ||
return result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest reduce
return _.reduce(variables, (result: string, v: string, k: string): string => {
return result.replace(new RegExp(`\\$${k}`, 'g'), v);
}, s);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
justify-content: flex-start; | ||
} | ||
|
||
.monitoring-dashboards-dropdown { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should follow BEM naming for these classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
frontend/public/components/monitoring/dashboards/single-stat.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/monitoring/dashboards/single-stat.tsx
Outdated
Show resolved
Hide resolved
import { QueryBrowser } from '../query-browser'; | ||
|
||
const Graph: React.FC<Props> = ({ pollInterval, queries, timespan }) => ( | ||
<QueryBrowser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to see we can reuse this 👍
@andybraren I guess I don't understand why Home -> Dashboards is an overview and not a dashboard. It looks like a dashboard to me :) The way these two pages work under the hood is very different. That doesn't really matter to a user, though. They seem to fulfill the same fundamental purpose, and they look almost the same. Why not just add these as additional dashboards under the existing Home -> Dashboards page? |
@spadgett something similar was proposed back before the current dashboard existed. I think it's now made tricky because lots of different "metrics dashboards" can exist as well as several different "overview dashboards" for different subsystems. @sichvoge what are your thoughts on the relationship between these? |
@spadgett Our reasoning is somewhat forward-looking, but IIRC @cshinn and I lean against placing these within
Maybe I've just been haunted by "dashboards" for so long that I feel the need to rename them. 😄 Although they do look visually similar-ish, I'd argue that they fulfill fundamentally different purposes and will only continue to functionally diverge in the future due to the architectural differences between them. Both are valid and useful, but as the differences grow, calling them the same thing may confuse more than it helps. Overviews should continue to be prescriptive "windows" that highlight what's important 90% of the time (determined by our research & domain expertise) and help users quickly jump away to other areas of the Console that need human attention. The 5-6 cards we have today seem to do a decent job at that, and their deep integration into the Console and the API allows them to do things these new dashboards can't. Dashboards have a clear path forward for deep customization, and their insight is scoped to what Prometheus collects (which is a lot). They have a different but similarly important focus, and they'll allow users to get deeper data-driven insights when necessary. People will probably still call both of them "dashboards" anyway 🤷♂️ but it seems like our UI should at least attempt to make the functional & philosophical distinction clearer by not calling them the same thing and placing them next to one another. FYI @sichvoge @jelkosz @rawagner @yuvalgalanti @serenamarie125 @beanh66 @lizsurette (related to an email discussion from October) |
Initial commit of the monitoring dashboards. Including laying out the dashboard cards dynamically and rendering single stat, bar graph and line graph cards.
bb281b3
to
9bc68f0
Compare
Addressed feedback and also made a couple of other small improvements.
|
/test analyze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Thanks @kyoto. Let's get the initial work integrated so our teams can better collaborate, then we can expose the dashboards in the nav when ready. This is a fantastic start 👍
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kyoto, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@andybraren The way it's architected, the out-of-the-box dashboards won't be customizable. They're managed by operators, which will overwrite any changes you make. You would only be able to create and edit the dashboards you add. So there shouldn't be any confusion there. It's not clear when or if we'd add that capability. Most likely it'd be driven by a cluster admin editing a custom resource and not through an editor in the UI. I think we're still getting hung up on the implementation, and not what the user sees. Fundamentally, these pages are about the same thing: monitoring the state of your cluster. The look and behave basically the same regardless of what we call them. |
I'll chime in along the same lines of @spadgett, For an administrator, these views seem to be essential to understanding how the cluster is doing. I'd be in favor of moving this up to Home -> Dashboards as well. |
Initial commit of the monitoring dashboards. Including laying out the
dashboard cards dynamically and rendering single stat, bar graph and
line graph cards.
Follow-up PRs will add