vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Red Hat OpenShift provides a web interface to run queries and examine the metrics visualized on a plot. This functionality provides an extensive overview of the cluster state and enables you to troubleshoot problems.



1. Navigate to Observe > Metrics.
2. Enter the following expression and click Run queries. You should see the value and the graph associated with the query.

sum(container_cpu_usage_seconds_total{container="patient-health-frontend"})

Zoom

![Metrics Graph](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution55-openshift-microservices/metrics.png)

Metrics Graph









 Step 5: Scaling the application 

In this section, the metrics observed in the previous section can be used to scale the UI application in response to load.



 Enable Resource Limits 

Before autoscaling maximum CPU and memory resource limits must be established.

The dashboards earlier showed you that the load was consuming anywhere between ".002" to ".02" cores. This translates to 2-20 "millicores". To be safe, let's bump the higher-end up to 30 millicores. In addition, the data showed that the app consumes about 25-65 MB of RAM. The following steps will set the resource limits in the deploymentConfig



1. Make sure the script to generate traffic is running.
2. Switch to the Administrator perspective.
3. Navigate to Workloads > DeploymentConfigs.
4. Select the example-health project.
5. From the Actions menu (the three vertical dots) of patient-health-frontend, choose Edit DeploymentConfig.

Zoom

!
* INSTANCE_GROUP: ID or name of the instance group.
* MANAGER: ID or name of the manager.
* POLICY: ID or name of the policy.
* --metric-type: The type of metric to be evaluated: cpu (utilization percent), memory (utilization percent), network_in (Mbps), network_out (Mbps).
* --metric-value: The metric value to be evaluated.
* --name: New name of the instance group manager policy.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------







 ibmcloud is instance-group-membership 

View details of a member of instance group.

ibmcloud is instance-group-membership INSTANCE_GROUP MEMBER [--output JSON] [-q, --quiet]



 Command options 



* INSTANCE_GROUP: ID or name of the instance group.
* MEMBER: ID or name of the membership.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------







 ibmcloud is instance-group-membership-delete 

Delete one or more memberships for an instance group.

ibmcloud is instance-group-membership-delete INSTANCE_GROUP (MEMBER1 MEMBER2 ...) [--output JSON] [-f, --force] [-q, --quiet]



 Command options 



* INSTANCE_GROUP: ID or name of the instance group.
* MEMBER1: ID or name of the membership.
* MEMBER2: ID or name of the membership.
* --output: Specify output format, only JSON is supported. One of: JSON.
* --force, -f: Force the operation without confirmation.
* -q, --quiet: Suppress verbose output.
[IAM ID bytes in per second](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-metricsibm_eventstreams_iam_id_bytes_in_per_second) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/e0c3acba1296ff980e76d5db456d53adefaabba4/icons/checkmark-icon.svg) 
 [IAM ID bytes out per second](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-metricsibm_eventstreams_iam_id_bytes_out_per_second) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/e0c3acba1296ff980e76d5db456d53adefaabba4/icons/checkmark-icon.svg) 
 [Used disk space percentage](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-metricsibm_eventstreams_instance_utilised_disk_space_percent) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/e0c3acba1296ff980e76d5db456d53adefaabba4/icons/checkmark-icon.svg) 







 Metrics available with mirroring enabled 



Table 2. Metrics available for mirroring

 Metric name Enterprise Lite Standard 

 [Mirroring throughput](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-metricsibm_eventstreams_instance_mirroring_throughput) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/e0c3acba1296ff980e76d5db456d53adefaabba4/icons/checkmark-icon.svg)
: The total number of evaluations that have been run in the past 30 days. An evaluation is the check of one resource against one assessment.





 Viewing detailed results in the dashboard 

To view the information of a scan, you can use the Security and Compliance Center UI.

