vania-janet/multiturn-rag-retrieval-data huggingface dataset:
: The value of the operand property is compared to a list of values.

You can define up to 20 values.

is
: The value of the operand property is compared to a single value.

When using is, only 1 value can be specified.

value
: A string, or an array of strings, to be compared with the operand property to determine whether the metric is routed or not. When the isoperator is used, value must include a single string. When the inoperator is used, value can include multiple strings in an array.

Valid values depend on the operand.

location
: Any location where [IBM Cloud Metrics Routing is available.](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-regions)

service_name
: The CRN service name of an [IBM Cloud service that generates metrics managed through [IBM Cloud Metrics Routing](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-cloud-services-mr)

service_instance, resource_type, and resource
: Values appropriate to an [IBM Cloud service that generates metrics managed through [IBM Cloud Metrics Routing](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-cloud-services-mr)

For example, to define an inclusion filter that defines the condition where only metrics that are generated in the us-south region are routed, looks as follows:

{"operand": "location","operator": "is","values": "us-south"}





 Configure the route 

Run the following command to exclude all metrics received by IBM Cloud Metrics Routing from the us-south region.

ibmcloud metrics-router route create --name drop-route --rules '[{"action": "drop", "inclusion_filters":{"operand": "location","operator": "is","values": "us-south"}]}]'

Where inclusion_filters specifies the filters.
The topic must end with the pattern .?.log, implying any single character between the periods . followed by the log string.

{
"type": "access",
"subjects": [
{
"attributes":
{
"name": "iam_id",
"value": "IBMid-12345"
}
]
}
],
"roles": [
{
"role_id": "crn:v1:bluemix:public:iam::::serviceRole:Writer"
}
],
"resources": [
{
"attributes":
{
"name": "accountId",
"value": "d727f71e99b14534b3267fab8cc9b09a"
},
{
"name": "serviceName",
"value": "messagehub"
},
{
"name": "resourceType",
"operator": "stringEquals"
"value": "topic",
},
{
"name": "resource",
"operator": "stringMatch",
"value": "dev-topic-{{}}-{{?}}.?.log"
}
]
}
]
}
Show more

On the line "value": "dev-topic-{{}}-{{?}}.?.log", the {{}} indicates the character * and the {{?}} indicates the character ?. Therefore, a topic such as dev-topic--?.1.log matches this pattern.







 String comparisons 

The following table lists the string comparison operators that you can use to build access policies with /v2/policies syntax.
: iptables-sync-period 300s
: iptables-min-sync-period 5s
: For Kubernetes versions 1.26 and later: iptables-localhost-nodeports false

Proxy mode
: proxy-mode=iptables

