vania-janet/multiturn-rag-retrieval-data huggingface dataset:
* Specify 5,-3 to create a segment that includes all observations that occur between five and three timeticks before the anchor point.



TS_SEGMENT_BY_MARKER (ts: AnyTimeSeries, marker: BooleanExpressionType[Any], prevInclusive: Boolean, nextInclusive: Boolean, requiresStartAndEnd: Boolean)
: Output: Same as input
: Segment the time series by a marker point (Boolean expression) where each segment exists between markers.

TS_SEGMENT_BY_DUAL_MARKER (ts: AnyTimeSeries, markerStart: BooleanExpressionType[Any], markerEnd: BooleanExpressionType[Any], startInclusive: Boolean, endInclusive: Boolean, startOnFirst: Boolean, endOnFirst: Boolean)
: Output: Same as input
: Segment the time series by a start and end marker point (Boolean expression) where each segment exists between the start and end markers.





 Temporal join and align functions 

A temporal join produces a single array time series based on the timeticks and values of the two input time series. A temporal align produces two output time series with identical timeticks. In both cases, an interpolator is used to complete missing values.

The output time series contain the concatenated values of the input time series. For example:



* If the first time series is a DoubleTimeSeries with an observation (t1, a1), and the second time series is a DoubleTimeSeries with an observation (t1, b1), the join results in (t1, [a1, b1]).
* If the first time series is a DoubleArrayTimeSeries with an observation (t1, a1, a2), and the second time series is a DoubleArrayTimeSeries with an observation (t1, b1, b2, b3), the join results in (t1, [a1, a2, b1, b2, b3]).



TS_INNER_JOIN(TimeSeries, TimeSeries)
: Output: ArrayTimeSeries
: Temporally inner join two time series of the same type.

TS_LEFT_JOIN(TimeSeries, TimeSeries, InterpolatorType)
Metric Type counter 
 Value Type none 
 Segment By Service instance, Resource 
 Metric Description Total number of rollback statements issued by the client application and total number of rollbacks initiated internally by the database manager. 







 Disaster recovery Log Gap 



Table 4. Disaster recovery Log Gap metric

 Metadata Description 

 Metric Name ibm_db2_dr_log_gap 
 Metric Type gauge 
 Value Type none 
 Segment By Service instance, Resource 
 Metric Description Disaster Recovery Log Gap. 







 High Availability Disaster Recovery Log Gap 



Table 5. High Availability disaster recovery log gap metric

 Metadata Description 

 Metric Name ibm_db2_hadr_log_gap 
 Metric Type gauge 
 Value Type none 
 Segment By Service instance, Resource 
 Metric Description HADR Log Gap monitor element This element shows the recent average of the gap between the PRIMARY_LOG_POS value and STANDBY_LOG_POS value. The gap is measured in number ofbytes. 







 Is disaster recovery connected? 



Table 6. Disaster recovery status metric

 Metadata Description 

 Metric Name ibm_db2_is_dr_connected 
 Metric Type gauge 
 Value Type none 
 Segment By Service instance, Resource 
 Metric Description Availability disaster recovery connection status of the database. 







 Last backup duration in minutes 



Table 7. Last backup time mteric

 Metadata Description 

 Metric Name ibm_db2_last_backup_duration_minutes 
 Metric Type gauge 
 Value Type none 
 Segment By Service instance, Resource 
 Metric Description The duration of the last successful backup. 







 Log Disk wait 



Table 8. Log Disk wait metric

 Metadata Description 

 Metric Name ibm_db2_log_disk_wait 
 Metric Type counter 
 Value Type none 
 Segment By Service instance, Resource 
 Metric Description The number of times agents have to wait for log data to write to disk. 







 Number of Unique ID statements 



Table 9. Number of unique ID statements metric

 Metadata Description 

 Metric Name ibm_db2_uid_stmts 
 Metric Type counter 
 Value Type none 
 Segment By Service instance, Resource 
 Metric Description The number of UPDATE, INSERT, MERGE and DELETE statements that were executed. 







 Number of rows deleted
correlation_ID Optional.The unique identifier that is used to track and correlate transactions. 



A successful GET api/v2/keys/<key_ID_or_alias>/metadata response returns details about your key. The following JSON object shows an example returned value for a standard key.

