vania-janet/multiturn-rag-retrieval-data huggingface dataset:
IBM Cloud Monitoring monitoring is available for deployments in every region. Deployments in Multi-zone Regions (MZRs) - eu-gb, eu-de, us-east, us-south, jp-tok, au-syd - have their metrics in the corresponding region.

If you have deployments that are in Single-zone Region (SZR) - che01 then your logs are forwarded to a IBM Cloud Monitoring instance in another region. You need to provision monitoring instances in the region where your metrics are forwarded to. Metrics for deployments in che01 go to jp-tok.





 Available Metrics 



Table 1. Available Metrics

 Metric Name 

 [Blocks hit rate](https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-monitoringibm_databases_for_mysql_blocks_hit_rate) 
 [Blocks read rate](https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-monitoringibm_databases_for_mysql_blocks_read_rate) 
 [Buffers backend rate](https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-monitoringibm_databases_for_mysql_buffers_backend_rate) 
 [Buffers checkpoint rate](https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-monitoringibm_databases_for_mysql_buffers_checkpoint_rate) 
 [Cache hit ratio](https://cloud.ibm.com/docs/databases-for-mysql?topic=databases-for-mysql-monitoringibm_databases_for_mysql_cache_hit_ratio)
value":-0.00004535570031113154},{"date":"2022-03-29T16:20:11Z","name":"jq_01","unit":"GHz","value":0.0018316915605747965},{"date":"2022-03-29T16:20:11Z","name":"zz_01","unit":"GHz","value":-0.00004755906814002782},{"date":"2022-03-29T16:20:11Z","name":"jq_12","unit":"GHz","value":0.00178951441734877},{"date":"2022-03-29T16:20:11Z","name":"zz_12","unit":"GHz","value":-0.00007457947649604688},{"date":"2022-03-29T16:20:11Z","name":"jq_1920","unit":"GHz","value":0.0018835871134323464},{"date":"2022
value":0.001761388736507495},{"date":"2022-03-29T16:20:11Z","name":"zz_14","unit":"GHz","value":-0.00004557927509269165},{"date":"2022-03-29T16:20:11Z","name":"jq_23","unit":"GHz","value":0.0018877837709749604},{"date":"2022-03-29T16:20:11Z","name":"zz_23","unit":"GHz","value":-0.000055720840706366585},{"date":"2022-03-29T16:20:11Z","name":"jq_1922","unit":"GHz","value":0.001979163171748162},{"date":"2022-03-29T16:20:11Z","name":"zz_1922","unit":"GHz","value":-0.00010730943628445339},{"date":"2022
-03-29T16:20:11Z","name":"zz_1920","unit":"GHz","value":-0.0001189235906799594},{"date":"2022-03-29T16:20:11Z","name":"jq_67","unit":"GHz","value":0.0018310520352838508},{"date":"2022-03-29T16:20:11Z","name":"zz_67","unit":"GHz","value":-0.00004695414884571033},{"date":"2022-03-29T16:20:11Z","name":"jq_2425","unit":"GHz","value":0.0018502505373576466},{"date":"2022-03-29T16:20:11Z","name":"zz_2425","unit":"GHz","value":-0.00005054361898718402},{"date":"2022-03-29T16:20:11
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 sysdig-monitor.alert.edit Edit alerts. ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 sysdig-monitor.alerts.read View alerts. ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) !
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 sysdig-monitor.alert-events.read View alert events. ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 sysdig-monitor.alert.edit Edit alerts. !
-d '{
"name": "My RC 200",
"query": "reason.reasonCode:200",
"hosts": ["ibm-cloud-databases-prod"],
"category": ["TEST"],
"channels": [
{
"integration": "email",
"emails": "myemail@ibm.com"],
"triggerlimit": 15,
"triggerinterval": "5m",
"immediate": true,
"terminal": true,
"operator": "presence",
"timezone": "Europe/London"
}
]
}'
Show more

A response similar to the following will be returned:

{"name":"My RC 200","query":"reason.reasonCode:200","hosts":["ibm-cloud-databases-prod"],"category":["89610d13a7"],"channels":[{"integration":"email","emails":"myemail@ibm.com","triggerlimit":15,"triggerinterval":300,"immediate":true,"terminal":true,"operator":"presence","timezone":"Europe/London","alertid":"<ALERTID>"}],"viewid":"VIEWID"}





 Get all configured views and alerts 

The following sample gets all configured views and alerts for the instance.

curl --request GET https://api.eu-de.logging.cloud.ibm.com/v1/config/view -H "content-type: application/json" -H "servicekey: <SERVICE_KEY>"

