vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Navigate to the [metrics monitoring portal](https://cloud.ibm.com/observe/monitoring).
2. Click Open Dashboard next to the service name of the monitoring instance you want to work with. The dashboard displays.
3. On the left sidebar, select Dashboards. Then, click the green + sign in the panel.
4. Select Blank dashboard, then select the type of visual representation you want.

IBM Cloud Monitoring offers eight different visualizations for your dashboard. Read the description for each visualization, then choose the one that best meets your requirements.

Line ("View trends over time") is the easiest and most basic option. It is also the most frequently selected option. The examples in this topic show a Line-based visualization.
5. Configure your custom dashboard.



* In the Metrics field, enter ibm_is to display the two load balancer metrics: ibm_is_load_balancer_active_connections and ibm_is_load_balancer_connection_rate.

You can monitor listener port traffic by enabling the ibm_is_load_balancer_listener_port metric.
* You can choose a scope to display in your dashboard by clicking Override Dashboard Scope. For example, you can display the metrics for a particular load balancer.
* You can also set a segment to compare metrics across the scope you have defined. For example, you can look at Active connections for a particular load balancer segmented by listener port.



6. Click Save for your new custom dashboard to be accessible.

By default, the dashboard begins with the name "blank dashboard". You can change the name by selecting Dashboards from the sidebar, then clicking the Pencil icon next to the name.



To return to the default dashboard at any time, select Dashboards > Default Dashboards > IBM > Load Balancer Monitoring Metrics.





 Working with IBM Cloud Monitoring using the APIs 

You can also work with the monitoring instance by using the metric query APIs. You might want to do this if you need raw data points or want to consume your metrics from a command-line interface rather than using the dashboard.
If you have deployed monitoring agents on your systems, and those systems are not impacted by the regional failure, you may choose to redirect metrics to other instances of monitoring in a different region. To redirect metric data, complete the following steps:



1. [Provision a monitoring instance](https://cloud.ibm.com/docs/monitoring?topic=monitoring-provision)
2. Reconfigure the monitoring agent of each system: Change the access key and ingestion endpoints in the agent configuration. [Learn more](https://cloud.ibm.com/docs/monitoring?topic=monitoring-config_agent).
3. Define IAM permissions to work with the new monitoring instance.

Using access groups to manage permissions to work with a monitoring instance, reduces the amount of work that you might have to do to set the correct policies and users to work with a new instance. Information about access groups is global and not region based.
4. Launch the monitoring instance and import the alerts, notifications, teams, and dashboards to monitor your applications and systems.
Deployments in Multi-zone Regions (MZRs) - eu-gb, eu-de, us-east, us-south, jp-tok, au-syd - have their metrics in the corresponding region.

If you have deployments that are in Single-zone Region (SZR) che01 then your logs are forwarded to an IBM Cloud Monitoring instance in another region. You need to provision IBM Cloud Monitoring instances in the region where your metrics are forwarded to. Metrics for deployments in che01 go to jp-tok.





 Available Metrics 



Table 1: Available Metrics Reference Table

 Metric Name 

 [IO utilization in percent 5-minute average](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-monitoringibm_messages_for_rabbitmq_disk_io_utilization_percent_average_5m) 
 [IO utilization in percent 15-minute average](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-monitoringibm_messages_for_rabbitmq_disk_io_utilization_percent_average_15m) 
 [IO utilization in percent 30-minute average](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-monitoringibm_messages_for_rabbitmq_disk_io_utilization_percent_average_30m) 
 [IO utilization in percent 60-minute average](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-monitoringibm_messages_for_rabbitmq_disk_io_utilization_percent_average_60m) 
 [IOPS read and write total count for an instance.](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-monitoringibm_messages_for_rabbitmq_disk_iops_read_write_total) 
 [Max allowed memory for an instance.]
See [example](https://cloud.ibm.com/docs/account?topic=account-iam-condition-properties&interface=uidateTimeLessThanOrEquals). 



When you define a condition with a GreaterThanOrEquals operator, always include a condition with a LessThanOrEquals operator. This way, there is a clearly defined duration, whether it is temporary, recurring all day, or recurring with custom hours. For more information, see [Condition patterns](https://cloud.ibm.com/docs/account?topic=account-iam-time-based&interface=uicondition-patterns).

For date and time operators, policies support the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format hh:mm:ss±hh:mm. The time zone offset refers to Coordinated Universal Time.

Use the following variables to represent the key that specifies the client’s environment attribute, which the policy evaluates against. Each key supports a discrete set of operators.



Table 7. Variable notation for time-based conditions.

 Variable name Description Supported operations 

 environment.attributes.current_time The client's current time. timeGreaterThanOrEquals, timeLessThanOrEquals 
 environment.attributes.current_date_time The client's current date and time. dateTimeGreaterThanOrEquals, dateTimeLessThanOrEquals 
 environment.attributes.day_of_week The client's current day of the week. dayOfWeekAnyOf, dayOfWeekEquals 





 Example: dayOfWeekAnyOf, timeGreaterThanOrEquals, and timeLessThanOrEquals 

The days of the week that are specified in this example map to Monday, Tuesday, Wednesday, and Thursday. The timeGreaterThanOrEquals value indicates that the condition begins granting access at 9 AM in the time zone UTC-5.
Within a few minutes, your new monitoring instance is displayed with several configurations. You might have to refresh your browser to see it.





 Working with the IBM Cloud Monitoring dashboard 

To view and work with your metrics, follow these steps:



1. Navigate to the [metrics monitoring portal](https://cloud.ibm.com/observe/monitoring).
2. Click View IBM Cloud Monitoring next to the service name of the monitoring instance that you want to work with.

The first time that you access your monitoring instance, several windows display as part of the internal setup. Leave these selections with their default entries, and click through the pages until you reach the main page.
3. Select Dashboards on the left sidebar to open the IBM Load Balancer Monitoring Metrics dashboard. Then, click Default Dashboards > IBM > Load Balancer Monitoring Metrics. The default dashboard is not editable.
4. Eleven main metrics in the dashboard are shown: Throughput, Active Connections, Connection Rate, Request Count, Request Latency, HTTP_2xx Response Count, HTTP_3xx Response Count, HTTP_4xx Response Count, HTTP_5xx Response Count, Total Members and Active Members. You must create a custom dashboard to modify parameters and segment of your metrics by load balancer ID or listener port.

You can choose what time window you'd like to see your metrics displayed for, using the bar at the end.







 Creating a custom metrics dashboard 

You can create your own dashboard to customize your monitoring metrics, such as viewing information about particular load balancers, or seeing traffic that comes only through particular listeners.

To customize your dashboard, follow these steps:



1. Navigate to the [metrics monitoring portal](https://cloud.ibm.com/observe/monitoring).
2. Click View IBM Cloud Monitoring next to the service name of the monitoring instance you want to work with. The dashboard displays.
3. On the left sidebar, select Dashboards. Then, click the green + sign in the panel.
4. Select Blank dashboard, then select the type of visual representation you want.

IBM Cloud Monitoring offers eight different visualizations for your dashboard.
The first (facet) aggregation must be one of the following types of aggregations:<-- <ul> --> * term * group_by<-- </ul> -->The relevancy parameter from the term or group_by aggregation is ignored.The second (time_segments) aggregation must be an aggregation of type timeslice.You can alternatively include the following parameters:<-- <ul> --> * show_estimated_matching_results:true: Indicates whether to include the estimated_matching_results information in the result. This field contains the number of documents that are estimated to have the term in the specified field or meet the conditions in the specified aggregation for the specified time interval in the set of documents that are returned by the query. * show_total_matching_documents:true: Indicates whether to include the total_matching_documents information in the result. This field contains the number of documents in the collection where the term is mentioned in the specified field or the condition is met.<-- </ul> -->Only one topic aggregation can be used per query request, and it cannot be combined with any other aggregations.<-- </section "id="section-topic-syntax" "> --><-- <section "id="section-topic-example" "> --> Example {
"query: like",
"aggregation": "topic( facet: term(flavor), time_segments: timeslice(date, 1month), show_estimated_matching_results: true, show_total_matching_documents: true )"
}
With the same data set and aggregation as is used in the term aggregation example, the results might look as follows.Notice that the topic_indicator values are different from the trend_indicator values that are returned by the trend aggregation. While both are calculated from the actual and expected frequencies, they differ because their expected frequencies are computed differently. In the trend aggregation, the expected frequency of the feedback submissions for vanilla-flavored ice cream in May is computed from the number of feedback submissions that were received for vanilla previously (from Jan to Apr) and the total number of feedback submissions received for all of the flavors in May.
sudo systemctl is-active sap-metrics-collector







 Verifying data collection 

After the installation completes and the service is started, it can take time for the IMCS begins collecting metrics. Wait at least 2 minutes after the installation before you expect full and accurate metrics.



1. Run the following curl command for your localhost address to see your metrics:

curl http://localhost:18181/sap/metrics

<metrics>
<metric category="config" context="vm" device-id="" last-refresh="1607451781" refresh-interval="0" type="string" unit="none">
<name>Data Provider Version</name>
<value>1.3</value>
</metric>
<metric category="config" context="host" device-id="" last-refresh="1607451781" refresh-interval="0" type="string" unit="none">
<name>Cloud Provider</name>
<value>IBM Cloud</value>
</metric>
<metric category="config" context="vm" device-id="" last-refresh="1607451781" refresh-interval="0" type="string" unit="none">
<name>Instance Type</name>
<value>bx2-8x32</value>
</metric>
<metric category="config" context="host" device-id="" last-refresh="1607451781" refresh-interval="0" type="string" unit="none">
<name>Virtualization Solution</name>
<value>KVM</value>
</metric>
.
.
.
</metrics>



You might experience a delay before your data is available.





 Troubleshooting 

Use the following troubleshooting tips for IMCS.



 Uninstalling the Metrics Collector 



1.
* HTTPS
* TCP



Specifying a listener port filters the metric by that listener. For example, if you don't specify a port, and the metric is Throughput, then IBM Cloud Monitoring reports the total throughput for all listener protocols. However, if the listener protocol is HTTP on port 80, then IBM Cloud Monitoring reports the throughput for HTTP traffic only.

You can also specify the time interval over which to report your metrics. Time intervals that are supported in the IBM Cloud Monitoring dashboard are:



* 10 seconds
* 1 minute
* 10 minutes
* 1 hour
* 6 hours
* 2 weeks
* Custom



The number of data points you can report is roughly the same for each time interval. For example, if the interval is 1 hour, then each data point represents 5 minutes of data. If the interval is 2 weeks, then each data point represents 24 hours of data.







 Enabling metrics monitoring 

To receive monitoring metrics, you must set up your IBM Cloud Monitoring instance.

To do so, follow these steps:



1. Navigate to the [metrics monitoring portal](https://cloud.ibm.com/observe/monitoring), then click Create a monitoring instance.
2. Select a region for your IBM Cloud Monitoring instance.

If you do not have an existing load balancer, see [Using an elastic IBM Cloud Load Balancer for server load balancing](https://cloud.ibm.com/docs/loadbalancer-service?topic=loadbalancer-service-creating-and-using-an-ibm-cloud-load-balancer-for-elastic-server-load-balancing) to provision one.

The region must match the location of your existing load balancer.
3. Choose your pricing plan.

Pricing plan details are explained in the selection window. Select the plan that best meets your requirements.
4. Provide a service name for your instance. It can be any name that you want, and has no impact on functionality.

Do not create multiple IBM Cloud Monitoring instances with the same name.
5. Optionally, select a resource group.
Metering integration 

IBM Cloud® supports multiple models for aggregating product usage, and with Partner Center, you can measure various metrics for services with usage-based pricing plans. You can measure metrics on the created instances, and submit those measures to the metering service. The submitted usage is aggregated into different buckets (instance, resource group, and account) based on the model that you choose. The aggregation and rating models for all metrics in a plan are contained in the metering and rating definition documents for the plan.

The following list describes the expectations for tracking and submitting usage:



* Third-party providers don't need to submit usage for free plans or monthly subscription plans.
* For metered plans, all providers must submit usage hourly, and usage for Lite plans must submitted every 15 minutes to 1 hour.
* You're responsible for automating the usage submission, including automation that retries failure responses. To automate the usage submission, you can create cron jobs, or other similar job schedulers. IBM Cloud doesn't provide a retry function for failed submissions. For more information, see the status codes and actions table in [Submitting usage records](https://cloud.ibm.com/docs/sell?topic=sell-submitusageusage-records).



Zoom

![A diagram that shows third-party providers how the IBM Cloud Usage Metering service works when they create a cron job, or other similar job scheduler to automate usage submission.](https://cloud.ibm.com/docs-content/v1/content/ff5860bfede49db3197c4bbba7f7123769bdc068/sell/images/Usage_metering_role.svg)

Figure 1. Understanding the function of the IBM Cloud Usage Metering service for automating the submission of usage data.



* You must submit usage records for the current month by the second day of the following month.
* IBM Cloud is configured for a monthly billing cycle and time is represented in Coordinated Universal Time (UTC).
* You must test usage submission and validate your results to describe how the monthly billing cycle is calculated.
* You can pass the file metrics.json to extract metrics by using -d, for example, -d @metrics.json.



The following sample shows a template for the metrics.json file:

{
"start": "Number: seconds",
"end": "Number: seconds",
"last": "Number: last available seconds",
"metrics": [
{
"id": "<>",
"aggregations": {}
}
],
"sampling": "Number: <10|60|600|3600|86400>",
"dataSourceType": "<host|container>",
"filter": "<>",
"paging": {
"from": "Number",
"to": "Number"
}
}
Show more





 Metrics dictionary 

To see the pre-defefined metrics by Sysdig, see [Metrics dictionary](https://docs.sysdig.com/en/metrics-dictionary.html).

To see the pre-defined metrics that are defined by IBM Cloud services that are Sysdig-enabled, see [Cloud services](https://cloud.ibm.com/docs/monitoring?topic=monitoring-cloud_services).





 Data aggregation 

To learn about data aggregation, see [Data Aggregation](https://docs.sysdig.com/en/data-aggregation.html).





 Sample: Extract platform metrics 

This example shows how to extract platform metrics from Cloud Foundry in us-south for the last 24 hours.

curl -X POST https://us-south.monitoring.cloud.ibm.com/api/data -H "Authorization: Bearer $AUTH_TOKEN" -H "IBMInstanceID: $GUID" -H "content-type: application/json" -d @metrics.json

The following example of the metrics.json file shows how to configure the file to extract data by instance ID, app container age, and number of bytes the app is using:

{
You can also use it to find out whether you have platform metrics set up on your account for the registry region that you're targeting.

If you want to view the platform metrics for IBM Cloud Container Registry, you must opt in by running the ibmcloud cr platform-metrics command.

You must specify one of the command options or the command fails with an error.

ibmcloud cr platform-metrics --enable | --disable | --status

For more information about the platform metrics that you can view in Container Registry, see [Monitoring metrics for IBM Cloud Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_monitor).



 Prerequisites 



* You must set up IBM Cloud Monitoring, see [Getting started tutorial for IBM Cloud Monitoring](https://cloud.ibm.com/docs/monitoring?topic=monitoring-getting-started).
* [Enable your IBM Cloud Monitoring instance for platform metrics](https://cloud.ibm.com/docs/monitoring?topic=monitoring-platform_metrics_enabling).
* To find out about the required permissions, see [Access roles for configuring Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-iamaccess_roles_configure).







 Command options 

--enable
: (Optional) Enable the setting for your account.

--disable
: (Optional) Disable the setting for your account.

--status
: (Optional) Display whether the setting is enabled for your account.





 Example 

Enable platform metrics for your account.

ibmcloud cr platform-metrics --enable







 ibmcloud cr private-only 

Prevent image pulls or pushes over public network connections for your account for the registry region that you're targeting. You must specify one of the command options or the command fails with an error.

ibmcloud cr private-only --enable | --disable | --status



 Prerequisites
Extracting metrics from an instance by using the Monitoring Python client 

You can extract metrics from an IBM Cloud Monitoring instance through REST API operations that you can run by using a Python client or by using a cURL command.



 Get metrics by using a Python client 

To learn how to use the Python client, see [Using the Python client](https://cloud.ibm.com/docs/monitoring?topic=monitoring-python-client).

The following code shows the structure of a Python script that you can use to retrieve metrics from a Monitoring instance:

 Reference the Python client
from sdcclient import IbmAuthHelper, SdMonitorClient

 Add the monitoring instance information that is required for authentication
URL = <MONITORING-ENDPOINT>
APIKEY = <IAM_APIKEY>
GUID = <GUID>
ibm_headers = IbmAuthHelper.get_headers(URL, APIKEY, GUID)

 Instantiate the Python client
sdclient = SdMonitorClient(sdc_url=URL, custom_headers=ibm_headers)

 Specify the ID for keys, and ID with aggregation for values
metrics = [
{"id": "cpu.used.percent", "aggregations": {"time": "timeAvg", "group": "avg"}}
]

 Add a data filter or set to None if you want to see "everything"
filter = None

 Time window:
 - for "from A to B": start is equal to A, end is equal to B (expressed in seconds)
 - for "last X seconds": start is equal to -X, end is equal to 0
start = -600
end = 0

 Sampling time:
 - for time series: sampling is equal to the "width" of each data point (expressed in seconds)
 - for aggregated data (similar to bar charts, pie charts, tables, etc.): sampling is equal to 0
sampling = 60

 Load data
ok, res = sdclient.get_data(metrics, start, end, sampling, filter=filter)
if ok:
Target the [region](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_overviewregistry_regions) where you want to enable metrics by running the [ibmcloud cr region-set](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_region_set) command. Replace <region> with the name of the [region](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_overviewregistry_regions_local).

ibmcloud cr region-set <region>
4. Check whether metrics are already enabled for your account by running the following [ibmcloud cr platform-metrics](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregcliic_cr_platform_metrics) command. This command also displays the registry that the result applies to.

ibmcloud cr platform-metrics --status
5. Enable platform metrics by running the following ibmcloud cr platform-metrics command. It can take up to 30 minutes for your metrics to become effective.

ibmcloud cr platform-metrics --enable

If you want to target a different [region](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_overviewregistry_regions), run the [ibmcloud cr region-set](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_region_set) command.







 Locations of platform metrics 

You can configure one monitoring instance in each region to collect platform metrics for IBM Cloud Container Registry. The following tables list the locations where metrics can be collected if you enable collection of Container Registry service metrics in that region.



Table 1. The automatic collection of Container Registry service metrics in Americas locations

 Locations in Americas Platform metrics available 

 Dallas (us-south) Yes 
 Sao Paulo (br-sao) Yes 
 Toronto (ca-tor) Yes 





Table 2.