vania-janet/multiturn-rag-retrieval-data huggingface dataset:
"filters": {
"example_filter": "function (doc, req) { ... }"
}
}

See the following example of a filter function:

function(doc, req){
// we need only mail documents
if (doc.type != 'mail'){
return false;
}
// we're interested only in new ones
if (doc.status != 'new'){
return false;
}
return true; // passed!
}



 Changes feed filter functions 

To apply a filter function to the changes feed, include the filter parameter in the _changes query, providing the name of the filter to use.

See the following example of a filter function that is applied to a _changes query by using HTTP:

POST $SERVICE_URL/$DATABASE/_changes?filter=$DDOC/$FILTER_FUNCTION HTTP/1.1

See the following examples of a filter function applied to a _changes query:



* Curl
* Java
* Node
* Python
* Go



curl -X POST "$SERVICE_URL/orders/_changes?filter=example_design_doc/example_filter" -H "Content-Type: application/json" -d '{}'

import com.ibm.cloud.cloudant.v1.Cloudant;
import com.ibm.cloud.cloudant.v1.model.ChangesResult;
import com.ibm.cloud.cloudant.v1.model.PostChangesOptions;

Cloudant service = Cloudant.newInstance();

PostChangesOptions changesOptions = new PostChangesOptions.Builder()
.db("orders")
.filter("example_design_doc/example_filter")
.build();

ChangesResult response =
service.postChanges(changesOptions).execute()
.getResult();

System.out.println(response);

const { CloudantV1 } = require('@ibm-cloud/cloudant');
[Settings icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/admin.png).
2. Select USER PREFERENCES. A new window opens.
3. Select Log Format.
4. Modify the Line Format section to match your requirements. Drag boxes.







 Step 4. Look into a log line 

At any time, you can view each log line in context.

Complete the following steps:



1. Click the Views icon ![Views icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/views.png).
2. Select EVERYTHING or a view.
3. Identify a line in the log that you want to explore.
4. Expand the log line.

Information about line identifiers, tags, and labels is displayed.
5. Click View in Context to see the log line in context of other log lines from that host, app, or both.
6. Click Copy to clipboard to copy the message field to the clipboard.



When you are finished, close the line.





 Step 5. Filter logs 

You can filter logs by log source, application, and log level.



* A source can be a host, a computer, a virtual machine, or a Heroku app.
* An application represents a log file, a program, or a container.
* Examples of log levels are: INFO, DEBUG, ERROR.



Complete the following steps to filter logs:



1. Click the Views icon !
When multiple incidents are triggered and assigned to a user, the SMS notification bundles all notifications for the user into 1 SMS. You can click on an incident link to see more details. You can acknowledge or resolve the incident with a text reply.

