This document aims to describe the configuration required to set up your Grafana Dashboard to represent your CC Monitoring and Live Dashboard Statistics.
All metrics that are available on the Live Dashboard Grid View and the CC Monitoring View will be available once the endpoints have been configured.
Configure Datasource in Grafana
Once you successfully logged in, navigate to “Settings” (configuration) on the left-hand side and click on "Data Sources".
From here you will be taken to the “Configuration” where you will be able to select the “Add Datasource” button.
Select JSON datasource
Configure the datasource with the following information:
- Name: Display name that will be used when choosing datasource for dashboard panels (Showed in future steps)
- For Live DB: https://api.zailab.com/v1/interaction/live-dashboard/grafana/<serviceName>
- Replace <serviceName> with the name of the service you want to use as a datasource
- For CC Monitoring: https://api.zailab.com/v1/interaction/contact-centre-monitoring/grafana/<teamName>
- Replace <TeamName> with the name of the team you want to use as a datasource
- Note that you cannot use spaces in the url, if the service name/team name/worktype name has a space, replace the space with “%20”.
- Access: Select Server (default)
- Headers: Add a header with a name of Authorization and with the provided value (bearer token).
After configuring the datasource settings, select the “Save & Test” button.
If the connection was a success, you should get the following message: “Data source is working”.
Setting up Panels
Start creating a new panel and in the query tab, choose the data source that you created previously.
Open Query Metrics and choose which one you would like to query:
- To get data for “All Worktypes” select your service name
- To get data for each worktype service select the appropriate service name.worktype.
After you have selected the Query Metric, select the “switch to table view” button so that the data is displayed.
You can select “+ Query” to add additional queries to be displayed on your panel.
After setting up the panel you can filter and organize columns to your liking.
Navigate to the Transform tab:
After selecting the Transform option choose “Organize fields”:
In “Organize Fields” you can:
- Organize columns
- Hide/Show columns
- Rename columns
For more advanced filtering you can also use filter-by-name transformation which allows you to filter columns with regex.
Formatting your data
By default, Time columns are displayed in seconds, to change them into more readable options go to the “Overrides tab”:
- Add an override for Fields with name
- Choose the column name you would like to change the display format
- Override the unit property of the column that you chose
- Choose Time units
- Choose which format you prefer to display
- To display a background color for cells we can override the cell display mode
- And set it to color background
- You can override thresholds for coloring cells
In our example threshold values will be compared to initial and secondary values that were displayed before unit formatting.
You can also do the same cell background and threshold overrides for other numeric columns.