vania-janet/multiturn-rag-retrieval-data huggingface dataset:
[Custom time report](https://cloud.ibm.com/docs-content/v1/content/006fd22ab2811b7d19804c763a00568b3da4c03a/CDN/images/metrics-custom-time-report.png)

Figure 1: Custom time report

The maximum number of days that you can view metrics reports is 90 days. The latest date that you can view metrics reports is 3 days ago. Start and end time for the historical time range is fixed.





 Most recent metrics report 

You can view the overall metric reports for a recent time. Select Most recent from the Time frame list on the CDN Overview Report page. Here you can find the total Bandwidth and Hits, as well as a graphical representation of Bandwidth and Hits.

Zoom

![Most recent report](https://cloud.ibm.com/docs-content/v1/content/006fd22ab2811b7d19804c763a00568b3da4c03a/CDN/images/metrics-most-recent-report.png)

Figure 2: Most recent report

You can view data for the past 48 hours only.







 Metrics report for domain mapping 

You can view the metrics reports for domain mapping by opening the Overview page. To open the Overview page, click the domain-mapping hostname on the All CDNs page.



 Historical metrics report 

You can see the Total Bandwidth and Total Hits for the selected time period (default is the last 30 days) on the Overview page. Other items, such as Last 90/7/1 days and Custom timeframe are available in the Time frame list.

Zoom

![Custom time overview](https://cloud.ibm.com/docs-content/v1/content/006fd22ab2811b7d19804c763a00568b3da4c03a/CDN/images/metrics-custom-time-overview.png)

Figure 3: Custom time overview
Using PromQL 

Use the Prometheus Query Language (PromQL) to select and aggregate time-series metric data for Prometheus.

For more information about PromQL, see the [open-source documentation](https://prometheus.io/docs/prometheus/latest/querying/basics/).



 Creating a PromQL query 

Create a PromQL query for a metric in an existing dashboard.



1. From the [Monitoring dashboard](https://cloud.ibm.com/observe/monitoring), click Open dashboard for your service instance.
2. From Dashboards, select the dashboard that contains the metrics that you want to query.
3. For one panel in the dashboard, click the edit icon.
4. Select the PromQL query type.
5. In the query form, enter Display data, such as the query name and the timeseries name.
6. Enter your PromQL Query, such as avg(avg_over_time(host_cpu_used_percent[$__interval])) by(kubernetes_cluster_name). Specify the following fields in your query:



* Metric: Specify the metric that you want to query, such as host_cpu_used_percent. Note: The generated values on the table are the latest metric.
* Time range: Specify a time range or time interval, such as 5m. To use the time range that is selected in the UI, specify $__range. To use the time interval that is based on the time range that is selected in the UI, specify $__interval. The $__range and $__interval variables in this query automatically update as the time range is changed in the UI. For more information, see [Applying dashboard scopes to PromQL queries](https://cloud.ibm.com/docs/monitoring?topic=monitoring-promqlpromql-scope).
* Segmentation: Choose a value to segment the aggregated PromQL data, such as kubernetes_cluster_name.



7. Click Run Query.
8.
Select the Enable Platform Metrics checkbox. You must select this to receive metrics from your load balancer.
7. Click Create. You are taken back to the monitoring metrics home page.



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 monitoring metrics, follow these steps:



1. 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 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. Two main metrics in the dashboard are shown: Active Connections, and Connection Rate. To modify parameters and segment your metrics by load balancer ID or listener port, you must create a custom dashboard.

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







 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 only seeing traffic that comes 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 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.
Do not give multiple monitoring instances the same name.
5. Optionally, select a resource group. A resource group organizes account resources in customizable groupings. Any account resource that is managed by using IBM Cloud Identity and Access Management (IAM) access control belongs to a resource group within your account.

If you do not have any pre-configured resource groups, or have no reason to share this resource selectively, use the default selection.

If your account has multiple resource groups, you can choose which group has access to this IBM Cloud Monitoring instance. By using this selective access, metrics can be available to some resource groups and not to others.
6. Check the Enable Platform Metrics checkbox. You must select this option to receive metrics from your VPN gateway.
7. Click Create. You are taken back to the monitoring metrics home page.



Within a few minutes, your new monitoring instance is displayed with several configurations. You might have to refresh your browser to see it.





 Accessing and viewing metrics 

To view metrics for a specific flow log, follow these steps:



1. From the Flow logs for VPC page, click the Actions menu ![Actions icon](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/icons/action-menu-icon.svg) associated with the flow log. Then, select Monitoring from the menu.
2. Launch the Monitoring dashboard.
},
{
"query": "20, 40)",
"label": "20 - 39"
},
{
"query": "40, 60)",
"label": "40 - 59"
},
{
"query": "60, 80)",
"label": "60 - 79"
},
{
"query": "80, 100000)",
"label": "80+"
}
] ! Shows a pair comparison chart where each row lists a state and each column shows a vehicle speed. Where TN and 80 plus MPH meet is highlighted in orange to show an anomaly.Shows a pair comparison chart where each row lists a state and each column shows a vehicle speed_. Where TN and 80 plus MPH meet is highlighted in orange to show an anomaly_.] ! ! ! Shows a map of the US with data related to the selected state shown.Shows a map of the US with data related to the selected state shown_.]
Show more
6. Click Apply.7. Click Save, and then click Close.8. Click your collection tile to return to the collection and continue your analysis.<-- </ol> -->The changes to the number ranges for vehicle speeds introduce more opportunities for relationships or anomalies in the data to be highlighted.Zoom!]Figure 9. Results after changed number range<-- </section "id="section-cm-change-range" "> --><-- </section "id="section-cm-facets-network" "> --><-- <section "id="section-cm-map" "> --> Showing results in a map visualization Facets that represent geographical locations can be shown in a map visualization. For example, if you have a collection with a US states facet, you might want to display data per state from a visualization that enables users to select each state from a map.Zoom!]Figure 10. Results shown in a map visualizationA US Map is available by default.
Example comparison calculation for infrastructure selections (attempts to account for the impacting factors): Seconds to load 1 billion records might help comparisons of read from storage <br> <br>(for example, divide Phase 1 data load in seconds by initial records) Total records parsed per hour during Query Execution might help comparisons of calculations performed by CPU <br> <br>(for example, multiply query executions per hour by records selected) Total records parsed per minute during complex query might help comparisons of calculations performed by CPU <br> <br>(for example, divide records selected by runtime of complex query seconds, then multiply by 60) 