The maximum number of characters in a text message is 160. Any text message that has more than 160 characters is truncated.
* PagerDuty publishes the SMS number list so a user can easily validate the sender of the SMS. For more information, see [Notification Phone Numbers](https://support.pagerduty.com/docs/notification-phone-numbers).



Complete the following steps to get an SMS notification when an alert in the Activity Tracker service is triggered:



1. [Create a PagerDuty service](https://support.pagerduty.com/docs/services-and-integrationscreate-a-new-service).
2. [Configure the support user in PagerDuty who will receive SMS alert messages](https://support.pagerduty.com/docs/configuring-a-user-profile).

Make sure a valid mobile number is provided for SMS in the user's Contact Information and that the Notification Rules for the user indicates that an SMS is to be sent to the mobile number. If these items are not configured correctly, the user will not receive SMS messages.
3. [Configure a PagerDuty Escalation Policy](https://support.pagerduty.com/docs/escalation-policiessection-create-an-escalation-policy) and for Notify specify the support user.
4. In the Activity Tracker UI, [configure a PagerDuty alert](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-pagerduty).
Then, click Next.
4. Optional: Customize the evaluations in your scan by editing the default parameters to match your specific use case.
5. Click Next.
6. Select the frequency at which you want to evaluate your attachment.
7. Optional: Configure notifications.



1. If you want to receive notifications, toggle Notify me to On.
2. By default, when notifications are enabled, you are alerted when 15% or more of your controls fail in a single scan. You can change this by adjusting the Threshold percentage.

For example, if you have a profile with 100 controls and you want to be notified if 5 of them fail, you would select 5% as your threshold.
3. Optional: Select specific controls that you want to be notified about. If there are high priority controls that pertain specifically to your job role, you might want to be notified every time that they fail. You can identify up to 15 controls per scan that you can receive individual notifications for. These notifications are sent regardless of whether the threshold identified in the previous step has been met.



1. Click Select control.
2. Select the controls that you want to be notified about by checking the box next to the control.
3. Click Ok.





8. Review your choices and click Create.



When you create your attachment, a scan is scheduled and results are available within 24 hours. When the scan completes your results are available on the Dashboard in the Security and Compliance Center UI.





 Interpreting results 

When your scan completes, the results are available on the Dashboard tab in the Security and Compliance Center UI. The results are provided in both a graphical and detailed format.

When you visit the dashboard, you can see three graphical representations of data that has been aggregated from your scans.

Zoom

![A visual representation of the service dashboard. The concepts are fully explained in the surrounding text.]
Filter the list of consumer groups by using wildcards (*) or a regular expression with forward slash (/) delimiters.

--json (optional)
: Format output in JSON. A maximum of 1000 groups are returned.





 ibmcloud es group-delete 

Delete a consumer group.

ibmcloud es group-delete [--group] GROUP_ID [--force]

Prerequisites: None

Command options:

--group value, -g value
: Consumer group ID

--force, -f (optional)
: Delete group without confirmation.





 ibmcloud es mirroring-topic-selection 

List mirroring topic selection.

ibmcloud es mirroring-topic-selection [--json]

Prerequisites: Mirroring enabled on Event Streams instance. ES plug-in configured to connect to the mirroring target cluster through ibmcloud es init.

Command options:

--json (optional)
: Format output in JSON.





 ibmcloud es mirroring-topic-selection-set 

Replace mirroring topic selection.

ibmcloud es mirroring-topic-selection-set (--select pattern1,pattern2 | --none) [--force]

Prerequisites: Mirroring enabled on Event Streams instance. ES plug-in configured to connect to the mirroring target cluster through ibmcloud es init.

Command options:

--select value
: Selection of topics to mirror as comma-separated regex patterns. Use '.*' to mirror all topics.

--none
: Clear currently selected topics (disable mirroring of topics).

--force
: Optional. Replace mirroring topic selection without confirmation.
[Menu icon](https://cloud.ibm.com/docs-content/v1/content/1e0945ee44f87283927af9404a8f2d077786db0c/icons/icon_hamburger.svg) > Observability.
3. Click Logging.

The list of instances that are available on IBM Cloud is displayed.
4. Select the instance that has the Platform Logs flag set in the region. Then, click Open dashboard.

The Web UI opens.
5. Click the Settings icon ![Configuration icon](https://cloud.ibm.com/docs-content/v1/content/1e0945ee44f87283927af9404a8f2d077786db0c/cloud-foundry-public//images/admin.png).
6. Select Usage > Exclusion rules.
7. Click Add a rule.
8. Enter a description of the rule. For example, you can enter Remove all Cloud Foundry logs from Service Platform logs.
9. In the Sources section, select cloudfoundry.
10. Ensure that the following option is not selected: Preserve these lines for live-tail and alerting

This action ensures that Cloud Foundry logs are not visible to users.
11. Click Save.



Check the query in a custom view by entering the search criteria in the search bar of the Everything view, and validating that the data that is displayed is the data that you want excluded.







 Step 1: Verify that Cloud Foundry app logs are displayed through the logging web UI 

Launch the logging web UI. Then, search for your Cloud Foundry application logs. For more information, see [Filtering logs](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-view_logsview_logs_step5).





 Step 2: Interact with your logs 

Try some of these tasks:
If your Code Engine components share the same name, the filter includes logs from these components. For example,



* The filter _platform:'Code Engine' app:myapp scopes the logs to the myapp application level.
* The filter _platform:'Code Engine' app:myapp-00002 scopes the logs to the myapp-0002 application revision level.
* The filter _platform:'Code Engine' app:myjob scopes the logs to the specific myjob job level.
* The filter _platform:'Code Engine' app:myjob-jobrun-t6m7l scopes the logs to the specific myjob-jobrun-t6m7l job run level.
* The filter _platform:'Code Engine' app:mybuild scopes the logs to the specific mybuild build level.
* The filter _platform:'Code Engine' app:mybuild-run-121212 scopes the logs to the specific mybuild-run-121212 build run level.









 What if my log data is multi-line? 

Every log line must contain log level and timestamp information to appear correctly in IBM Log Analysis. If your log lines span multiple lines, change how you format and output your logs so that they are in a single line. Use JSONL format for your logs with IBM Log Analysis. Your logs must also conform to [limits for IBM Log Analysis logs](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-ingest_limits). After you make log formatting changes, you can take advantage of IBM Log Analysis search and formatting features.







 Viewing app logs from the console 



1. Go to an app that you created and deployed. From the [Projects page on the Code Engine console](https://cloud.ibm.com/codeengine/projects), select your project and then select Applications. Select the app that you want to work with.
2. From your Code Engine app page, you can add logging capabilities. If you do not have an existing Log Analysis instance, click Add logging.
Add prefix filter to connection.

ibmcloud tg prefix-filter-create GATEWAY_ID CONNECTION_ID --prefix PREFIX --action ACTION [--le LE] [--ge GE] [--before BEFORE] [--output json]



 Command options 

GATEWAY_ID
: ID of the gateway the prefix filter is being applied to.

CONNECTION_ID
: ID of the connection the prefix filter is being applied to.

--prefix
: Network prefix that the filter will be applied to.

--action
: Action to take on the specified prefix (permit | deny).

--le
: Optional: Prefix filter will be applied to subnet mask less than or equal to this value.

--ge
: Optional: Prefix filter will be applied to subnet mask greater than or equal to this value.

--before
: Optional: Identifier of the prefix filter this filter should be applied before. If empty, this filter is applied last.

--output
: Optional: Specify output format; Only json is supported.



 Examples 

Add prefix filter for 10.0.250.0/24 to gateway 9f559c43-63f4-4da5-b312-b525a8dce185, connection 6c1bdc19-4adb-4760-8cdc-ef3b74b626f7 with the action permit.

ibmcloud tg pfc 9f559c43-63f4-4da5-b312-b525a8dce185 6c1bdc19-4adb-4760-8cdc-ef3b74b626f7 --prefix 10.0.250.0/24 --action permit

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









 ibmcloud tg prefix-filter-delete 

Delete prefix filter from connection.

ibmcloud tg prefix-filter-delete GATEWAY_ID CONNECTION_ID FILTER_ID [-f, --force]



 Command options 

GATEWAY_ID
ibmcloud tg prefix-filter-create GATEWAY_ID CONNECTION_ID --prefix PREFIX --action ACTION [--le LE] [--ge GE] [--before BEFORE] [--output json]

Where:



* GATEWAY_ID: ID of the gateway that the prefix filter is being applied to.
* CONNECTION_ID: ID of the connection that the prefix filter is being applied to.
* --prefix: Network prefix that the filter will be applied to.
* --action: Action to take on the specified prefix (permit | deny).
* --le: Optional: The prefix filter is applied to a subnet mask less than or equal to this value.
* --ge: Optional: The prefix filter is applied to a subnet mask greater than or equal to this value.
* --before: Optional: Identifier of the prefix filter that this filter should be applied before. If empty, this filter is applied last.
* --output: Optional: Specify if you want the output to display in JSON format.





 Example: Creating a prefix filter 

This is an example of creating a prefix filter from the CLI.

ibmcloud tg pfc 9f559c43-63f4-4da5-b312-b525a8dce185 6c1bdc19-4adb-4760-8cdc-ef3b74b626f7 --prefix 10.0.250.0/24 --action permit --le 32 --ge 28

FilterID b4dbe0a6-c52d-4128-cc32-6f53d86bc82b
Prefix 10.0.250.0/24
Action permit
Ge 28
Le 32
Before
Created 2022-02-28T12:35:09.226-06:00
Updated 2022-02-28T12:35:09.226-06:00





 Deleting prefix filters from the CLI 

To delete prefix filters from the CLI, follow these steps:
* UI
* CLI
* API
* Terraform







 Adding and deleting prefix filters 

Prefix filtering allows you to set an ordered list of prefix route filters for a transit gateway connection.



 Before you begin 

Make sure that you review the following considerations before creating a prefix filter:



* Only users in the account that contains the network can filter prefixes of that network.
* You cannot filter incoming prefixes from another account.
* Prefix filters in the list are processed sequentially. You can modify the order at any time.
* Review the [prefix service limits](https://cloud.ibm.com/docs/transit-gateway?topic=transit-gateway-helpful-tipsservice-limits) for transit gateways.
* For cross-account connections, only the account owner of the respective connection can modify prefix filters. Other accounts can view the connection, but cannot modify filters.
* GRE Tunnel configurations are not implemented as connections. Instead, their routes are learned directly on BGP sessions established over the tunnel. For this reason, prefix filtering is not enabled for these connections.
* If you select Request connection to a network in another account as the connect reach option, you cannot set prefix filters because you are not the network owner of the connection. You must set the prefix filter on the account that owns the connection.
* Prefix filter subnet masks are specific. For example, a rule defined as 10.10.20.0/24 does not match with subnet 10.10.20.0/28 or any other subnet prefix.







 Working with prefix filters in the UI 

You can add prefix filters when you add a new connection. You can also add a filter to an existing connection, or delete them.



 Adding prefix filters to a new connection 

To add a prefix filter to a new connection in the UI, follow these steps:



1. From your browser, open the [IBM Cloud console](https://cloud.ibm.com/login) and log in to your account.
2. Select the Menu icon !
: Optional: Do not show the message of the day or update reminders.

Example:

ibmcloud ks dedicated pool get --pool mypool





 Beta: ibmcloud ks dedicated pool ls 

Virtual Private Cloud

List all dedicated host pools.

ibmcloud ks dedicated pool ls [--output OUTPUT] [-q]

Minimum required permissions
: Viewer platform access role for the cluster in IBM Cloud Kubernetes Service.

Command options:

--output json
: Optional: Prints the command output in JSON format.

--q
: Optional: Do not show the message of the day or update reminders.

Example:

ibmcloud ks dedicated pool ls





 Beta: ibmcloud ks dedicated pool rm 

Virtual Private Cloud

Delete a dedicated host pool. This action can't be undone.

ibmcloud ks dedicated pool rm --pool POOL [-q]

Minimum required permissions
: Administrator platform access role for the cluster in IBM Cloud Kubernetes Service.

Command options:

--pool POOL
: The ID of the dedicated host pool to delete. To list dedicated host pools run ibmcloud ks dedicated pool ls.

--q
: Optional: Do not show the message of the day or update reminders.

Example:

ibmcloud ks dedicated pool rm --pool mypool







 worker commands 

View and modify worker nodes for a cluster.



 Deprecated: ibmcloud ks worker add 

Virtual Private Cloud

Classic infrastructure

Add stand-alone worker nodes to a cluster.

This command is deprecated.
print(json.dumps(response, indent=2))

Show more

service
.message({
assistant_id: '{assistant_id}',
session_id: '{session_id}',
input: {
message_type: 'text',
text: 'Hello',
attachments: [
{
'media_type': 'image/jpeg',
'url': 'https://yourphoto.com/yourphoto.jpeg'
}
]
}
})
.then(res => {
console.log(JSON.stringify(res, null, 2));
})
.catch(err => {
console.log(err);
});
In the Triggered Exclusion Rules section click Add daily rule.
2. Drag the slider to the percentage of the daily usage quota when you want the rule triggered. For example, 50%. If you try to set a percentage where an exclusion rule exists, you will be warned that the existing rule will be replaced.
3. Select the source of the logs you want to exclude.
4. Select the apps you want to exclude.
5. Specify a [query](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-views) to select the log lines you want to exclude.
6. Select if your want to discard all matching log lines until midnight UTC and if you want those log lines preserved for live tail and alerting.

All configured alert recipients will be alerted when the percentage threshold of the daily quota is reached. This behavior cannot be changed.
7. Click Apply to save the exclusion rule.
8. After you configure an exclusion rule, verify that the exclusion rule behaves as you expect.

Check the query in a custom view by entering the search criteria in the search bar of the Everything view, and validating that the data that is displayed is the data that you want excluded.







 Monthly exclusion rules 

To specify a monthly exclusion rule, do the following from the Usage Quotas dialog:

Verify that each exclusion rule that you add behaves as expected. Improper configured exclusion rules can result in storing data not intended for storage.



1. In the Triggered Exclusion Rules section click Add monthly rule.
2. Drag the slider to the percentage of the monthly usage quota when you want the rule triggered. For example, 50%. If you try to set a percentage where an exclusion rule exists, you will be warned that the existing rule will be replaced.
3. Select the source of the logs you want to exclude.
4. Select the apps you want to exclude.
5. Specify a [query](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-views) to select the log lines you want to exclude.
6.
For example, [by using your own mail provider](https://cloud.ibm.com/docs/appid?topic=appid-cd-types), you can reduce the chance that your emails get filtered as spam by replacing the default domain with your own recognizable domain. Additionally, you can gain deeper insights directly from your email provider, such as whether your email was delivered and opened. The email insights can help you identify and solve issues since you can track individual messages and see overall statistics. For more information about the custom mail feature, see [Use Your Own Provider for Mail Sent with IBM Cloud App ID](https://www.ibm.com/blogs/cloud-archive/2018/10/use-ibm-cloud-app-id-and-your-email-provider-to-brand-mails-sent-to-app-users/).
The yaml file is loacated in /opt/draios/etc/.

Complete the following steps to edit the file and apply the changes:



1. Access the dragent.yaml directly. The file is located in /opt/draios/etc/dragent.yaml.
2. Edit the file. Use valid YAML syntax.
3. Restart the agent. Run the following command:

service dragent restart







 Blocking ports 

To block network traffic and metrics from network ports, you must customize the blacklisted_ports section in the dragent.yaml file. You must list the ports from which you want to filter out any data.

Note: Port 53 (DNS) is always blacklisted.

For example, the following sample shows how to set the blacklisted_ports section of a monitoring agent to exclude data coming from ports 6666 and 6379:

blacklisted_ports:
- 6666
- 6379





 Including and excluding metrics 

To filter custom metrics, you must customize the metrics_filter section in the dragent.yaml file. You can specify which metrics to include and which ones to filter out by configuring the include and exclude filtering parameters.

Note: The filtering rule order is set as follows: the first rule that matches a metric is applied.

For example, if the metrics_filter section of a monitoring agent looks as follows:

metrics_filter:
- include: metricA.
- exclude: metricA.
- include: metricB.
- include: haproxy.backend.
- exclude: haproxy.
- exclude: metricC.



* You are configuring the monitoring agent to collect all data from metrics that start with metricA, metricB, and haproxy.backend.
* You are filtering out metrics that start with metricC and other metrics that start with haproxy.
* The entry exclude: metricA. is ignored.







 Changing the log level
event-notifications.rules.delete DELETE /event-notifications/v1/instances/{instanceID}/rules/{ruleID} Manager, Administrator Delete Rule from Event Notifications instance 
 event-notifications.rules.list GET /event-notifications/v1/instances/{instanceID}/rules Manager, Reader, Writer, Administrator, Channel-Editor Get All Rules for Event Notifications instance 
 event-notifications.destinations.create POST /event-notifications/v1/instances/{instanceID}/destinations Manager, Writer, Administrator Create Destination for Event Notifications instance 
 event-notifications.destinations.read GET /event-notifications/v1/instances/{instanceID}/destinations/{destinationID} Manager, Reader, Writer, Administrator, Channel-Editor Get Destination for Event Notifications instance 
 event-notifications.destinations.update PUT /event-notifications/v1/instances/{instanceID}/destinations/{destinationID} Manager, Writer, Administrator Update Destination for Event Notifications instance 
 event-notifications.destinations.delete DELETE /event-notifications/v1/instances/{instanceID}/destinations/{destinationID} Manager, Administrator Delete Destination from Event Notifications instance 
 event-notifications.destinations.list GET /event-notifications/v1/instances/{instanceID}/destinations Manager, Reader, Writer, Administrator, Channel-Editor Get All Destinations for Event Notifications instance 
 event-notifications.subscriptions.create POST /event-notifications/v1/instances/{instanceID}/subscriptions Manager, Writer, Administrator, Channel-Editor Create Subscription for Event Notifications instance 
 event-notifications.subscriptions.read GET /event-notifications/v1/instances/{instanceID}/subscriptions/{subscriptionID} Manager, Reader, Writer, Administrator, Channel-Editor Get Subscription for Event Notifications instance 
 event-notifications.subscriptions.update PUT /event-notifications/v1/instances/{instanceID}/subscriptions/{subscriptionID} Manager, Writer, Administrator, Channel-Editor Update Subscription for Event Notifications instance