A response similar to the following will be returned:
{"name":"My RC 200","query":"reason.reasonCode:200","hosts":["ibm-cloud-databases-prod"],"category":["89610d13a7"],"channels":[{"integration":"email","emails":"myemail@ibm.com","triggerlimit":15,"triggerinterval":300,"immediate":true,"terminal":true,"operator":"presence","timezone":"Europe/London","alertid":"<ALERTID>"}],"viewid":"VIEWID"}





 Get all configured views and alerts 

The following sample gets all configured views and alerts for the instance.

curl --request GET https://api.eu-de.logging.cloud.ibm.com/v1/config/view -H "content-type: application/json" -H "servicekey: <SERVICE_KEY>"

A response similar to the following will be returned:

[{"viewid":"cf1a53da31","name":"(_platform:xxx create) OR (_platform:xxx delete)","query":"(_platform:xxx .create) OR (_platform:xxx .delete)","category":"Instance"],"account":"xxxxxxxxx"},{"viewid":"de6de89f6c","name":"All] Logins","query":"reason.reasonCode:200 _platform:iam-identity (action login)","category":"Login"],"account":"xxxxxxxx"},{"viewid":"dfd136707e","name":"All] Events","category":"COS"],"account":"xxxxxxxx","hosts":"cloud-object-storage"]}]





 Modifying a view by adding an alert 

The following modifies a view by adding an alert.

curl --request PUT
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/checkmark-icon.svg) 
 Multi-channel Alerting ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/checkmark-icon.svg) !
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/667adc0b8a7fdb0b349b1158d8e128640b5bc72b/workload-protection//images/checkmark-icon.svg) 
 Create, update and remove alerts ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/667adc0b8a7fdb0b349b1158d8e128640b5bc72b/workload-protection//images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/667adc0b8a7fdb0b349b1158d8e128640b5bc72b/workload-protection//images/checkmark-icon.svg) 
 View reporst and image scanning results ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/667adc0b8a7fdb0b349b1158d8e128640b5bc72b/workload-protection//images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/667adc0b8a7fdb0b349b1158d8e128640b5bc72b/workload-protection//images/checkmark-icon.svg) 
 View rules and policies ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/667adc0b8a7fdb0b349b1158d8e128640b5bc72b/workload-protection//images/checkmark-icon.svg) !
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 sysdig-monitor.alert-events.edit Edit alert events. ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg)
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 sysdig-monitor.alerts.read View alerts. ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 sysdig-monitor.api-token.edit Edit API tokens. ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) !
[{"viewid":"cf1a53da31","name":"(_platform:xxx create) OR (_platform:xxx delete)","query":"(_platform:xxx .create) OR (_platform:xxx .delete)","category":"Instance"],"account":"xxxxxxxxx"},{"viewid":"de6de89f6c","name":"All] Logins","query":"reason.reasonCode:200 _platform:iam-identity (action login)","category":"Login"],"account":"xxxxxxxx"},{"viewid":"dfd136707e","name":"All] Events","category":"COS"],"account":"xxxxxxxx","hosts":"cloud-object-storage"]}]





 Modifying a view by adding an alert 

The following modifies a view by adding an alert.

curl --request PUT 
--url https://api.us-south.logging.cloud.ibm.com/v1/config/view/<VIEWID> 
--header 'Content-Type: application/json' 
-H 'servicekey: <SERVICE_KEY>' 
-d '{
"name": "My RC 200",
"query": "reason.reasonCode:200",
"hosts": ["ibm-cloud-databases-prod"],
"category": ["<CATEGORY"],
"channels": [
{
"integration": "email",
"emails": "myemail@ibm.com"],
"triggerlimit": 15,
"triggerinterval": "5m",
"immediate": true,
"terminal": true,
"operator": "presence",
"timezone": "Europe/London"
}
]
}'
Show more
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 notifyOnOk ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) !
Memory usage per zone over threshold sum(sysdig_container_cpu_used_percent{agent_tag_cluster="<cluster_name>"}) by (kube_node_label_ibm_cloud_kubernetes_io_zone)/ sum (kube_node_info) by (kube_node_label_ibm_cloud_kubernetes_io_zone) > 80 







 Cluster alerts 

Review the following example thresholds for creating alerts at the cluster level.



* All worker nodes in a region are reaching capacity threshold of 80%.
* More than 50% of all worker nodes are in an unhealthy state.
* Reaching maximum number of file and block storage volumes per account (250).
* Reaching maximum number of worker nodes per cluster (500).







 Account alerts 

You might set up an alert for when the maximum number of clusters per account is reaching the limit. For example, 100 per region/infrastructure provider.





 Block Storage for VPC alerts 

The following metrics are available for Block Storage for VPC alerts:



* kubelet_volume_stats_available_bytes
* kubelet_volume_stats_capacity_bytes
* kubelet_volume_stats_inodes
* kubelet_volume_stats_inodes_free
* kubelet_volume_stats_inodes_used