Additional SAP Notes regarding SAP BW/4HANA and sizing for scale-out:



* [SAP Note 2296290 - New Sizing Report for SAP BW/4HANA](https://launchpad.support.sap.com//notes/2296290)
* [SAP Note 2347382 - SAP BW/4HANA – General Information (Installation, SAP HANA, security corrections…)](https://launchpad.support.sap.com//notes/2347382)
* [SAP Note 2561976 - SAPBWNews SAP BW/4HANA 1.0 SP 08](https://launchpad.support.sap.com//notes/2561976)
* [SAP Note 2908965 - SAPBWNews SAP BW/4HANA 2.0 SP 06](https://launchpad.support.sap.com//notes/0002908965)
* [SAP Note 2671297 - SAP BW on SAP HANA and SAP BW/4HANA in a SAP HANA, active/active read-enabled option environment](https://launchpad.support.sap.com//notes/2671297)
For example, you might use this variable to adapt the time range for different operations, such as the rate or average over time.



For example, say you use the following query to return the CPU used percent for all the hosts:

avg_over_time(host_cpu_used_percent[$__interval])

This query uses the $__interval variable, which scopes data to the dynamic time interval based on the time range that is selected in the dashboard UI.

You can also specify your own variables in the query to scope its output. For example, to further scope the previous query to a specific label such as hostname, you must first [define a scope variable at the dashboard level](https://docs.sysdig.com/en/about-the-dashboard-ui.htmlUUID-7a55e06a-7e2a-8dcb-7dd3-6d7eb39c9784_section-idm23184387629055). Then, you can specify that variable in the query:

avg_over_time(host_cpu_used_percent{host_name=$hostname}[$__interval])





 Using labels 

When you run PromQL queries, the data is returned with a minimum set of labels. To add more labels, such as a cluster name, use a vector matching operation.

Prometheus returns information metrics that have a value of 1 with several labels.Joining the labels of an information metric with a non-information metric can provide useful insights, such as the value of a metric across an application. You can use a vector matching operation, which is similar to an SQL join, to add the information labels to your metric data.



 Example: Filtering an application metric by cluster 

In this example, a metric that is returned by an application is filtered by cluster. The PromQL aggregates a value of that metric for a cluster by having only one cluster selected in the scope.

sum (myapp_metric * on (container_id) kube_pod_container_info{cluster=$cluster})

This query:
"value" : 60000000
}
],
"aggregations": {
"v1": "avg"
},
"groupAggregations": {
"v1": "avg"
}
}
}
]
}'





 Accessing and viewing metrics 