You can filter results by tag. Tags are defined at the platform level. For help creating tags, see [Working with tags](https://cloud.ibm.com/docs/account?topic=account-tag).



1. In the IBM Cloud console, click the Menu icon ![Menu icon](https://cloud.ibm.com/docs-content/v1/content/a6478671e8f845a84102d9cf49bf28ee7f4f3227/icons/icon_hamburger.svg)> Security and compliance to access Security and Compliance Center.
2. Click Dashboard.
3. In the Detailed results section, find the row for the specific Scope and Profile combination that you want to view results for and click View in the Results column.



A page opens with an Overview of your results. To further investigate, you can view the results by Control or by Resource. Check out the following table to see what information is available in each tab.



Table 1. Understanding detailed results

 Description 

 Overview On the overview tab, you are provided with a graphical representation of your compliance for your selected scan.<br><br>Zoom<br><br>![A visual representation of detailed results that are returned when an evaluation is run.](https://cloud.ibm.com/docs-content/v1/content/a6478671e8f845a84102d9cf49bf28ee7f4f3227/security-compliance/images/results-overview-tab.svg)<br><br>Figure 2. Example overview tab results<br><br>Success rate: The rate at which your configurations pass the evaluation that is conducted. Total controls: The total number of controls that were evaluated during this scan. Drift: The difference in results for your selected evaluation timeframe.
Provisioning an instance 

Before you can monitor and manage metrics, you must provision an instance of the service in IBM Cloud.



 Provisioning an instance from the catalog 

To provision an instance from the IBM Cloud catalog, complete the following steps:



1. [Log in to the IBM Cloud console](https://cloud.ibm.com/login).
2. Click Catalog. The list of the services that are available on IBM Cloud opens.
3. To filter the list of services that is displayed, select the Logging and Monitoring category.
4. Click the IBM Cloud Monitoring tile.
5. Select Create.
6. Select the location.
7. Select a service plan. By default, the Lite plan is set.

To provision an instance that only includes the Monitor component, select the plan Graduated Tier.

To provision an instance that include the Monitor and the Secure (Workload Protection) components, select the plan Graduated Tier - Sysdig Secure + Monitor.

For more information about Workload Protection, see the [IBM Cloud Security and Compliance Center Workload Protection documentation.](https://cloud.ibm.com/docs/workload-protection)

For more information about the service plans, see [Service plans](https://cloud.ibm.com/docs/monitoring?topic=monitoring-pricing_planspricing_plans).
8. Enter a service name.
9. Select a resource group. By default, the Default resource group is set.
10. Set on automatic collection of platform metrics by clicking Enable.
11. Click Create.



After you provision an instance,



* The Observability dashboard opens.
* A service ID is automatically created. You can use this service ID to get the access key for your instance. The name of the service ID has the following format: {InstanceName}-key-admin.



Next, configure a metric source by adding an agent. This agent is responsible for collecting and forwarding metrics to the monitoring instance.





 Provisioning an instance through the CLI
In the new Watson Assistant experience, you can [use unrecognized requests to get action recommendations](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-analytics-recognition).





 18 January 2023 

Algorithm version stability improvement
: As of this date, the Latest (01 Jun 2022) and Beta algorithm versions now have more stable behavior across retrained models, in the presence of overlapping entities (the same entity value belonging to more than one entity type). Previously, when there were overlapping entities definitions, confidences could differ across different retraining. With this improvement, you can expect to see similar confidences. For more information, see [Algorithm version](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-algorithm-version).





 11 January 2023 

Algorithm version 01-Jun-2022 uses enhanced intent detection by default
: As of this date, the algorithm version Latest (01-Jun-2022) now uses enhanced intent detection by default. Before this change, some skills that did not include a specific algorithm version selection inadvertently used Previous (01-Jan-2022). You can notice small changes in intent detection behavior when changes are made to an assistant that previously didn't have enhanced intent detection enabled. For more information, see [Algorithm version](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-algorithm-version).





 6 December 2022 

String.toJson() expression method
: The new [String.toJson()](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-methodsdialog-methods-strings-toJson) method parses a string containing JSON data and returns a JSON object or array.





 12 October 2022 

now(String timezone) method output includes time zone offset
: The string returned from the now(String timezone) method now includes the time zone offset (such as -05:00). The new format is yyyy-MM-dd HH:mm:ss 'GMT'XXX (where XXX represents the time zone offset).
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 sysdig-monitor.platform-metric.publish[] 



[] - This service role is for the IBM Cloud Monitoring Workload Protection service. For more information on this service's functions, see the [IBM Cloud Security and Compliance Center Workload Protection documentation.](https://cloud.ibm.com/docs/workload-protection)

[] - This service role is for internal use only and will not be used in your environment.

The sysdig-monitor.launch.viewer action must be assigned at a minimum to access the instance. If not assigned, an error will be returned.

An additional role of Supertenant Metrics Publisher is a role that you will see in IAM. This role is for internal use only and will not be used in your environment.





 How do I know which access policies are set for me? 

You can see which access policies are set for you in the [IBM Cloud UI](https://cloud.ibm.com/) console.



1. Go to [Access IAM users](https://cloud.ibm.com/iam/users).
2. Click your name in the user table.
3. Click the Access policies tab to see your access policies.
4. Click the Access groups tab to see the access groups where you are a member. Check the policies for each group.
To enable metrics policies, you must be assigned a Manager IAM access policy for your Key Protect instance. To learn how IAM roles map to Key Protect service actions, check out [Service access roles](https://cloud.ibm.com/docs/key-protect?topic=key-protect-manage-accessmanage-access-roles).
2. Enable a metrics policy for your Key Protect instance by running the following curl command.

curl -X PUT "https://<region>.kms.cloud.ibm.com/api/v2/instance/policies?policy=metrics" -H "accept: application/vnd.ibm.kms.policy+json" -H "authorization: Bearer <IAM_token>" -H "bluemix-instance: <instance_ID>" -H "content-type: application/vnd.ibm.kms.policy+json" -d '{
"metadata": {
"collectionType": "application/vnd.ibm.kms.policy+json",
"collectionTotal": 1
},
"resources": [
{
"policy_type": "metrics",
"policy_data": {
"enabled": false
}
}
]
}'
Show more

Replace the variables in the example request according to the following table.





Table 1. Describes the variables that are needed to enable a metrics policy.

 Variable Description 

 region Required. The region abbreviation, such as us-south or eu-gb, that represents the geographic area where your Key Protect instance resides. <br> <br>For more information, see [Regional service endpoints](https://cloud.ibm.com/docs/key-protect?topic=key-protect-regionsservice-endpoints). 
 IAM_token Required. Your IBM Cloud access token. Include the full contents of the IAM token, including the Bearer value, in the curl request.
Working with alerts and events 

In the IBM Cloud Monitoring service, you can configure single alerts and multi-condition alerts to notify about problems that may require attention. When an alert is triggered, you can be notified through 1 or more notification channels. An alert definition can generate multi-channel notifications.

An alert is a notification event that you can use to warn about situations that require attention. Each alert has a severity status. This status informs you about the criticality of the information it reports on.

When you define an alert, you must define the condition that triggers the notification, and one or more notification channels through which you want to be notified. You must also define the severity of the alert, and the type of alert. For more information about how to configure an alert, see [Configuring an alert](https://cloud.ibm.com/docs/monitoring?topic=monitoring-alert-config).

By default, severity is set to warning. You can set the severity of an alert to any of the following values: emergency, alert, critical, error, warning, notice, informational, debug*

You can define an alert on a single metric or a set of metrics to notify of events or issues that you want to monitor.



* You can define a single condition alert.
* You can define a multi-condition alert. The alert threshold is configured by using complex conditions.
* You can define how the data is aggregated.
* You can use boolean logic to define alerts that report on multiple metrics.
* You get a notification when the alert condition is met.
* You can configure multiple notification channels per alert.
* Alerts are executed in 1 minute or less from receipt, with the option to configure the trigger wait time by hour or day.
* For PromQL alerts only, you can optionally configure a 0 minute wait time.



You can enable predefined alerts, modify alerts, and create custom alerts in the web UI and by using the IBM Cloud Monitoring API.

You manage alerts in the Alerts view of the web UI.
Working with alerts 

You can configure alerts to notify about the state of your infrastructure, applications, and IBM Cloud services.

A rule specifies the scope of the data that you want to monitor and be notified if certain conditions occur. Per alert rule, consider the following information:



* You can define 1 or more notification channels.
* You can configure different alert types for each notification channel that you configure for an alert.
* You can configure different triggering conditions for each notification channel that you configure for an alert.



A rule is also the basis of a view. You can see the data that is included by any rule by using it as a view. The two are interchangeable.



 Types of alerts 

You can configure any of the following types of alerts for each notification channel that you configure for an alert:



 Presence alert 

You can configure a presence alert to notify when the number of logs that show in a view is more than what you expect.

For example, you might have a view that shows logs that report payments that are rejected by your service. You can configure a presence alert that triggers an alert when 1 or more logs show in the view.





 Absence alert 

Configure an absence alert to notify when the number of logs that show in a view is less than what you expect, or none.

An absence alert is triggered when the view that has an absence alert attached to it is active. A view is active when the view receives logs within the last 24 hours.

For example, you might have a view that does not get any logs for 2 days. Therefore, this view is not active. You have an absence alert attached to this view that is configured to send a notification after 30 minutes. Because the view is not active, the absence alert is muted and you do not get notifications. To make the view active and get notifications for the absence condition, logs need to start flowing into the view.







 Alert conditions 

You can configure any of the following triggering conditions for each notification channel that you configure for an alert:
* UI
* CLI
* API







 Creating alerts by type 

IBM Cloud® Internet Services has alerts that you can configure to warn you when events occur. Use email or webhooks to receive alerts.

Alerts are available only to Enterprise plans.

For more information about each type of alert, see [Types of alerts](https://cloud.ibm.com/docs/cis?topic=cis-configuring-policies&interface=uinotification-types).



 Creating an email alert using the UI 

You can create email alerts for each alert type by using the UI. For more information about creating email alerts using the console, see [Configuring alert policies](https://cloud.ibm.com/docs/cis?topic=cis-configuring-policies&interface=uiui-configure-alert-policies).





 Creating an email alert using the CLI 

You can create email alerts for each alert type by using the CLI.



 DDoS attack layer 7 command 

Create an alert policy for DDoS attack layer 7 by running the following command:

ibmcloud cis alert-policy ddos-attack-l7-alert-create --name NAME (--emails EMAILS | --webhooks WEBHOOKS) --enabled (true | false) [--description DESCRIPTION] [-i, --instance INSTANCE] [--output FORMAT]

Where:



* --name is the name of the alert policy.
* --description is the description for the alert policy.
* --emails is the email addresses for dispatching an alert notification. For example: --emails test1@cn.ibm.com,test2@cn.ibm.com
* --webhooks is the webhook ID that for dispatching an alert notification. For example: --webhook webhookID1,webhookID2
* --enabled sets whether or not the alert policy is enabled.
* -i, --instance is the instance name or ID. If not set, the context instance specified by ibmcloud cis instance-set INSTANCE is used.
Working with alerts 

You can configure alerts to notify about the activity in your IBM Cloud account and changes in configuration in the account.

A rule specifies the scope of the data that you want to monitor and be notified if certain conditions occur. Per alert rule, consider the following information:



* You can define 1 or more notification channels.
* You can configure different alert types for each notification channel that you configure for an alert.
* You can configure different triggering conditions for each notification channel that you configure for an alert.



A rule is also the basis of a view. You can see the data that is included by any rule by using it as a view. The two are interchangeable.



 Types of alerts 

You can configure any of the following types of alerts for each notification channel that you configure for an alert:



 Presence alert 

You can configure a presence alert to notify when the number of events that show in a view is more than what you expect.

For example, you might have a view that shows events that report payments that are rejected by your service. You can configure a presence alert that triggers an alert when 1 or more events show in the view.





 Absence alert 

Configure an absence alert to notify when the number of events that show in a view is less than what you expect, or none.

An absence alert is triggered when the view that has an absence alert attached to it is active. A view is active when the view receives events within the last 24 hours.

For example, you might have a view that does not get any events for 2 days. Therefore, this view is not active. You have an absence alert attached to this view that is configured to send a notification after 30 minutes. Because the view is not active, the absence alert is muted and you do not get notifications. To make the view active and get notifications for the absence condition, events need to start flowing into the view.







 Alert conditions 

You can configure any of the following triggering conditions for each notification channel that you configure for an alert:
Configuring an alert by using the legacy alert editor 

In the IBM Cloud Monitoring service, you can configure single alerts and multi-condition alerts to notify about problems that may require attention. When an alert is triggered, you can be notified through 1 or more notification channels. An alert definition can generate multi-channel notifications.

An alert is a notification event that you can use to warn about situations that require attention. Each alert has a severity status. This status informs you about the criticality of the information it reports on. [Learn more](https://cloud.ibm.com/docs/monitoring?topic=monitoring-alerts).

Complete the following steps to configure an alert:



 Step 1. Select the alert type 

From the Alert section of the UI, select Add Alert. Then, choose the alert type.





 Step 2. Name the alert 

Enter a name for the alert.

You can also add a description for the alert and the name of an alert group if you want to group you alerts. If an alert group is not specified, the alert will be created in the default group.





 Step 3. Define the severity 

Add a severity level. Valid severity values are info, low, medium, and high.





 Step 4. Define the metric section 



1. Select a metric (entity) that you want to monitor.
2. Define the alert condition. Choose any of the following options:

Option 1: Choose a metric and a single condition such as average, sum, minimum or maximum.

Option 2: Choose Create multi-condition alerts. Enter the condition, for example, min(min(cpu.used.percent)) < = 50 OR max(max(cpu.used.percent)) >= 80.

Zoom

![Multi-condition alert](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/monitor/images/multi-condition-alerts.png)

Multi-condition alert
For example, you might want to be notified if the number of actions that fail are greater than a threshold that you specify.

Through the IBM Log Analysis web UI, you can apply search queries to define the logs that are displayed through a custom view. Then, you can attach an alert to that view to be notified when a condition occurs. A bell icon is displayed with the view to indicate that this view has an alert attached to it.

Consider the following information when you configure alerts:



* You can [attach one alert](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-alerts) per custom view.
* There are 2 types of alerts: presence alert and absence alert.
* You can configure conditions that are based on the number of event lines that meet the search query in the view, on a time frequency, or both.
* The time frequency that is specified as part of the condition defines the reset time of an alert after it is triggered.
* You can define multiple notification channels for an alert. For information about the supported channels, see [Alert notification channels](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-alerts).
* You can [define presets](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-preset_ui). A preset is an alert template that users can attach to any number of views. Service administrators define presets. Notice that when you delete a preset, any alerts that are defined by using this preset are automatically deleted.
* You can enable or disable the feature on alerts that allow a user to mute an alert for a period of time. This feature only applies to email notification channels.
* You can [detach an alert](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-remove_alert_ui) from a view.
* The timestamp that you see in a notification is set to UTC.