AWS Cloud Operations Blog
Amazon Connect real-time monitoring using Amazon Managed Grafana and Amazon Timestream
Amazon Connect is an easy-to-use cloud contact center solution that helps companies of any size deliver superior customer service at a lower cost. Connect has many real-time monitoring capabilities. For requirements that go beyond those supported out of the box, Amazon Connect also provides you with data and APIs you can use to implement your own custom real-time monitoring solution. Such a solution enables you to monitor your contact center with your standard monitoring tools, create custom metrics that reflect your business rules, visualize the data according to user preferences, secure access to the data with custom rules, aggregate third-party data from other systems, and integrate the real-time data into other applications.
Organizations benefit from real-time or near real-time monitoring of the activities in their contact centers. Assessing agent performance and identifying issues while calls are happening empowers supervisors to prevent negative customer experiences with swift corrective actions. Dashboards help teams focus on the metrics that impact their success.
This blog post is the second in a two-part series. In the first part “Amazon Timestream for Amazon Connect real-time monitoring” we showed you how to create an Amazon Timestream database and populate it with data from Amazon Connect.
In this blog post, we show you how to deploy sample Amazon Managed Grafana dashboards to visualize and monitor your contact center data collected in the Amazon Timestream database created when you deployed the first part. To get started, you can use the AWS CloudFormation template, Grafana templates and step-by-step instructions provided in this post.
Dashboards overview
This section presents some screenshots to illustrate our sample dashboards.
The Agent Events dashboard displays agent-centric data points collected from agent event streams, such as an agent’s state, and each agent’s contact state and contacts data. Information can be filtered and aggregated with agent attributes such as routing profiles. Agent Availability Through Time and Available Slots Through Time are time series graphs show the trend within the observation time frame. The channels and queues that keep agents busy are identified using agent-related events on each contact. Leaderboards such as Answered Contacts Leaderboard provides metrics comparison between agents in order to identify highest performers or contacts that require attention.
The Contact Events dashboard displays contact event-centric data points collected from contact events such as contact state, channel, a contact’s queue information, and a contact’s agent. Important metrics such as abandoned contacts and SLAs are calculated with this data. Information can be filtered and joined with other contact center data such as routing profiles. Time series graphs such as Contact Status Timeseries Analysis show the trends within the observation time frame. These trends can help you understand demand and plan resource allocations.
Solution overview
The following architecture diagram provides a high-level view of the solution.
You learned how to create the Amazon Timestream database and populate it with data from Amazon Connect in the part one blog post “Amazon Timestream for Amazon Connect real-time monitoring”. This second part of the solution shows you how you can configure Amazon Managed Grafana workspace and dashboards to visualize the data retrieved from the Amazon Timestream database.
The solution uses the following AWS services:
- AWS CloudFormation
- Amazon Connect
- AWS IAM Identity Center (successor to AWS Single Sign-On)
- AWS Identity and Access Management (IAM)
- Amazon Managed Grafana
- AWS Organizations
- Amazon Timestream
Prerequisites:
You should have the following prerequisites:
- You need an active AWS account with the permission to create and modify IAM roles
- The first part of the two part blog solution “Amazon Timestream for Amazon Connect real-time monitoring” must be deployed in your account before you start. This second part blog post will show you how to deploy the Amazon Managed Grafana solution to visualize the data collected in the database created in the implementation of the first part.
Create and configure a Grafana Workspace
If you already have a workspace created with the latest version of Grafana, you can use this existing workspace. Otherwise, complete the following steps:
- On the AWS Console, proceed to the IAM Identity Center. If not already enabled, enable IAM Identity Center by choosing Enable on the IAM Identity Center console. If your account is not part of an AWS organization, you will receive a message. Choose Create AWS organization to proceed.
- If you don’t have any users in IAM Identity Center, choose Users and then Add User. At least one user is needed to be assigned as an admin user for the Grafana workspace.
- Choose Launch Stack to create a Grafana workspace
- Enter a unique stack name if you want to change the default name (
ConnectRealTimeGrafana
). - There are no parameters required. Select the acknowledgement check box.
- Choose Create stack.
- Stack creation may take several minutes. When it’s complete, navigate to the Outputs tab.
- Choose the link for GrafanaWorkspaceConsole to view the workspace details.
- Choose Assign new user or group to assign users and/or groups to the workspace so that they can log in and use Grafana.
- Select the users and groups to add them. Choose Assign users and groups to add them to the workspace.
- For admin and editor users, after the user is added, select the user and assign a role on the Action menu.
- Open the Grafana workspace URL in the workspace Summary section.
- Log in with an admin user.
- Choose Data Sources under Administration on the left menu.
- Choose Add data source and choose Amazon Timestream from the available services list. Enter the Region of your Amazon Timestream database as the default Region. Choose Save & test to save this new data source.
Deploy Grafana dashboards
Complete the following steps to deploy your Grafana dashboards:
- Download the following Grafana dashboard JSON files:
You can import them using the Grafana UI Dashboards page.
- For each dashboard, choose New and Import.
- Upload the json file, select the Timestream data source you created, and choose Import.
- The default Timestream database name used by the dashboard samples is
ConnectRealTime
which is the same as the default Stack Name for the Timestream solution you must deploy prior to creating Grafana solution. If you chose a different Stack Name while deploying the Timestream solution, you will need to change the DatabaseName variable for each dashboard.
- If you change a variable, remember to choose Apply, and then Save Dashboard to save the dashboard. Check Save current variable values as dashboard default and click Save.
- You can now start using these newly created dashboards. You can also customize them to create the visualizations that will add value to your business.
Clean up
To remove the resources created by this stack, perform the following steps:
- Remove the Grafana dashboards.
- Delete the CloudFormation stack you created for this solution.
Troubleshooting
If you receive the error Your account is not a member of an organization. (Service: AWSSingleSignOn; Error Code: AccessDeniedException)
, verify that IAM Identity Center is enabled.
In the Grafana dashboards, if you see an error message ValidationException: line #:#: Column 'aColumnName' does not exist
, verify there is activity in the source contact centers. Amazon Timestream creates columns automatically when a value for a specific column arrives. If no data has been sent to Timestream, there won’t be any columns in the tables. For example, if there is no contact activity in the contact center, the Contacts table won’t have the expected columns. When the activity starts, the columns will be automatically created and the error will disappear.
Conclusion
In this post, you learned how to monitor Amazon Connect real-time data, and how to visualize the data in Grafana dashboards using sample templates.
The sample Grafana dashboards are provided as open source—you can use them as a starting point for your own solution. To get hands-on experience with Amazon Managed Grafana, try AWS Workshop Studio.
About the Authors
Mehmet Demir is a Principal Solutions Architect at Amazon Web Services (AWS) based in Toronto, Canada. He helps customers in building well-architected solutions that support business innovation. | |
Imaya Kumar Jagannathan is a Principal Solution Architect focused on AWS Observability tools including Amazon CloudWatch, AWS X-Ray, Amazon Managed Service for Prometheus, Amazon Managed Grafana and AWS Distro for Open Telemetry. He is passionate about monitoring and observability and has a strong application development and architecture background. He likes working on distributed systems and is excited to talk about microservice architecture design. He loves programming on C#, working with containers and serverless technologies. LinkedIn: /imaya |