To access metrics for a specific VPN server, follow these steps:



1. Navigate to the [VPNs for VPC](https://cloud.ibm.com/vpc-ext/network/vpngateways) page and click the Client-to-site servers tab.
2. Click the name of the VPN server to display its details.
3. Click the Monitoring tab to view the VPN server metrics.
4. Configure the history, dates, and time zone to generate the output you are looking for.



You can download the metrics or launch monitoring from your VPN dashboard by selecting Launch monitoring.
Once the experiment completes running,



1. Click on Pipeline comparison to view how the top pipelines compare.
2. Sort the leaderboard by a different metric by clicking on the various column headers.
3. Click a pipeline to view more detail about the metrics and performance.

Sorting by different metrics may not change the leaderboard rankings as the dataset used in this tutorial is very simple and used only for your understanding of the concepts. With other datasets, the rank may vary.
4. Next to the model with Rank 1 when sorted by Accuracy, click on Save as > Model.
5. Check the details of the model and click Create.
6. From the received notification, click View in project.



The accuracy of the model will be improved in the later part of the tutorial.





 Step 4: Deploy and test your model 

In this section, you will deploy the saved model and test the deployed model,



1. Under the created model, click on Promote to deployment space.
2. Under Target Space, select Create a new deployment space. You use deployment spaces to deploy models and manage your deployments.



1. Set the Name to iris_deployment_space.
2. Select the Object Storage service you use in previous steps and the machine-learning-tutorial service from the respective dropdowns.
3. Click Create.



3. Click on Promote.
4. From the received notification, navigate to the deployment space.
5. Under the deployment space, click on the name of the model you just created.
6. Click the New deployment button.
7. Select Online as the Deployment type, provide iris_deployment as the name and then click Create.
8. Under Deployments tab, once the status changes to Deployed, Click on the Name of the new web service to check the details.





 Test the deployed model 



1. Under Test tab of your deployment, click on JSON input icon next to Enter input data and provide the JSONbelow as input.

{
"input_data": [{
"matching_results": 10,
"aggregations": ...]
},
{
"key": "mint",
"matching_results": 25,
"aggregations": ...] ! ! ! ! ! ! ! ! ! !
...
}
Show more
<-- </section "id="section-trend-example" "> --><-- </section "id="section-trend" "> --><-- <section "id="section-topic" "> --> topic Detects how much the frequency of a keyword value deviates from the expected average for the specified time period. This aggregation type does not use data from previous time periods. It calculates an index by using the averages of frequency counts of other keyword values for the specified time period.<-- <section "id="section-topic-syntax" "> --> Syntax topic(facet:{aggregation},time_segments:{aggregation})
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.
You are billed based on the number of time series hours collected during a billing cycle.



 Sources of time-series 

For TIME_SERIES_HOURS, there are 4 sources of custom metrics:



* Custom metrics created by agents such as Prometheus, StatsD, JMX, and AppChecks.



* Prometheus metrics are collected from Prometheus endpoints. By default any pod with prometheus.io/scrape: true is included.
* StatsD metrics are collected automatically without setting up a collector.
* JMX metrics can be collected by configuring the target and the JMX MBeans names.
* AppChecks are small scripts run by the agent to collect metrics.



* IBM Cloud platform metrics. These are metrics generated by IBM Cloud services for your service instances. This also includes usage of the default IBM Cloud Monitoring dashboards available in the IBM Cloud Monitoring console under Dashboard > Dashboard Templates > IBM.
* Metrics sent using Prometheus remote write to IBM Cloud Monitoring through Prometheus servers.
* Metrics forwarded to external systems using Kafka or an Event Streams topic. The sysdig_datastream_ts_usage metric returns the number of time series exported using metric streaming.
For example, you can display the metrics for a particular VPN server.
* You can also set a segment to compare metrics across the scope that you define. For example, you can look at the VPN server health status for a particular VPN server that is segmented by server name.



6. Click Save.

By default, the dashboard is named "blank dashboard". You can change the name by selecting Dashboards from the sidebar and clicking the pencil icon next to the name.



To return to the default IBM Cloud Monitoring dashboard at any time, select Dashboards > Default Dashboards > IBM > VPC VPN SERVER.







 Working with IBM Cloud Monitoring by using APIs 

You can also work with the IBM Cloud Monitoring instance by using metric query APIs. You might want to use APIs if you need raw data points or want to consume your metrics from a command-line interface rather than using the IBM Cloud Monitoring dashboard.

After you create your IBM Cloud Monitoring instance, you must collect the following two pieces of information.



* The Monitor API token
* The endpoint of your IBM Cloud Monitoring instance



To collect this information and work with your IBM Cloud Monitoring instance by using metric query API, follow these steps:



1. Access the [Monitoring home page](https://cloud.ibm.com/observe/monitoring).
2. Click Open Dashboard next to the instance that you want to work with.
3. After you see the IBM Cloud Monitoring dashboard, select your Account Profile icon on the sidebar and select Settings. You now see your account settings.
4. Your Monitor API token is an alphanumeric string that is located in the Sysdig Monitor API Token field. Click the Copy button to copy the token to your clipboard.

Do not share this API token. Anyone who has this API token has full access to your metrics.
5. The endpoint of your IBM Cloud Monitoring instance is per region. For example, if your IBM Cloud Monitoring instance exists in us-south, then its endpoint is:

https://us-south.monitoring.cloud.ibm.com/api/data/batch
Instances might have different service plans, and consequently different data retention periods that determine the number of days that you have data available for search though the web UI. You can only monitor events within your retention period. Different [service plans](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-service_plan) have different retention periods.



 Monitoring global and location-based events 

Events can be classified as global or location-based. The type of event determines where you monitor events. [Learn more](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-event_types).

Global events are captured and made available through the IBM Cloud Activity Tracker instance that is configured in Frankfurt (eu-de).

Location-based events are captured and made available through the IBM Cloud Activity Tracker instance that is configured in the same location where the service is available.





 Monitoring events through the default view 

The default view is named EVERYTHING.

As soon as you open the web UI in a location, this is the view that you see.

All events in your instance are displayed through this view.

To learn how to view events through this view, see [Viewing events](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-view_eventsview_events_step1).





 Monitoring events through custom views 

You might want to monitor a set of events in your account. To anayze a subset of events, you can create custom views.

You create a custom view by applying a search query that defines what events to display through the view. [Learn more](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-view_eventsview_events_step2).

You can also do any of the following tasks:



* [Attach an alert](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-alerts) to a custom view.
* [Export data](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-export) from a custom view.
Running Telegraf Telegraf Data Collector Service







 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. Open the browser of your choice.
2. Open the following link: 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.
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. 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 three load balancer metrics: ibm_is_load_balancer_active_connections, ibm_is_load_balancer_connection_rate, and ibm_is_load_balancer_throughput.



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 that you defined. For example, you can look at throughput 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.