- In the sidebar, hover your cursor over the Create (plus sign) icon and then click Dashboard.
- Click Add a new panel.
- In the Query editor below the graph, enter the query from earlier and then press Shift + Enter:==>
sum(rate(tns_request_duration_seconds_count[5m])) by(route)
- In the Legend field, enter {{route}} to rename the time series in the legend. The graph legend updates when you click outside the field.
- In the Panel editor on the right, under Settings, change the panel title to “Traffic”.
- Click Apply in the top-right corner to save the panel and go back to the dashboard view.
- Click the Save dashboard (disk) icon at the top of the dashboard to save your dashboard.
- Enter a name in the Dashboard name field and then click Save.
- Hover and Click: Begin by navigating to the sidebar and hover your cursor over the Create (plus sign) icon. From the dropdown menu, select Dashboard and click on it. This action will open a new dashboard interface where you can create and manage panels to visualize data.
- Add a New Panel: Within the dashboard interface, locate and click on the "Add a new panel" option. This step allows you to insert a new visualization panel where you can display specific data queries.
- Query Entry: Once the new panel is added, you'll see a Query editor below the graph area. Here, enter the desired query to fetch data for visualization. For instance, use the query:scss
- sum(rate(tns_request_duration_seconds_count[5m])) by(route)This query calculates the sum of request durations over a 5-minute window, grouped by different routes.
- Legend Customization: In the Legend field, you can customize how the data series are labeled in the graph legend. To make it more informative, enter {{route}}. This will replace the default legend labels with the actual route names from your data. Remember to click outside the field to apply the changes.
- Panel Title Update: Moving to the Panel editor on the right-hand side, locate the Settings section. Within Settings, find the option to change the panel title. Rename the panel to “Traffic”. This title will provide users with a clear understanding of what the panel visualizes.
- Apply Changes: Once you've made all the necessary adjustments, click on the Apply button in the top-right corner. This action saves your panel settings and returns you to the dashboard view, allowing you to see the updated visualization.
- Save Dashboard: Finally, ensure that your dashboard changes are saved by clicking on the Save dashboard (disk) icon located at the top of the dashboard interface. Enter a descriptive name for your dashboard in the provided field and then click Save. This ensures that your dashboard configuration, including the newly added panel, is preserved for future reference.
#90daysofdevops #devops #tws