{
"metadata": {
"collectionType": "application/vnd.ibm.kms.key+json",
"collectionTotal": 1
},
"resources": [
{
"type": "application/vnd.ibm.kms.key+json",
"id": "02fd6835-6001-4482-a892-13bd2085f75d",
"name": "test-standard-key",
"aliases":
"alias-1",
"alias-2"
],
"state": 1,
"expirationDate": "2020-03-15T03:50:12Z",
"extractable": true,
"crn": "crn:v1:bluemix:public:kms:us-south:a/f047b55a3362ac06afad8a3f2f5586ea:12e8c9c2-a162-472d-b7d6-8b9a86b815a6:key:02fd6835-6001-4482-a892-13bd2085f75d",
"imported": false,
"creationDate": "2020-03-12T03:50:12Z",
"createdBy": "...",
"algorithmType": "Deprecated",
"algorithmMetadata": {
"bitLength": "256",
"mode": "Deprecated"
},
"algorithmBitSize": 256,
"algorithmMode": "Deprecated",
* [VPN connection packets output](https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-monitoring-metricsibm_is_vpn_connection_packets_out)
* [VPN connection status](https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-monitoring-metricsibm_is_vpn_connection_status)



These metrics help track the traffic and status for your VPN gateways and can provide insight about peak traffic per minute and overall usage status.

Each metric is composed of the following metadata types:



* Metric name - Name of the collected metric.
* Metric type - Determines whether the metric value is a counter metric or a gauge metric. Each of these metrics is gauge type, which represents a single numerical value that can arbitrarily fluctuate over time.
* Value type - A unit of measurement for a specific metric. Examples include bytes or counts. A value type of none means that the metric value represents individual occurrences of that metric type.
* Segment - How you want IBM Cloud Monitoring to divide and display the monitoring metrics.







 VPN metric definitions 

The following tables define the basic VPN metrics on IBM Cloud for VPC.



 VPN gateway total bytes input 

Bytes per minute received for a VPN gateway



Table 1: VPN gateway total bytes input

 Metadata Description 

 Metric name ibm_is_vpn_gateway_bytes_in 
 Metric type gauge 
 Value type byte 
 Segment by Service instance, Service instance name, VPN name, IBM IS 







 VPN gateway total bytes output 

Bytes sent per minute for a VPN gateway



Table 2: VPN gateway total bytes output

 Metadata Description 

 Metric name ibm_is_vpn_gateway_bytes_out 
 Metric type gauge 
 Value type byte 
 Segment by Service instance, Service instance name, VPN name, IBM IS 







 VPN gateway total packets input 

Packets received per minute for a VPN gateway



Table 3: VPN gateway total packets input

 Metadata Description 

 Metric name ibm_is_vpn_gateway_packets_in 
 Metric type gauge 
 Value type none
For more information, see [Retrieving an instance ID](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-retrieve-instance-ID). 
 correlation_ID The unique identifier that is used to track and correlate transactions. 



A successful GET api/v2/keys/{id}/policies response returns policy details that are associated with your key. The following JSON object shows an example response for a root key that has an existing rotation policy.

{
"metadata": {
"collectionTotal": 1,
"collectionType": "application/vnd.ibm.kms.policy+json"
},
"resources": [
{
"id": "a1769941-9805-4593-b6e6-290e42dd1cb5",
"rotation": {
"interval_month": 1
},
"createdby": "IBMid-503CKNRHR7",
"createdat": "2019-03-06T16:31:05Z",
"updatedby": "IBMid-503CKNRHR7",
"updatedat": "2019-03-06T16:31:05Z"
}
]
}

The interval_month value indicates the key rotation frequency in months.







 Creating a rotation policy 

Create a rotation policy for your root key by making a PUT call to the following endpoint.

https://api.<region>.hs-crypto.cloud.ibm.com:<port>/api/v2/keys/<key_ID>/policies



1. [Retrieve your service and authentication credentials](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-set-up-kms-api).
2. Create a rotation policy for a specified key by running the following cURL command.

curl -X PUT
For example, the following are 4 unique time series:

metric_name{datacenter=”dc-1”, zone=”zone1”} 23
metric_name{datacenter=”dc-2”, zone=”zone1”} 34
metric_name{datacenter=”dc-3”, zone=”zone2”} 43
metric_name{datacenter=”dc-4”, zone=”zone2”} 23

A data-point is the value generated for a time-series at a given point in time. For example: [timestamp]|website_failedRequests:20|region='Asia', customer_ID='abc'.

The number of time-series you are ingesting from the different sources are measured hourly and contribute to TIME_SERIES_HOURS pricing concept.





 Checking the metrics that are collected per agent 

In IBM Cloud Monitoring, you can monitor your monitoring agent by using the dashboard template monitoring agent Health & Status that is available in the dashboard templates available out-of-the-box. In this dashboard, you can see the number of monitoring agents that are deployed and connected to the instance, check the version of the monitoring agents, and find out how many metrics per host the agent is collecting.

In this dashboard, the panel TimeSeries Usage provides the number of time-series that are collected from each category (Prometheus, JMX, StatsD, Prometheus Remote Write and Platform Metrics). This panel uses the query sum(sysdig_ts_usage)by(metric_category) that you can also run in PromQL Explorer, in your dashboards or for alerts.

In case you need to investigate which applications or services are contributing more to the Prometheus time-series, you can use the metric scrape_series_added. This metric represents the number of time series scraped and ingested from the monitoring agent via Prometheus and includes several labels to facilitate the analysis such as kube_cluster_name, kube_namespace_name, kube_workload_name or container_name.
* Classic metrics have been replaced with context-explicit metrics. See [Mapping Classic Metrics with Context-Specific PromQL Metrics](https://docs.sysdig.com/en/docs/sysdig-monitor/metrics-dictionary/metrics-and-label-mapping/mapping-classic-metrics-with-context-specific-promql-metrics/mapping-classic-metrics-with-context-specific-promql-metrics).
* Troubleshooting metrics are collected at 10s intervals and stored for 4 days for program metrics, connection-level network metrics, and Kubernetes troubleshooting metrics. See [Troubleshooting Metrics](https://docs.sysdig.com/en/docs/sysdig-monitor/metrics/troubleshooting-metrics/troubleshooting-metrics).
* You can use PromQL to query the metrics in the time series database.



* You can run queries that handle larger volumes of data and perform faster.
* You can reference the scope of a dashboard in PromQL queries by using $__scope. See [Scope Variable in PromQL Dashboard](https://docs.sysdig.com/en/docs/release-notes/enhanced-metric-store/scope-variable-in-promql-dashboard).



* You can view the latest value of an entity in number panels, tables, histograms, and toplist panels. See [Single Stat Panels Displays Latest Value](https://docs.sysdig.com/en/docs/release-notes/enhanced-metric-store/single-stat-panels-displays-latest-value)
* In the Overview section, you can view the latest data as opposed to an aggregated value for widgets over the time window that is selected.
* You can display metrics that are scraped at different intervals on the same graph.
--------------------



 Time-series 

You can collect metrics from a number of platforms, orchestrators, and a wide range of applications such as Prometheus, JMX, StatsD, Kubernetes, and other application stacks, that are available in the IBM Cloud®, outside the IBM Cloud, or on-prem. You can also add more metrics by creating custom metrics and adding integrations.

A time-series is a series of data-points ordered by time. It is a unique combination of a metric name and label key-value pairs. For example: website_failedRequest |region='Asia', customer_ID='abc'.

The same metric name can produce multiple time-series when the metric and label values differ.

For example, the following are 4 unique time series:

metric_name{datacenter=”dc-1”, zone=”zone1”} 23
metric_name{datacenter=”dc-2”, zone=”zone1”} 34
metric_name{datacenter=”dc-3”, zone=”zone2”} 43
metric_name{datacenter=”dc-4”, zone=”zone2”} 23

A data-point is the value generated for a time-series at a given point in time. For example: [timestamp]|website_failedRequests:20|region='Asia', customer_ID='abc'.

For example, 3K unique time-series in 10 seconds is 18K data-points per minute. Or, 3K unique time-series in a minute would be 3K data-points per minute.

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.
Viewing metrics 

Through the Monitoring UI, you can analyze data in the Advisor tab, the Explore tab, and in the Dashboard tab. You monitor the data through metric views and dashboards.

Consider the following information when monitoring your data:



* In the Explorer tab, you can monitor individual metrics.
* In the Advisor tab, you can monitor Kubernetes or host level metrics.

This tab is only available for users that belong to a team that has access to monitor Kubernetes or host level metrics.
* In the Dashboard tab, you can monitor through panels predefined dashboards or custom ones and get a specialized insight into network data, application data, topology, services, hosts, and containers. A panel displays a metric or group of metrics in a dashboard.



For each metric view and dashboard, you can define the scope of the data, how to aggregate data, and what time and group filters to apply to the data. For more information, see [Managing panels](https://cloud.ibm.com/docs/monitoring?topic=monitoring-panels).

You can configure a dashboard as the default entry point for a team, unifying a team's experience, and allowing users to focus their immediate attention on the most relevant information for them.



 Advisor 

In the Advisor tab, you can monitor and troubleshoot the health, risk, and capacity of hosts and Kubernetes clusters.

Zoom

![Advisor tab](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/advisor-tab.png)

Advisor tab



* Data is refreshed every 10 minutes.
* Metrics are prioritized by event count and severity.
* For more information, see [Advisor](https://docs.sysdig.com/en/docs/sysdig-monitor/advisor/).



In the Advisor section, you can choose to monitor your Kubernetes clusters by cluster, by node, by namespace, or by workload.
Table 12: Average wait time metric metadata

 Metadata Description 

 Metric Name ibm_functions_wait_time 
 Metric Type gauge 
 Value Type second 
 Segment By Service instance, ibm_functions_namespace, ibm_functions_package, ibm_functions_action 









 Attributes for segmentation 



 Global attributes 

The following attributes are available for segmenting all the metrics previously listed.



Table 13: Global attributes

 Attribute Attribute name Attribute description 

 Cloud Type ibm_ctype The cloud type, which is always set to bluemix. 
 Location ibm_location The region of the monitored resource. Possible regions include us-south, eu-de, or au-syd. 
 Scope ibm_scope The scope is the account, organization, or space GUID associated with this metric. 







 Additional attributes 

The following attributes are available for segmenting one or more attributes as described in the previous reference. See the [individual metrics](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-monitor-functionsmetrics-by-plan) for segmentation options.



Table 14: Additional attributes

 Attribute Attribute name Attribute description 

 Service instance ibm_service_instance The service instance segment identifies the instance that the metric is associated with. 
 ibm_functions_action ibm_functions_action The action name. 
 ibm_functions_namespace ibm_functions_namespace The namespace that contains the action. 
 ibm_functions_package ibm_functions_package The package that contains the action.
"metrics_monitoring": ],
"region_location": "us-south",
"retention_rule": ],
"single_site_location": null,
"storage_class": "standard",
"timeouts": null
},
"after_unknown": {
"activity_tracking": ],
"archive_rule": ],
"bucket_name": true,
"crn": true,
"expire_rule": ],
"id": true,
"metrics_monitoring": ],
"resource_instance_id": true,
"retention_rule": ],
"s3_endpoint_private": true,
"s3_endpoint_public": true
},
"before_sensitive": false,
"after_sensitive": {
"activity_tracking": ],
"archive_rule": ],
"expire_rule": ],
"metrics_monitoring": ],
"retention_rule": ]
}
}
}
],
"configuration": {
"provider_config": {
"ibm": {
"name": "ibm",
"version_constraint": "1.25.0",
"expressions": {
"ibmcloud_api_key": {
"constant_value": "BYwB2M3TJdDMlCpHaxaWilNHVod05TVkqjIbGqrlm9Iz"
}
}
},
"module.instance:ibm": {
"name": "ibm",
"version_constraint": "1.25.0",
"module_address": "module.instance",
"expressions": {
"ibmcloud_api_key": {
Table 2: Blocks hit rate metric metadata

 Metadata Description 

 Metric Name ibm_databases_for_postgresql_blocks_hit_rate 
 Metric Type gauge 
 Value Type rate 
 Segment By Service instance 







 Blocks read rate 

Blocks read rate



Table 3: Blocks read rate metric metadata

 Metadata Description 

 Metric Name ibm_databases_for_postgresql_blocks_read_rate 
 Metric Type gauge 
 Value Type rate 
 Segment By Service instance 







 Buffers backend rate 

Buffers backend rate



Table 4: Buffers backend rate metric metadata

 Metadata Description 

 Metric Name ibm_databases_for_postgresql_buffers_backend_rate 
 Metric Type gauge 
 Value Type rate 
 Segment By Service instance 







 Buffers checkpoint rate 

Buffers checkpoint rate



Table 5: Buffers checkpoint rate metric metadata

 Metadata Description 

 Metric Name ibm_databases_for_postgresql_buffers_checkpoint_rate 
 Metric Type gauge 
 Value Type rate 
 Segment By Service instance 







 Cache hit ratio 

Cache hit ratio



Table 6: Cache hit ratio metric metadata

 Metadata Description 

 Metric Name ibm_databases_for_postgresql_cache_hit_ratio 
 Metric Type gauge 
 Value Type percent 
 Segment By Service instance 







 Deadlocks count 

Deadlocks count



Table 7: Deadlocks count metric metadata

 Metadata Description 

 Metric Name ibm_databases_for_postgresql_deadlocks_count 
 Metric Type gauge 
 Value Type none 
 Segment By Service instance 







 Deadlocks rate 

Deadlocks rate



Table 8: Deadlocks rate metric metadata

 Metadata Description 

 Metric Name ibm_databases_for_postgresql_deadlocks_rate 
 Metric Type gauge 
 Value Type rate 
 Segment By Service instance 







 Disk read latency mean 

Disk read latency mean



Table 9: Disk read latency mean metric metadata

 Metadata Description 

 Metric Name ibm_databases_for_postgresql_disk_read_latency_mean 
 Metric Type gauge 
 Value Type count 
 Segment By Service instance 







 Disk write latency mean
Due to the sensitivity of the information, when an event is generated as a result of an API call to the KMS, the event doesn't include detailed information about the key. Instead, it includes a correlation ID that you can use to identify the key internally in your cloud environment. The correlation ID is a field that is returned as part of the correlationId field.



 Activity Tracker events for key rotation 

When you initiate activity in the KMS to rotate and manage your root keys, Activity Tracker events are generated. These events are particular to Key Protect, but similar events are generated for Hyper Protect Crypto Services, too.



* When you list keys, a kms.secrets.list event is generated.
* When you rotate a root key, a kms.secrets.rotate event is generated.
* When you manually rewrap a data encryption key (DEK) with new key material, a kms.secrets.rewrap event is generated.
* If you initially imported a root key by using an import token and use the import token to rotate a key, a kms.secrets.ack-rotate event is generated.
* When you retrieve a key, the requestData.keyType field includes the type of key that was retrieved.
* The responseData.keyState field includes the integer that correlates to the state of the key. The integers correlate with these key state values: Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5. For more information about key states, see [Key states and transitions](https://cloud.ibm.com/docs/key-protect?topic=key-protect-key-stateskey-transitions).
* When you authorize the deletion of a key, a kms.secrets.setkeyfordeletion event is generated. The responseData.keyState field includes the integer that correlates to deleted state (5).
* The responseData.totalResources field includes the total number of key versions that are associated with the key.
* The responseData.eventAckData.newKeyVersionId field includes the unique identifier of the latest key version.
Exploring scorecards 

You can use different approaches to add data to your metrics cube.

Scorecards reflect the strategic goals of an organization. Using scorecards, you can identify how well objectives are being met by comparing targets to actual results. Visual status indicators such as traffic lights, trend icons, and colors are used to help you to quickly evaluate performance.

In Planning Analytics with Watson, you can add existing scorecards to your books, and analyze data by selecting different time periods, metrics, and dimensions. You can also create visualizations from scorecards, such as impact diagrams and strategy maps.

You can explore scorecards in Planning Analytics with Watson with the GO_Scorecards sample.



*  [Scorecards](https://www.ibm.com/docs/planning-analytics/2.0.0?topic=es-scorecards)



A scorecard is a collection of performance metrics that are designed to reflect the strategic goals of your business unit or organization.



*  [Metrics cubes](https://www.ibm.com/docs/planning-analytics/2.0.0?topic=es-metrics-cubes)



A metrics cube is a special type of cube that provides the basis for scorecard solutions and scorecard diagrams.