1. Create a monitoring instance for Block Storage for VPC alerts. See instructions in [Forwarding cluster and app metrics to IBM Cloud Monitoring](https://cloud.ibm.com/docs/containers?topic=containers-health-monitormonitoring).
2. Install the syslog agent.



1. [In the IBM Cloud console](https://cloud.ibm.com), select Observability from the menu.
2. Select Monitoring.
3. In the row of the instance for Block Storage for VPC alerts, select Open dashboard.
4. From the menu, select Get started.
5. Under the Install the Agent section, select Add Sources.
6. Follow the instructions to install the agent.
When you specify this header, you limit the request to the data and resources available for the team specified.

To get an AUTH_TOKEN and the GUID see, [Headers for IAM Tokens](https://cloud.ibm.com/docs/monitoring?topic=monitoring-mon-curlmon-curl-headers-iam).
* <ALERT_ID> defines the ID of the alert that you want to modify.
* You can pass data to create the alert in the alert.json file by using -d.

For more information, see [Alert schema](https://cloud.ibm.com/docs/monitoring?topic=monitoring-alert_apialert-api-schema-req).



The following sample shows the request body parameters that you can set to update an alert:

{
"alert": {
"type": "MANUAL",
"id": 23212,
"version": 10,
"name": "CheckNginxConnections",
"description": "Active connections of nginx server",
"enabled": false,
"severity": 2,
"timespan": 1000000,
"condition": "avg(avg(nginx.net.connections)) > 1000",
"segmentBy": [
"host.hostName"
],
"segmentCondition": {
"type": "ANY"
},
"notificationChannelIds": [
2
]
}
}





 Delete an alert 

To delete an existing alert, you need the ID of that alert.

You can use the following cURL command to delete an alert:

curl -X DELETE <REST_API_ENDPOINT>/api/alerts/<ALERT_ID> -H "Authorization: $AUTH_TOKEN" -H "IBMInstanceID: $GUID" -H "TeamID: $TEAM_ID" -H "content-type: application/json"

Where



* <REST_API_ENDPOINT> indicates the endpoint targetted by the REST API call.
[Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 emailRecipients ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 url ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 apiKey ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) ![Checkmark icon](https://cloud.ibm.com/docs-content/v1/content/220cdcbf6f4421bd7fee83fd1028048dba3f16c8/monitoring/images/checkmark-icon.svg) 
 routingKey !
You can specify the service in the hosts patameter.<br><br>For example, to notify when a Key Protect service instance is changed, add "hosts": "kms" 
 Create, delete or modify any service instance instance.create OR instance.delete OR instance.update N/A N/A 







 Notify when account settings are modified 

The following table outlines queries that you can use to alert on configuraton changes that report when account settings are modified:



Table 2. Query samples when account settings are modified

 Notify when Query 

 An administrator enforces policies for entities to create platform API keys action:iam-identity.accountsettings.update AND requestData.request_body.old_restrict_create_platform_apikey:UNRESTRICTED AND requestData.request_body.new_restrict_create_platform_apikey:RESTRICTED 
 An administrator allows creation of platform API keys without a policy in place action:iam-identity.accountsettings.update AND requestData.request_body.old_restrict_create_platform_apikey:RESTRICTED AND requestData.request_body.new_restrict_create_platform_apikey:UNRESTRICTED 
 An administrator enforces policies for entities to create service IDs action:iam-identity.accountsettings.update AND requestData.request_body.old_restrict_create_service_id:UNRESTRICTED AND requestData.request_body.new_restrict_create_service_id:RESTRICTED 
 An administrator allows creation of service IDs without a policy in place action:iam-identity.accountsettings.update AND requestData.request_body.old_restrict_create_service_id:RESTRICTED AND requestData.request_body.new_restrict_create_service_id:UNRESTRICTED 
 An administrator sets an expiration timeout for sessions action:iam-identity.accountsettings.update AND requestData.request_body.old_session_expiration_in_seconds:NOT_SET AND requestData.request_body.new_session_expiration_in_seconds:<SECONDS>
{"name":"Send by email","channels":[{"integration":"email","immediate":false,"terminal":true,"triggerlimit":1,"triggerinterval":30,"operator":"presence","emails":"AnotherUser@mycompany.com","alertid":"719a919782"}],"presetid":"8485dcf363"}





 Get all configured presets 

The following sample gets all configured presets for the instance.

curl --request GET https://api.us-south.logging.cloud.ibm.com/v1/config/presetalert 
-H "Accept: application/json" 
-H "servicekey: <SERVICE_KEY>"

A response similar to the following will be returned:

[{"channels":{"integration":"email","immediate":false,"terminal":true,"triggerlimit":1,"triggerinterval":"30","operator":"presence","emails":"MyUser@mycompany.com"],"alertid":"4991f78d6d"}],"presetid":"291a4100b0","account":"090bba4d47","name":"Email preset","_created":"2021-11-18T15:15:53.414Z","_modified":"2021-11-18T15:15:53.414Z"},{"channels":{"integration":"email","alertid":"be14de8671","immediate":false,"terminal":true,"triggerlimit":1,"triggerinterval":"30","operator":"presence","emails":"MyUser@mycompany.com"]},{"integration":"email"
- exclude: ".kubernetes.io/"
- exclude: ".pod-template-hash"
- exclude: ".pod-template-generation"
- exclude: ".controller-revision-hash"
- include: ""
3. Restart the IBM Cloud Monitoring pods. Delete all the pods and wait for them to restart. Get the list of pods.

kubectl get pods -n ibm-observe
4. Delete the pods to restart them.

kubectl delete pods sysdig-agent-1111 sysdig-agent-2222 sysdig-agent-3333 -n ibm-observe
5. Wait 5 minutes for the pods restart. After the pods have restarted, the label that you added earlier is available in IBM Cloud Monitoring
6. Verify that the labels now show by opening the IBM Cloud Monitoring dashboard > Explore > PromQL query.
7. Enter kube_node_labels in the query field and click Run Query.





Zone level alerts

 Metric PromQL query 

 CPU usage per zone over threshold sum(sysdig_container_cpu_used_percent{agent_tag_cluster="<cluster_name>"}) by (kube_node_label_ibm_cloud_kubernetes_io_zone) / sum (kube_node_info) by (kube_node_label_ibm_cloud_kubernetes_io_zone) > 80 
 Memory usage per zone over threshold sum(sysdig_container_cpu_used_percent{agent_tag_cluster="<cluster_name>"}) by (kube_node_label_ibm_cloud_kubernetes_io_zone)/ sum (kube_node_info) by (kube_node_label_ibm_cloud_kubernetes_io_zone) > 80 







 Cluster alerts 

Review the following example thresholds for creating alerts at the cluster level.



* All worker nodes in a region are reaching capacity threshold of 80%.
* More than 50% of all worker nodes are in an unhealthy state.
curl --request POST https://api.us-south.logging.cloud.ibm.com/v1/config/presetalert 
-H "Accept: application/json" 
-H "Content-Type: application/json" 
-H "servicekey: <SERVICE_KEY>" 
-d '{ "name": "My preset", "channels": ["<CHANNEL>"] }'

A response similar to the following will be returned:

{"name":"Send by email","channels":[{"integration":"email","immediate":false,"terminal":true,"triggerlimit":1,"triggerinterval":30,"operator":"presence","emails":"AnotherUser@mycompany.com","alertid":"719a919782"}],"presetid":"8485dcf363"}





 Get all configured presets 

The following sample gets all configured presets for the instance.

curl --request GET https://api.us-south.logging.cloud.ibm.com/v1/config/presetalert 
-H "Accept: application/json" 
-H "servicekey: <SERVICE_KEY>"

A response similar to the following will be returned:
Monitoring (ibmcloud monitoring) CLI 

The IBM Cloud® command-line interface (CLI) provides extra capabilities for service offerings. This information describes how you can use the CLI to access information in IBM Cloud Monitoring.



 Prerequisites 



* Install the [IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started).
* Install the IBM Cloud Monitoring CLI by running the following command:

ibmcloud plugin install monitoring



You are notified on the command line when updates to the IBM Cloud CLI and plug-ins are available. Be sure to keep your CLI up to date so that you can use the latest commands. You can view the current version of all installed plug-ins by running ibmcloud plugin list.





 ibmcloud monitoring alert add 

Use this command to add an alert.

ibmcloud monitoring alert add --name NAME [--alert-name ALERT_NAME] [--description DESCRIPTION] [--type TYPE] [--timespan TIMESPAN] [--condition CONDITION] [--severity SEVERITY] [--severity-label LOW, MEDIUM OR HIGH] [--disable] [--segment SEGMENT] [--segment-condition SEGMENT_CONDITION] [--user-filter USER_FILTER] [--notify NOTIFY] [--file JSON_FILE] [--region REGION] [--output FORMAT] [--team TEAM_NAME]



 Command options 

--name <NAME> | --n <NAME>
: Name of the instance.

--alert-name <ALERT_NAME>
: Name of the alert.

--description <DESCRIPTION>
: Information about the alert.

--type <TYPE>
: Type of alert. Valid values are MANUAL, BASELINE, and HOST_COMPARISON.

--timespan <TIMESPAN>
: Minimum time interval, in microseconds, for which the alert condition must be met before the alert is triggered. The default value is 60,000,000 microseconds.

--condition <CONDITION>
: Threshold of the alert.