Feature gates
: See [Feature gates](https://cloud.ibm.com/docs/containers?topic=containers-service-settingsfeature-gates)





 Feature gates 

Review the feature gates that are applied to all master and worker node components by default in IBM Cloud Kubernetes Service clusters. These feature gates differ from the ones that are set up in community distributions. In clusters that run version 1.23 or earlier, the IBM Cloud provider version enables Kubernetes APIs and features that are at beta. In version 1.24 and later, most new beta features are disabled by default. Kubernetes alpha features, which are subject to change, are disabled in all versions.

In cluster version 1.26 and later, you can use the kubectl get --raw /metrics | grep kubernetes_feature_enabled command to determine if a feature gate is enabled or disabled.

1.27
: CustomCPUCFSQuotaPeriod=true

1.26
: CustomCPUCFSQuotaPeriod=true

1.25
: CustomCPUCFSQuotaPeriod=true

1.24
: CustomCPUCFSQuotaPeriod=true
: LegacyServiceAccountTokenNoAutoGeneration=false
: PodSecurity=false

1.23
: CustomCPUCFSQuotaPeriod=true
: ServiceLBNodePortControl=false
: PodSecurity=false

1.22
: ServiceLBNodePortControl=false
: CustomCPUCFSQuotaPeriod=true
: IPv6DualStack=false

1.21
: ServiceLoadBalancerClass=true
: CustomCPUCFSQuotaPeriod=true
: IPv6DualStack=false

1.20
lbaas_service = client['Network_LBaaS_LoadBalancer']

try:
 Remove protocol_uuid to retrieve the traffic metrics of the entire load balancer
time_series = lbaas_service.getListenerTimeSeriesData(uuid, metric_name,
time_range, protocol_uuid)

pprint(time_series)
except SoftLayer.SoftLayerAPIError as e:
print("Unable to retrieve the traffic: %s, %s" % (e.faultCode, e.faultString))
Show more







 Layer 7 APIs 



 Create Multiple L7 policies and L7 rules 

import SoftLayer
from pprint import pprint

 UUID of the listener
listener_uuid = "set me"

 Build the rules
l7RuleArray1 = [
{
"type": "HEADER",
"comparisonType": "EQUAL_TO",
"key": "headerkey",
"value": "header_key3",
"invert": 0
},
{
"type": "PATH",
"comparisonType": "STARTS_WITH",
"value": "/secret_key",
"invert": 0
}
]

 Bulk policies and rules configuration
policies_rules = [
{
"l7Policy": {
"name": "traf_test1",
"action": "REDIRECT_URL",
"priority": 101,
"redirectUrl": "http://example.com"
},
"l7Rules": l7RuleArray1
}
]

client = SoftLayer.Client()
networkLBaaSL7PolicyService = client['SoftLayer_Network_LBaaS_L7Policy']

try:
IBM Cloud Monitoring can return only 600 data points at a time per request. As a result, the sampling and value attributes are important. Leaving these two lines out of your request returns an aggregate sum over that time period instead.

If the time range that is specified by from and to is large (for example, 4 days), but you define a sampling and value of 10 seconds, it means that you receive 4 days worth of data that is split into 10-second chunks. This sample is not useful because of the large amount of data that is returned. Specifying a larger chunk is recommended (for example, 1 hour instead of 10 seconds).

curl 
-H 'Authorization: Bearer <API_TOKEN>’ 
-H 'Content-Type: application/json' 
https://us-south.monitoring.cloud.ibm.com/api/data/batch 
-d '{
"requests": [
{
"format": {
"type": "data"
},
"scope": "ibm_is_vpn_server_name = "test-001"",
"metrics": {
"k0": "timestamp",
"v1": "ibm_is_vpn_server_health_status"
},
"time": {
"from": 1624849800000000,
"to": 1624850400000000,
"sampling": 60000000
},
"group": {
"by":
{
"metric": "k0",
"value" : 60000000
}
],
"aggregations": {
"v1": "avg"
},
"groupAggregations": {
"v1": "avg"
}
}
}
]
}'





 Accessing and viewing metrics 

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



1.
Step 2: Define the inclusion filter 

Inclusion filters determine which metrics are routed to the targets.

Inclusion filters are comprised of an operand, operator, and values:

operand
: Operand is the name of the property on which the operator test is run. The following operands are supported: location,service_name,service_instance,resource_type, and resource.

operator
: Two operators are supported: in and is.

in
: The value of the operand property is compared to a list of values.

You can define up to 20 values.

is
: The value of the operand property is compared to a single value.

When using is, only 1 value can be specified.

value
: A string, or an array of strings, to be compared with the operand property to determine whether the metric is routed or not. When the isoperator is used, value must include a single string. When the inoperator is used, value can include multiple strings in an array.

Valid values depend on the operand.

location
: Any location where [IBM Cloud Metrics Routing is available.](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-regions)

