vania-janet/multiturn-rag-retrieval-data huggingface dataset:
[Endpoints panel](https://cloud.ibm.com/docs-content/v1/content/fcee192e52fce225776143bc6ccc3a023d1d193a/databases-for-etcd/images/getting-started-endpoints-panel.png)

Figure 1. Endpoints panel

First, download (or save the contents of) the TLS certificate to a file and name the file with the TLS certificate name. Either save it to the location where you plan on running the etcdctl commands or remember where the file is saved so you can provide its full path to the environment variable.

Then, use the values in the Environment and Arguments fields to set up your environment so etcdctl can connect and issue commands on your deployment.

export ETCDCTL_API=3
export ETCDCTL_CACERT=b179a2b4-b76a-11e9-b9ae-c61492e0d24a
export ETCDCTL_ENDPOINTS=https://156ed317-3aea-4732-a8fd-349c2bb9d39c.bkvfu0nd0m8k95k94ujg.databases.appdomain.cloud:31220
export ETCDCTL_USER=root:password

You should now be able to use etcdctl to issue commands to your deployment, for example:

$ etcdctl put foo bar
OK
$ etcdctl get foo
foo
bar





 Step 2: Use etcd 

A good way to get familiar with etcd is to play around with some of its features. This tutorial has a few quick examples on prefixes, transactions, leases, and watchers.

Expanded examples and features can be found in the [etcd demo](https://etcd.io/docs/v3.3.12/demo/), and more general information on using etcd is in [Interacting with etcd](https://etcd.io/docs/v3.3.12/dev-guide/interacting_v3/).



 Prefixes
User roles 

You can define user roles to manage data access at the user level on your IBM® Db2® Warehouse on Cloud instance. Users can be added to roles that reflect their job functions and you can enforce data access policies based on their respective roles.

User roles can easily be implemented through a series of SQL statements. You can use the SQL editor of the web console. For example, you can create a role for your data science team by running the following SQL statement:

CREATE ROLE DATASCIENCE

Then, if you want to give your data scientists access to sales data, run the following statement:

GRANT SELECT ON TABLE SALESDATA TO ROLE DATASCIENCE

You can repeat the previous statement for all of the tables that you want your data science team to be able to access.

Next, add your data science team to the DATASCIENCE role. Assuming that you have two data scientists, Alice and Bob who exist as users of the database, you can then add them to the DATASCIENCE role by running the following SQL statement:

GRANT ROLE DATASCIENCE TO USER ALICE, USER BOB

Alice and Bob are now able to work on all of the data that is accessible to the DATASCIENCE role.

For more information about user roles in Db2 Warehouse on Cloud, see [User-defined user roles](https://www.ibm.com/support/knowledgecenter/en/SS6NHC/com.ibm.swg.im.dashdb.security.doc/doc/udef_user_roles.html).
Define custom entities 

Teach Discovery about terms that are significant to your business by creating an entity extractor.

An entity extractor is a machine learning model that recognizes and tags terms that you indicate are significant to your business need or use case. When you create an entity extractor, you get to decide the content and scope of information to find and extract. Your extractor can extract any of the following things:



* Terms that represent objects, such as vegetable names from cooking recipes or the make and model of cars from accident reports
* Attributes of objects, such as color and quantity
* Short phrases, such as 107 deaths in France, revenue of $343M



An entity type is a type of thing. To create an entity extractor, you define a set of entity types that you care about. You then annotate a collection of your own documents by finding terms or phrases that represent the type of information you want to extract and labeling them as entity examples.

After you define entity types and label entity examples, you can generate a machine learning model. The model learns about the information that you care about based on how the terms or phrases that you label as examples are referenced in sentences. The model learns from the context and language with which the entity examples are referenced in the training data.

After the machine learning model is trained well enough to recognize your entity types, you can publish the model as an enrichment and apply the enrichment to new documents. The custom entity extractor enrichment recognizes and tags new mentions of the same and similar terms as occurrences of the entity types that you care about.

For more information about how to use the entity extractor to add domain customization to your AI applications, see the [Entity Extractor Feature in Watson Discovery v2](https://community.ibm.com/community/user/watsonai/blogs/ananya-poddar/2022/06/09/entity-extraction-in-watson-discovery-v2) blog post.

Discovery also has a built-in Entities enrichment that can be applied directly to your collection. It doesn't require any training to recognize commonly-known proper nouns.
You must determine the autoscaling values to set for your app, which depends on what the implementation of your app can handle with its assigned CPU and memory resources.







 Optimize latency and throughput 

To optimize your application latency and throughput, understand the pros and cons of some common models and best practices to configure the container concurrency.

Use the setting for concurrency to specify the maximum number of requests that can be processed concurrently per instance when you create or update an application. From the Code Engine console, set the concurrency value in the Runtime section. With the CLI, use the --concurrency option (alias --cn) with the app create or app update command.



Examples concurrency in Code Engine applications

 Model Pros Cons 

 Single-concurrency, --cn=1 Choose the single concurrency configuration when the application serves a memory-intensive or CPU-intensive workload because only one request enters the application instance at a time and therefore gets the full amount of CPU and memory that is configured for the instance. Applications that use the single-concurrency model scale-out quickly. The scale-out might introduce additional latency and lower throughput because it's more expensive to create a new application instance than to reuse an existing one. Do not choose this model if requests can be processed concurrently and latency is a critical aspect of the application. 
 High-concurrency, --cn=100 (default) or higher Choose this configuration if your application serves a high volume of HTTP request or response workloads that are not CPU-intensive or memory-intensive and can wait for resources. You might choose this concurrency configuration for an API back end that reads and writes data on create, retrieve, update, and delete operations to a remote database. While some requests wait on I/O, other requests can be processed without impacting overall latency and throughput. This setting is not optimal when concurrent requests compete for CPU, memory, or I/O because competition for resources can delay execution and impact latency and throughput negatively. 
 Optimal concurrency, --cn=N Choose the optimal concurrency configuration if you know the amount of resources that are required for a single request to meet the response time that you want for your application.
Managing presets programmatically 

You can use the Configuration REST API to manage presets programmatically.

Presets are templates that can be used to quickly configure alerts. Presets can also be configured through the [UI](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-preset_ui).



* You can use the POST method to create preset.
* You can use the GET method to get information about presets configured in the instance.
* You can use the PUT method to modify a preset.
* You can use the DELETE method to delete a preset.



Before you run any automated tasks, consider doing a back up of your account configuration resources. You can use the back up to restore the resources, to the state before any change is applied, if you encounter problems. See [Export the configuration of resources in an auditing instance](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-reuse_resource_definitionsrrd_export_config).



 API methods 

The following table outlines the actions that you can run to configure presets programmatically:



Table 1. Preset configuration API endpoints

 Action Request URL 

 Create a preset POST <ENDPOINT>/v1/config/presetalert 
 Get all configured presets GET <ENDPOINT>/v1/config/presetalert 
 Get information about a specific preset GET <ENDPOINT>/v1/config/presetalert/<PRESET_ID> 
 Modify an existing preset PUT <ENDPOINT>/v1/config/presetalert/<PRESET_ID> 
 Delete a preset DELETE <ENDPOINT>/v1/config/presetalert/<PRESET_ID> 



Where <PRESET_ID> is the ID of a preset.





 Endpoint URL
Managing presets programmatically 

You can use the Configuration REST API to manage presets programmatically.

Presets are templates that can be used to quickly configure alerts. Presets can also be configured through the [UI](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-preset_ui).



* You can use the POST method to create preset.
* You can use the GET method to get information about presets configured in the instance.
* You can use the PUT method to modify a preset.
* You can use the DELETE method to delete a preset.



Before you run any automated tasks, consider doing a back up of your account configuration resources. You can use the back up to restore the resources, to the state before any change is applied, if you encounter problems. See [Export the configuration of resources in a logging instance](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-reuse_resource_definitionsexport_config_res).



 API methods 

The following table outlines the actions that you can run to configure presets programmatically:



Table 1. Preset configuration API endpoints

 Action Request URL 

 Create a preset POST <ENDPOINT>/v1/config/presetalert 
 Get all configured presets GET <ENDPOINT>/v1/config/presetalert 
 Get information about a specific preset GET <ENDPOINT>/v1/config/presetalert/<PRESET_ID> 
 Modify an existing preset PUT <ENDPOINT>/v1/config/presetalert/<PRESET_ID> 
 Delete a preset DELETE <ENDPOINT>/v1/config/presetalert/<PRESET_ID> 



Where <PRESET_ID> is the ID of a preset.





 Endpoint URL
Assigning access to Security and Compliance Center 

As an account owner, you are automatically assigned Administrator platform access to Security and Compliance Center so that you can further assign roles and customize access policies for others.



 Assigning access for an account 



1. [Create an access group](https://cloud.ibm.com/docs/account?topic=account-groupscreate_ag) for the type of users that you want to give access to and add those users to the group. For example, you might have a team of compliance specialists that all need the same level of access.
2. After you create a group and add users, go to the Manage > Access (IAM) > Access groups page of the console.
3. Select the name of the group that you want to assign access to.
4. Click Access > Assign access.
5. Assign the following permissions by selecting a service and reviewing the available roles and actions that are available for each option.



Table. Minimum required permissions

 Service Minimum required permissions 

 Security and Compliance Center Administrator 
 Cloud Object Storage Reader 
 Event Notifications Reader 



To review the full list of which permissions are required for each action and assign more granular access to Security and Compliance Center, see [IAM actions for Security and Compliance Center](https://cloud.ibm.com/docs/security-compliance?topic=security-compliance-access-management).
6. Click Add.
7. Review your selections and click Assign.







 Assigning access for an Enterprise 

If you are working in an enterprise account, you must also assign permissions for the enterprise service.

You can assign Administrator access for the service, or you can create a custom role. When you assign permissions for an enterprise you can give access to the full enterprise or specific accounts or account groups. To learn more about recommendations for enterprises, see [Best practices for enterprises](https://cloud.ibm.com/docs/security-compliance?topic=security-compliance-best-practicesbp-enterprise).



1. In the Console, go to Manage > Access (IAM) > Roles and click Create.
2.
* Ingestion endpoints of type syslog-tcp (syslog-a) and syslog-udp (syslog-u) are not currently supported on the Cloud Service Endpoint (CSE) network.
* The logging web UI is not currently supported on the CSE network.



If you have an additional firewall set up, or you have customized the firewall settings in your IBM Cloud infrastructure, you must allow outgoing network traffic to the IBM Log Analysis service on TCP port 443 and TCP port 80 in your firewall. The API endpoint is required for logging agent authentication.

If you have an additional firewall set up, or you have customized the firewall settings in your IBM Cloud infrastructure, and you want to configure the logging agent to connect to the logging instance through the private network, open a support ticket to request the private IP addresses that you must enable in your firewall. For information about opening an IBM support ticket, see [Getting support](https://cloud.ibm.com/docs/get-support).





 Define the notification strategy 

In a logging instance, you define views to analyze the data. Then, you can configure 1 or more alerts per view to notify of an abnormal situation. [Learn more](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-alerts).

You can choose to be notified by using an absence alert that is triggered when no data is available.

Define an absence alert to be notified when inactivity in an application or service is identified. Notice that absence alerts require data in the view within the past 24 hours for the alert to be active.

You can choose to be notified by using a presence alert that is triggered when more log lines than expected are present.

You will want to define a presence alert to be notified of exceptional situations in your applications and services that require immediate attention.

You can configure multiple notification channels. Valid channels are: email, Slack, PagerDuty, Webhook



Table 4. Guidance for notification channel

 Channel Guidance 

 email Email is a traditional communication method that you can use to notify 1 or more users.
* Management Pack for NSX for vSphere
* VMware Aria Operations Federation Management pack
* Management Pack for Hybrid Cloud Extension (HCX™)



Other management packs can be installed by the client. For more information, see [VMware Solution Exchange](https://marketplace.vmware.com/vsx/?contentType=1&listingStyle=table).



 Management Pack for VMware vCenter Server 

This default Management Pack extends the functions of VMware Aria Operations to vCenter to enable the collection of objects, metrics, and alerts.





 Management Pack for VMware Aria Operations for Logs 

This default Management Pack extends the functions of VMware Aria Operations to VMware Aria Operations for Logs to enable the monitoring of the VMware Aria Operations for Logs environment and the integration of events and alerts from VMware Aria Operations for Logs into VMware Aria Operations.





 Management Pack for vSAN 

VMware Aria Operations Management Pack for vSAN enables vSAN specific dashboards to evaluate, manage, and optimize the performance of vSAN objects and vSAN-enabled objects.





 VMware SDDC Health Management Pack 

The VMware SDDC Health Management Pack for VMware Aria Operations monitors the SDDC management stack. Color-coded metrics are provided for health and efficiency of different components present as part of the SDDC management stack. With the dashboards in the VMware SDDC Health Management Pack, you can monitor the following components of the vCenter Server instance and management tools:



* VMware Aria Operations Manager
* NSX for vSphere and VMware NSX-T
* VMware vSAN
* VMware Aria Operations for Logs
* vCenter Server



If the client installed the following, you can monitor them.



* VMware Aria Automation
* VMware Aria Orchestrator
* VMware Aria Business for Cloud
* VMware Site Recovery Manager



The VMware SDDC Health Management Pack provides the following dashboards:



* SDDC Management Health Overview Dashboard - You can use SDDC Management Health overview dashboard to view and analyze the application-specific problems in the SDDC components.
Reusing definitions of logging resources 

To avoid recreating definitions of views, boards, parsing templates, and exclusion rules, you can export these resources from a IBM Log Analysis instance as a JSON file. Then, you can import the definitions into other logging instances.



 Export the configuration of resources in a logging instance 

Complete the following steps to export the configuration of your resources:



1. [Launch the IBM Log Analysis web UI](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-view_logsview_logs_step2).
2. Click the Settings icon ![Configuration icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/admin.png). Then select Organization.
3. Click Export Config.
4. In the Export Configuration section, select the types of resources that you want to export.

Notice that options are disabled if you do not have definitions of this type of resource in your logging instance.

You can export views and alerts, boards, parsing templates, and exclusion rules.
5. Select Export and save the file.



Do not edit the exported JSON file. If the JSON file is edited it will be corrupted and cannot be imported into another logging instance.





 Import the configuration of resources into a logging instance 

Complete the following steps to import the configuration of your resources:



1. [Launch the IBM Log Analysis web UI](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-view_logsview_logs_step2).
2. Click the Settings icon !
For example, you might define multiple regex patterns that match part numbers from different vendors that use different formats. Input text for the response is recognized if it matches any of the regex patterns you specify.

To add a regex response:



1. In Define customer response, click Regex.
2. Click Edit response.
3. In the Regular expression field, select one of the predefined regular expressions, or click Define custom regular expression to write your own.

To use a predefined regular expression, select one of the following:



* Email: An internet email address (for example, user@example.com).
* Phone number: A ten-digit US phone number (for example, 800-555-1212 or (800) 555-1212).
* URL: A correctly formatted URL for an online resource, optionally including the protocol (for example, example.com or https://example.org/index.html).



For examples of other common patterns, see [Example regex patterns](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-collect-inforegex-examples).

For more information on regular expression syntax, see [Syntax](https://github.com/google/re2/wiki/Syntax).

Only English characters can be used in a regular expression. If you need to use other characters in a regular expression, you must represent those characters in Unicode.

Watson Assistant uses the Google RE2 regular expression library to match regular expressions at run time. Regular expression syntax can vary between implementations, so ensure any regex patterns that you write conform to the [RE2 syntax](https://github.com/google/re2/wiki/Syntax).
4. If you want to specify multiple regex patterns for the response, click Add regular expression to add another field in which you can select or define another regular expression.

When you specify more than one regular expression, a Name field is displayed for each one. Use this field to give each regex pattern a unique name. You can use this name in subsequent step conditions to identify which regex pattern was matched.
If the hostname resolves to multiple IP addresses or if the assigned IP addresses can change (for example, load balancer), make sure that you provide the CIDR range of those IP addresses in the policy rather than the DNS hostname.







 Domain Name Server (DNS) resolution 

When you use DNS hostname in a policy, the database tries to resolve the domain by using the local name server on the node. If you use domain names that typically are not cached by the local name servers, for example, a service that is not native to or provided by the cloud infrastructure provider, the local name servers cannot resolve to it.

In such scenarios, you can do one of the following:



* Add the DNS server's IP address in the allow rule so that the database can resolve the hostname to its IP address.
* Provide the complete CIDR range that is used by the device or the service.







 Order of evaluation of network policies 

The allow policies are evaluated first. Then, the deny policies.

During the evaluation, each policy is evaluated in the order that they are defined, from first to last.

The first rule that matches the incoming or outgoing connection is applied and subsequent rules are ignored for that connection.

You can find examples of creating policies in Examples of network policies.





 Creating and listing network policies 

You can create network policies if you belong to the ADMINISTRATORS group.

To create and view existing network policies in the Netezza Performance Server web console, select Administration > Settings > Network Policies. For more information about creating network policies with the web console, see [Network policies with the web console](https://cloud.ibm.com/docs/netezza?topic=netezza-settings&interface=ui).





 Examples 

Following are examples of how you can apply network policies.



 Allowing connections only from a defined set of sources with the specified IP addresses and hostnames 

If you want to allow connections to the Netezza Performance Server database only from devices with IP addresses in the range that is represented by CIDR-1, CIDR-2, and hostnames H1 and H2, and reject connections from all other sources, follow these steps.



1. Create the policies in order from Rule 1 to Rule 5.
The CognosApi.js file is available from the Cognos Dashboard Embedded service instance: [https://dde-us-south.analytics.ibm.com/daas/CognosApi.js](https://dde-us-south.analytics.ibm.com/daas/CognosApi.js).
* Create and initialize an instance of the API framework. This API takes three parameters:



1. The cognosRootURL, which is the api_endpoint_url from the credentials created in step 2.
2. The sessionCode, which is the same as the sessionCode created in step 3.
3. The document object model (DOM) node. This is where the dashboard is embedded into your client application.





If the initialization call fails and you get an error like "Refused to display in a frame because an ancestor violates the following Content Security Policy directive: frame-ancestors [https://myapp.bluemix.net](https://myapp.bluemix.net).", then this might be the result of not specifying the sub-domain of your application when you create the session.

After you created an instance of the dashboard, you can either create a new dashboard or open a previously authored dashboard by passing in the dashboard specification.

You can interact with embedded dashboard in various ways through the dashboard API. Some examples include:



* Add data sources to the dashboard.
* Undo and redo actions.
* Show and hide the properties pane.
* Register for events.
* Get the dashboard specifications. You can then persist this specification, and use it later in the openDashboard() method.



As an application developer, you can explore this API with the Cognos Dashboard Embedded demo application: [https://ibm-cognos-dashboard-demo.ng.bluemix.net/](https://ibm-cognos-dashboard-demo.ng.bluemix.net/).

!