Monitoring Amazon Q Business with Amazon CloudWatch - Amazon Q Business

Monitoring Amazon Q Business with Amazon CloudWatch

You can monitor Amazon Q Business using Amazon CloudWatch, which collects raw data and processes it into readable, near real-time metrics. These statistics are kept for 15 months, so that you can access historical information and gain a better perspective on how your web application or service is performing. You can also set alarms that watch for certain thresholds, and send notifications or take actions when those thresholds are met. For more information, see the Amazon CloudWatch User Guide.

Use CloudWatch Metrics for Amazon Q Business

To use metrics, you must specify the following information:

  • The metric namespace. A namespace is a CloudWatch container Amazon Q uses to publish its metrics into. If you are using the CloudWatch ListMetrics API or the list-metrics command to view the metrics for Amazon Q Business, specify AWS/QBusiness for the namespace.

  • The metric dimension. A dimension is a name-value pair that helps you to uniquely identify a metric, for example, ApplicationId can be a dimension name. Specifying a metric dimension is optional.

  • The metric name. For example, DocumentsIndexed.

You can get monitoring data for Amazon Q Business by using the AWS Management Console, the AWS CLI, or the CloudWatch API. You can also use the CloudWatch API through one of the Amazon AWS Software Development Kits (SDKs) or the CloudWatch API tools. The console displays a series of graphs based on the raw data from the CloudWatch API. Depending on your needs, you might prefer to use either the graphs displayed in the console or retrieved from the API.

The following table shows some common uses for the metrics. These are suggestions to get you started, not a comprehensive list.

How do I? Relevant metrics

How do I track how many documents were indexed successfully?

Use the DocumentsIndexed metrics.

How do I monitor end user experience?

Use the ThumbsUpCount and ThumbsDownCountmetrics.

You must have the appropriate CloudWatch permissions to monitor Amazon Q Business with CloudWatch. For more information, see Identity and access management for Amazon CloudWatch in the Amazon CloudWatch User Guide.

View Amazon Q Business metrics

The following steps show how to access Amazon Q Business metrics using the CloudWatch console.

To view metrics (console)
  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. Choose Metrics, choose the All Metrics tab, and then choose AWS/QBusiness.

  3. Choose the metric dimension.

  4. Choose the metric that you want from the list, and choose a time period for the graph.

Create an alarm

You can create a CloudWatch alarm that sends an Amazon Simple Notification Service (Amazon SNS) message when the alarm changes state. An alarm watches a single metric over a time period that you specify. It performs one or more actions based on the value of the metric relative to a given threshold over a number of time periods. The action is a notification sent to an Amazon SNS topic or an Auto Scaling policy.

Alarms invoke actions for sustained state changes only. CloudWatch alarms don't invoke actions simply because they are in a particular state. The state must have changed and have been maintained for a specified number of time periods.

To create an alarm based on an Amazon Q Business metric, see Create a CloudWatch Alarm Based on a CloudWatch Metric.

To set an alarm (console)
  1. Sign in to the AWS Management Console and open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. In the navigation pane, choose Alarms, and choose Create Alarm. This opens the Create Alarm Wizard.

  3. Choose Select metric.

  4. In the All metrics tab, choose an AWS/QBusiness metric for your application, index, and data source. Also set the time as set number of hours, days, weeks, or custom.

  5. Choose your statistic. For example, Average. Also choose your alarm trigger time period as a set number of minutes, hours, per day, or custom.

  6. Choose your threshold to trigger the alarm, whether to use a static value or a band and the condition to meet for the threshold.

  7. Choose the alarm state for the trigger, whether the metric must fall outside your set threshold, or another state. Select who/which email to send the alarm notification to.

  8. Choose Next. Add a name and optional description for your alarm. Choose Next.

  9. Choose Create Alarm.

Note

You can use the Sum statistic to aggregate all metrics with the unit Count. For more information on CloudWatch statistics and how to use them, see CloudWatch statistics definitions in the Amazon CloudWatch User Guide.

Amazon Q Business chat metrics

The following table shows the Chat and conversation management metrics that Amazon Q Business sends to CloudWatch in real time.

Metric name Unit Description

ActionErrorCount

Count

The number of errors because of actions.

Valid dimensions: ApplicationId, PluginId

ActionInvocationCount

Count

The number of actions invoked.

Valid dimensions: ApplicationId, PluginId

BlockedChatMessages

Count

The number of chat messages that were blocked by Amazon Q Business due to an admin guardrail configuration. For example, a BlockedTopic or Blocked Phrase. .

Valid dimensions: ApplicationId

ChatMessages

Count

The number of chat messages This metric is emitted every time a chat message is processed.

Valid dimensions: ApplicationId

ChatMessagesWithAttachment

Count

The number of chat messages with file uploads.

Valid dimensions: ApplicationId

ChatMessagesWithNoAnswer

Count

The number of chat messages that resulted in no answer.

Valid dimensions: ApplicationId

DailyActiveUsers

Count

The number of active users from the previous day.

Valid dimensions: ApplicationId

MonthlyActiveUsers

Count

The number of active users from the previous month.

Valid dimensions: ApplicationId

NewConversations

Count

The number of new conversations started.

Valid dimensions: ApplicationId

ThumbsDownCount

Count

The feedback count for thumbs down.

Valid dimensions: ApplicationId, UsefulnessReason

ThumbsUpCount

Count

The feedback count for thumbs up.

Valid dimensions: ApplicationId, UsefulnessReason

Amazon Q Business index metrics

The following table shows the Index metrics that Amazon Q Business sends to CloudWatch in real time.

Metric name Unit Description

DocumentCount

Count

The number of documents. This metric is published every 15 minutes.

Valid dimensions: ApplicationId, IndexId

DocumentsIndexed

Count

The number of documents that were indexed.

Valid dimensions: ApplicationId, IndexId, DataSourceId

DocumentsFailedToIndex

Count

The number of documents that failed to index.

Valid dimensions: ApplicationId, IndexId, DataSourceId

DocumentsFailedToIndexDueToCDE

Count

The number of documents that failed to index because of custom document enrichment.

Valid dimensions: ApplicationId, IndexId, DataSourceId

ExtractedTextSize

MB

Size of the extracted text

Valid dimensions: ApplicationId, IndexId