service_name
: The CRN service name of an [IBM Cloud service that generates metrics managed through [IBM Cloud Metrics Routing](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-cloud-services-mr)

service_instance, resource_type, and resource
: Values appropriate to an [IBM Cloud service that generates metrics managed through [IBM Cloud Metrics Routing](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-cloud-services-mr)

For example, to define an inclusion filter that defines the condition where only metrics that are generated in the us-south region are routed, looks as follows:

{"operand": "location","operator": "is","values": "us-south"}





 Step 3: Configure the route
Select a [PROXY Protocol](https://cloud.ibm.com/docs/cis?topic=cis-enable-proxy-protocol) if you have a proxy in-line that supports PROXY Protocol (optional). This feature is useful if you are running a service that requires knowledge of the true client IP. In most cases, this setting remains off.
11. Click Create.



Provisioning a Range application incurs additional costs, based on the amount of bandwidth used per application.

Your application is now visible in a tile or table view with the following properties:



* Application name
* Application type
* Edge port
* TLS edge termination
* Proxy protocol
* Origin
* Connections from the past hour (polled every minute)
* Throughput from the past hour (polled every minute)
* The overflow menu (top right corner) has the following options:



* Edit the application
* View metrics for the specified application
* Delete the application





When a Range application is created, it is assigned a unique IPv4 and IPv6 address. These IP addresses are not static and might be subject to change. You can determine the assigned IP address by using DNS. The DNS name always returns the IP addressed assigned to the application.



 Viewing metrics 

Your application is now ready to proxy TCP traffic through CIS (Cloudflare).

Navigate to Metrics > Range to view your number of connections to applications and throughput traffic. The graphs show metrics for up to 10 applications.

To toggle application metrics, use the Chart key or click the Select applications button. To change the Metrics data time frame, use the list menu.







 Range AppTiles 

After creating a few apps, the Security > Range page is populated with applications tiles. The application tiles contain the following information:



* Application name
* Edge port
* Origin and port
* Connections from the past hour (polled every minute)
* Throughput from the past hour (polled every minute)



The application tile also contains an overflow menu in the top corner. The overflow menu provides users the option to:



* Edit the application
After you create a Hyper Protect Crypto Services instance, provision a Monitoring instance, and enable platform metrics, complete the following steps to enable a metrics policy:



1. [Log in to the IBM Cloud console](https://cloud.ibm.com/).
2. Go to Menu > Resource list to view a list of your resources.
3. From your IBM Cloud resource list, select your provisioned instance of Hyper Protect Crypto Services.
4. In the UI of the selected service instance, select the Instance policies tab in the side menu.
5. In the Metrics section, check Send metrics to IBM Cloud Monitoring and click Save policy.







 Enabling metrics for your Hyper Protect Crypto Services instance with the API 

As an instance manager, enable a metrics policy for a Hyper Protect Crypto Services instance by making a PUT call to the following endpoint.

https://api.<region>.hs-crypto.cloud.ibm.com/api/v2/instance/policies?policy=metrics



1. [Retrieve your authentication credentials to work with the API](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-set-up-kms-api).

To enable metrics policies, you must be assigned a Manager IAM role for your Hyper Protect Crypto Services instance. To learn how IAM roles map to Hyper Protect Crypto Services service actions, check out [Service access roles](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-manage-accessservice-access-roles).
2. Enable a metrics policy for your Hyper Protect Crypto Services instance by running the following curl command.
value: 'metrics-router',
operator: 'stringEquals',
};
const policyResources = [
{
attributes: accountIdResourceAttribute, serviceNameResourceAttribute]
},
];
const params = {
type: 'access',
subjects: policySubjects,
roles: policyRoles,
resources: policyResources,
};

iamPolicyManagementService.createPolicy(params)
.then(res => {
examplePolicyId = res.result.id;
console.log(JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
});





 Assigning access to IBM Cloud Metrics Routing by using Terraform 

The following example is for assigning the Viewer role for IBM Cloud Metrics Routing:

Use metrics-router for the service name.

resource "ibm_iam_user_policy" "policy" {
ibm_id = "test@example.com"
roles = ["Viewer"]

resources {
service = "metrics-router"
}
}

For more information, see [ibm_iam_user_policy](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/iam_user_policy).
Once you provision the Monitoring instance, you will need to [enable platform metrics](https://cloud.ibm.com/docs/key-protect?topic=key-protect-operational-metricsconfigure-monitor).





 Enabling metrics for your Key Protect instance with the Console 

After creating a Key Protect instance, provisioning a Monitoring, and enabling platform metrics, complete the following steps to enable a metrics policy:



1. [Log in to the IBM Cloud console](https://cloud.ibm.com/login/).
2. Go to Menu > Resource List to view a list of your resources.
3. From your IBM Cloud resource list, select your provisioned instance of Key Protect.
4. On the Instance policies page, click the Enable button in the metrics policy section.







 Enabling metrics for your Key Protect instance with the API 

As an instance manager, enable a metrics policy for a Key Protect instance by making a PUT call to the following endpoint.

https://<region>.kms.cloud.ibm.com/api/v2/instance/policies?policy=metrics



1. [Retrieve your authentication credentials to work with the API](https://cloud.ibm.com/docs/key-protect?topic=key-protect-set-up-api).

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.
[Menu icon](https://cloud.ibm.com/docs-content/v1/content/1e0945ee44f87283927af9404a8f2d077786db0c/icons/icon_hamburger.svg), and select Resource List.
2. On the Resource List page, click Cloud Foundry apps.
3. Click the app to view its Overview page.
4. Click Autoscaling.
5. In the Policy tab, configure your scaling policy for the app.





 Creating autoscaling policies 

Autoscaling determines when and how your app's capacity is changed according to the autoscaling policy that you define. You can create the autoscaling policies directly by using the console or by importing them from a JSON file.



 Defining autoscaling policies by using the console 



1. Click Create Auto-Scaling policy.
2. Set the Default Instance Limits of your app with a Minimum Instance Count and Maximum Instance Count. These values restrict the scope of your app's resources.
3. Create the Scaling Rules with metric types, thresholds, and adjustment strategies.

The following metric types are supported:



* Memoryused is the amount of memory that is used by your app. Memoryused is specified in MB.
* Memoryutil specifies the memory that is used by the app as a percentage of the total memory quota that is allocated to the app. For example, if the app is using 100 MB, and the memory quota is 200 MB, the memory utilization is 50%.
* Cpu, is the CPU percentage that is used by the app. Cpu is specified in percentage. The CPU utilization can be affected by the total workload of the hosting hardware and other factors.
* Responsetime is the average amount of time that the app takes to respond to a request. Responsetime is specified in ms (milliseconds).
* Throughput is the total number of the requests that are processed in a time period. Throughput is specified in rps (requests per second).
* Custom_metric is your own custom metric.
* CLI







 Routing all metrics 

Route all metrics that are generated in all of the IBM Cloud® Metrics Routing supported locations to multiple destination targets.

A rule consists of 1 or more targets, and 1 or more inclusion filters. For more information on how routes work, see [Understanding how routes work in your account](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-routes&interface=cliroute_behaviour).

Inclusion filters determine which metrics are routed to the targets.

To route all metrics, you must exclude the inclusion_filters definition when you configure the route.



 Prereqs 



1. [Install the IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-install-ibmcloud-cli).
2. [Install the IBM Cloud Metrics Routing CLI](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-metrics-router-cli-config).
3. Ensure you have the [correct IAM permissions to configure IBM Cloud Metrics Routing routes.](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-iam)
4. Log in to IBM Cloud. Run the following command: [ibmcloud login](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_cliibmcloud_login).







 Step 1: Get the target details 

Complete the following steps:



1. Run the following command to list all targets. Copy the target ID of the one where you want to route the metrics.

ibmcloud metrics-router target ls
2. Run the following command to get the details of the targets where you want to route the metrics:

ibmcloud metrics-router target get --target <TARGET_ID>







 Step 2: Configure the route
Follow these [instructions](https://cloud.ibm.com/docs/loadbalancer-service?topic=loadbalancer-service-monitoring-metricsenable-metrics-monitoring) to enable metrics monitoring.

You can edit your existing configuration by using the Protocols, Server Instances, and Health Checks tabs. For example, the Protocols tab can be used to define additional application ports or to customize the SSL cipher lists when there is an existing HTTPS protocol.

After every configuration change, the load balancer goes into an UPDATE PENDING state. In this state, datapath traffic is not affected, but no further updates can be made to that load balancer. Click the refresh button next to the load balancer's state to check the latest status.

You can also use the Layer7 tab to configure [Layer 7 load balancing](https://cloud.ibm.com/docs/loadbalancer-service?topic=loadbalancer-service-layer-7-load-balancing).
For more information, see [Configuring account settings](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-settings).
* You can use private and public endpoints to manage targets. For more information about the list of endpoints that are available, see [Endpoints](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-endpoints).



* You can manage targets from the private network by using an API endpoint with the following format: https://private.REGION.metrics-router.cloud.ibm.com
* You can manage targets from the public network by using an API endpoint with the following format: https://REGION.metrics-router.cloud.ibm.com
* You can disable the public endpoints by updating the account settings. For more information, see [Enforcing private endpoints](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-endpoints-enforce-private).



* The target name must be 1000 characters or less and cannot include any special characters other than space, dash -, dot ., underscore _, and colon :.

The name must not include any personal identifying information (PII).







 Target types 

You can configure any of the following target types:



Table 1. List of targets

 Target Type Scope Description 

 IBM Cloud Monitoring sysdig-monitor Account Use this target to consolidate time series data to the region of your primary operations. 







 IAM Access 

To manage targets, ensure you have the [correct IAM permissions to configure IBM Cloud Metrics Routing](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-iam).

To allow the IBM Cloud Metrics Routing service to send metrics to your Monitoring destinations, you must have a service to service authorization configured in the account where the target is located.
Kubernetes v1.16.13 v1.16.14 See the [Kubernetes release notes](https://github.com/kubernetes/kubernetes/releases/tag/v1.16.14). 
 Kubernetes add-on resizer 1.8.5 1.8.11 See the [Kubernetes add-on resizer release notes](https://github.com/kubernetes/autoscaler/releases/tag/addon-resizer-1.8.11). 
 Kubernetes configuration N/A N/A The Kubernetes API server audit policy configuration is updated to include auditing of all API groups except apiregistration.k8s.io and coordination.k8s.io. 
 Kubernetes Metrics Server v0.3.6 v0.3.7 See the [Kubernetes Metrics Server release notes](https://github.com/kubernetes-sigs/metrics-server/releases/tag/v0.3.7). 
 Kubernetes NodeLocal DNS cache configuration N/A N/A Increased the pod termination grace period. 







 Change log for worker node fix pack 1.16.14_1544, released 17 August 2020 

The following table shows the changes that are in the worker node fix pack 1.16.14_1544. Worker node patch updates can be applied by updating, reloading (in classic infrastructure), or replacing (in VPC infrastructure) the worker node.



Changes since version 1.16.13_1542

 Component Previous Current Description 

 Kubernetes v1.16.13 v1.16.14 See the [Kubernetes change logs](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.16.mdv11614).
[Install the IBM Cloud Metrics Routing CLI](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-metrics-router-cli-config).
3. Log in to IBM Cloud. Run the following command: [ibmcloud login](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_cliibmcloud_login)







 Creating a route by using the CLI 

Use this command to create a route.

Route names are unique in the account.

ibmcloud metrics-router route create --name ROUTE_NAME ( --rules RULES | --file RULES_DEFINITION_JSON_FILE ) [--output FORMAT] [--force]



 Command options 

--name ROUTE_NAME
: The name to be given to the route.

Do not include any personal identifying information (PII) in any resource names.

--rules RULES
: JSON formatted rules array definition in single quotes that define how metrics are routed. For more information, see [Defining routing rules](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-route_rules_definitions).

--file RULES_DEFINITION_JSON_FILE
: JSON file that includes the routing rules that define how metrics are routed. For more information, see [Defining routing rules](https://cloud.ibm.com/docs/metrics-router?topic=metrics-router-route_rules_definitions).

--output FORMAT
: Currently supported format is JSON. If specified, output will be returned in JSON format. If JSON is not specified, output will be returned in a tabular format.

help | --help | -h
: List options available for the command.





 Example 

The following is an example using the ibmcloud metrics-router route create command.

This example shows an example successful route creation.