Skip to content

Latest commit

 

History

History
632 lines (460 loc) · 36 KB

cs_observability_reference.md

File metadata and controls

632 lines (460 loc) · 36 KB
copyright lastupdated keywords subcollection
years
2014, 2021
2021-04-21
observability commands, observability cli, observability plug-in, logging commands, monitoring commands, logging cli, monitoring cli, logging config, monitoring config
containers

{:DomainName: data-hd-keyref="APPDomain"} {:DomainName: data-hd-keyref="DomainName"} {:android: data-hd-operatingsystem="android"} {:api: .ph data-hd-interface='api'} {:apikey: data-credential-placeholder='apikey'} {:app_key: data-hd-keyref="app_key"} {:app_name: data-hd-keyref="app_name"} {:app_secret: data-hd-keyref="app_secret"} {:app_url: data-hd-keyref="app_url"} {:authenticated-content: .authenticated-content} {:beta: .beta} {:c#: data-hd-programlang="c#"} {:cli: .ph data-hd-interface='cli'} {:codeblock: .codeblock} {:curl: .ph data-hd-programlang='curl'} {:deprecated: .deprecated} {:dotnet-standard: .ph data-hd-programlang='dotnet-standard'} {:download: .download} {:external: target="_blank" .external} {:faq: data-hd-content-type='faq'} {:fuzzybunny: .ph data-hd-programlang='fuzzybunny'} {:generic: data-hd-operatingsystem="generic"} {:generic: data-hd-programlang="generic"} {:gif: data-image-type='gif'} {:go: .ph data-hd-programlang='go'} {:help: data-hd-content-type='help'} {:hide-dashboard: .hide-dashboard} {:hide-in-docs: .hide-in-docs} {:important: .important} {:ios: data-hd-operatingsystem="ios"} {:java: .ph data-hd-programlang='java'} {:java: data-hd-programlang="java"} {:javascript: .ph data-hd-programlang='javascript'} {:javascript: data-hd-programlang="javascript"} {:new_window: target="_blank"} {:note .note} {:note: .note} {:objectc data-hd-programlang="objectc"} {:org_name: data-hd-keyref="org_name"} {:php: data-hd-programlang="php"} {:pre: .pre} {:preview: .preview} {:python: .ph data-hd-programlang='python'} {:python: data-hd-programlang="python"} {:route: data-hd-keyref="route"} {:row-headers: .row-headers} {:ruby: .ph data-hd-programlang='ruby'} {:ruby: data-hd-programlang="ruby"} {:runtime: architecture="runtime"} {:runtimeIcon: .runtimeIcon} {:runtimeIconList: .runtimeIconList} {:runtimeLink: .runtimeLink} {:runtimeTitle: .runtimeTitle} {:screen: .screen} {:script: data-hd-video='script'} {:service: architecture="service"} {:service_instance_name: data-hd-keyref="service_instance_name"} {:service_name: data-hd-keyref="service_name"} {:shortdesc: .shortdesc} {:space_name: data-hd-keyref="space_name"} {:step: data-tutorial-type='step'} {:subsection: outputclass="subsection"} {:support: data-reuse='support'} {:swift: .ph data-hd-programlang='swift'} {:swift: data-hd-programlang="swift"} {:table: .aria-labeledby="caption"} {:term: .term} {:tip: .tip} {:tooling-url: data-tooling-url-placeholder='tooling-url'} {:troubleshoot: data-hd-content-type='troubleshoot'} {:tsCauses: .tsCauses} {:tsResolve: .tsResolve} {:tsSymptoms: .tsSymptoms} {:tutorial: data-hd-content-type='tutorial'} {:ui: .ph data-hd-interface='ui'} {:unity: .ph data-hd-programlang='unity'} {:url: data-credential-placeholder='url'} {:user_ID: data-hd-keyref="user_ID"} {:vbnet: .ph data-hd-programlang='vb.net'} {:video: .video}

Observability plug-in CLI

{: #observability_cli}

Refer to these commands to create and manage logging and monitoring configurations for your {{site.data.keyword.containerlong_notm}} cluster. {: shortdesc}

Looking for ibmcloud ks commands? See the {{site.data.keyword.containerlong_notm}} CLI reference. {:tip}

Logging commands

{: #logging-commands}

ibmcloud ob logging agent discover

{: #logging_agent_discover}

Discover {{site.data.keyword.la_short}} agents that you manually installed in your cluster without using the {{site.data.keyword.containerlong_notm}} observability plug-in, and make this logging configuration visible to the plug-in so that you can use the observability plug-in commands and functionality in the {{site.data.keyword.cloud_notm}} console to manage this configuration. {: shortdesc}

ibmcloud ob logging agent discover --cluster CLUSTER [--instance LOGGING_INSTANCE]

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for all Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}
  • Viewer platform access role for {{site.data.keyword.la_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster where you manually created a {{site.data.keyword.la_short}} configuration without using the {{site.data.keyword.containerlong_notm}} observability plug-in. To retrieve your cluster name or ID, run `ibmcloud ks clusters`. This value is required.
--instance LOGGING_INSTANCE
The ID or name of the {{site.data.keyword.la_full_notm}} service instance that you use in your logging configuration. This value is optional. If you do not provide this value, the {{site.data.keyword.la_full_notm}} service instance is automatically retrieved.

ibmcloud ob logging config create

{: #logging_config_create}

Create a logging configuration for your cluster to automatically collect pod logs and send them to {{site.data.keyword.la_full_notm}}. {: shortdesc}

This command deploys a {{site.data.keyword.la_short}} agent as a Kubernetes daemon set in your cluster. The agent collects logs with the extension *.log and extensionless files that are stored in the /var/log directory of your pod from all namespaces, including kube-system. For more information, see Forwarding cluster and app logs to {{site.data.keyword.la_full_notm}}. For more information about {{site.data.keyword.la_full_notm}}, see Securing your data.

ibmcloud ob logging config create --cluster CLUSTER --instance LOGGING_INSTANCE [--logdna-ingestion-key INGESTION_KEY] [--private-endpoint]  

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for all Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}
  • Editor platform access role and Manager server access role for {{site.data.keyword.la_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to create a logging configuration for {{site.data.keyword.la_full_notm}}. To retrieve your cluster name or ID, run `ibmcloud ks clusters`. This value is required.
--instance LOGGING_INSTANCE
The ID or name of the {{site.data.keyword.la_full_notm}} service instance that you want to use to create the logging configuration. The service instance must be in the same {{site.data.keyword.cloud_notm}} account as your cluster, but can be in a different resource group or region than your cluster. To create a service instance, follow the steps in [Provision an instance](/docs/log-analysis?topic=log-analysis-provision). This value is required.
--logdna-ingestion-key INGESTION_KEY
The {{site.data.keyword.la_short}} ingestion key that you want to use for your configuration. This value is optional. If you do not specify this option, the latest ingestion key is automatically retrieved.
--private-endpoint
When you add this option to your command, the private cloud service endpoint is used to connect to {{site.data.keyword.la_full_notm}}. To use the private cloud service endpoint, your cluster must be enabled for using private cloud service endpoints. For more information, see worker communication to other services and networks for [classic](/docs/containers?topic=containers-plan_clusters#vpc-worker-services-onprem) and [VPC clusters](/docs/containers?topic=containers-plan_clusters#worker-services-onprem).

Example:

ibmcloud ob logging config create --cluster mycluster --instance mylogna

{: pre}

ibmcloud ob logging config delete

{: #logging_config_delete}

Delete a {{site.data.keyword.la_short}} configuration from your cluster. {: shortdesc}

To remove logging configurations that you manually set up without using the {{site.data.keyword.containerlong_notm}} observability plug-in, you must first make this configuration available to the plug-in by using the ibmcloud ob logging agent discover command. {: note}

When you delete the logging configuration, the components that are deleted depend on how you created the logging configuration. For logging configurations that were created with the ibmcloud ob logging config create command, the daemon set for the {{site.data.keyword.la_short}} agent, the configmap, and secret are removed from your cluster, and pod logs are no longer sent to your {{site.data.keyword.la_full_notm}} service instance. Logging configurations that you manually created and made visible to the plug-in by using the ibmcloud ob logging agent discover command, only the configmap is removed. Your daemon set, secret, and the {{site.data.keyword.la_short}} agent are still deployed to your cluster and you must manually remove them. Because the configmap is removed, pod logs are no longer sent to your {{site.data.keyword.la_full_notm}} service instance. Independent of how you created the configuration, existing log data is still available in {{site.data.keyword.la_full_notm}} until your selected retention period ends.
{: important}

ibmcloud ob logging config delete --cluster CLUSTER --instance LOGGING_INSTANCE

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for the ibm-observe Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}.
  • Viewer platform access role for {{site.data.keyword.la_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to delete an existing {{site.data.keyword.la_short}} configurations. To retrieve the cluster name or ID, run `ibmcloud ks clusters`. This value is required.
--instance LOGGING_INSTANCE
The ID or name of the {{site.data.keyword.la_full_notm}} service instance that you used in your logging configuration. To retrieve the service instance name, run `ibmcloud resource service-instances`. This value is required.

Example:

ibmcloud ob logging config delete --cluster mycluster --instance mylogginginstance

{: pre}

ibmcloud ob logging config list

{: #logging_config_list}

List all {{site.data.keyword.la_short}} configurations that were created for your cluster with the {{site.data.keyword.containerlong_notm}} observability plug-in. {: shortdesc}

To list logging configurations that you manually set up without using the {{site.data.keyword.containerlong_notm}} observability plug-in, you must first make this configuration available to the plug-in by using the ibmcloud ob logging agent discover command. {: note}

ibmcloud ob logging config list --cluster CLUSTER

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Viewer platform access role and Reader service access role for the ibm-observe Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}.
  • Viewer platform access role for {{site.data.keyword.la_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to list existing {{site.data.keyword.la_short}} configurations. This value is required.

ibmcloud ob logging config enable public-endpoint|private-endpoint

{: #logging_config_enable}

Use the public or private cloud service endpoint to send data from your cluster to your {{site.data.keyword.la_short}} service instance. {: shortdesc}

To use the private cloud service endpoint, your cluster must be enabled for using private cloud service endpoints. {: important}

ibmcloud ob logging config enable public-endpoint|private-endpoint --cluster CLUSTER --instance LOGGING_INSTANCE

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for all Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}
  • Editor platform access role and Manager server access role for {{site.data.keyword.la_full_notm}}

Command options:

public-endpoint|private-endpoint
Enter public-endpoint to use the public cloud service endpoint of your {{site.data.keyword.la_full_notm}} service instance, or private-endpoint to use the private cloud service endpoint to send logs from your cluster. This value is required. To use the private cloud service endpoint, your cluster must be enabled for using private cloud service endpoints.
--cluster CLUSTER
The name or ID of the cluster for which you want to enable the private or public cloud service endpoint to connect to your {{site.data.keyword.la_short}} service instance. To retrieve your cluster name or ID, run `ibmcloud ks clusters`. This value is required.
--instance LOGGING_INSTANCE
The ID or name of the {{site.data.keyword.la_full_notm}} service instance to which you want to connect by using the public or private cloud service endpoint. To retrieve the name, run `ibmcloud resource service-instances`. This value is required.

ibmcloud ob logging config replace

{: #logging_config_replace}

Replace the {{site.data.keyword.la_full_notm}} service instance or ingestion key that you use in your {{site.data.keyword.la_short}} configuration. {: shortdesc}

Replace the ingestion key of an existing {{site.data.keyword.la_full_notm}} service instance:

ibmcloud ob logging config replace --cluster CLUSTER --instance LOGGING_INSTANCE --logdna-ingestion-key INGESTION_KEY

{: pre}

Replace the {{site.data.keyword.la_full_notm}} service instance:

ibmcloud ob logging config replace --cluster CLUSTER --instance LOGGING_INSTANCE  --new-instance LOGGING_INSTANCE_NEW [--logdna-ingestion-key INGESTION_KEY]

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for all Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}
  • Editor platform access role and Manager server access role for {{site.data.keyword.la_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to change the {{site.data.keyword.la_full_notm}} ingestion key or service instance that you use in your {{site.data.keyword.la_short}} configuration. This value is required.
--instance LOGGING_INSTANCE
The ID or name of the {{site.data.keyword.la_full_notm}} service instance for which you want to change the ingestion key, or the {{site.data.keyword.la_full_notm}} service instance that you want to replace. To retrieve the name, run `ibmcloud ob logging config list --cluster `. This value is required.
--new-instance LOGGING_INSTANCE_NEW
If you want to replace the {{site.data.keyword.la_full_notm}} service instance that you use in your {{site.data.keyword.la_short}} configuration, enter the ID or name of the new {{site.data.keyword.la_full_notm}} service instance that you want to use. This value is required if you want to replace the {{site.data.keyword.la_full_notm}} service instance. If you want to replace the ingestion key, do not include this command option.
--logdna-ingestion-key INGESTION_KEY
The {{site.data.keyword.la_short}} ingestion key that you want to use for your configuration. For information about how to retrieve the ingestion key, see [Get the ingestion key through the {{site.data.keyword.cloud_notm}} UI](/docs/log-analysis?topic=log-analysis-ingestion_key#ibm_cloud_ui). This value is required if you want to replace the ingestion key, and optional if you want to replace the {{site.data.keyword.la_full_notm}} service instance. If you do not provide the ingestion key when replacing the {{site.data.keyword.la_full_notm}} service instance, the ingestion key that was last added is retrieved automatically.

ibmcloud ob logging config show

{: #logging_config_show}

Show the details of a {{site.data.keyword.la_short}} configuration. {: shortdesc}

To show the details of logging configurations that you manually set up without using the {{site.data.keyword.containerlong_notm}} observability plug-in, you must first make this configuration available to the plug-in by using the ibmcloud ob logging agent discover command. {: note}

ibmcloud ob logging config show --cluster CLUSTER --instance LOGGING_INSTANCE

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Viewer platform access role and Reader service access role for the ibm-observe Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}.
  • Viewer platform access role for {{site.data.keyword.la_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to list existing {{site.data.keyword.la_short}} configurations. To retrieve your cluster name or ID, run `ibmcloud ks clusters`. This value is required.
--instance LOGGING_INSTANCE
The ID or name of the {{site.data.keyword.la_full_notm}} service instance for which you want to show the logging configuration. To retrieve the name, run `ibmcloud resource service-instances`. This value is required.

Monitoring commands

ibmcloud ob monitoring agent discover

{: #monitoring_agent_discover}

Discover {{site.data.keyword.mon_short}} agents that you manually installed in your cluster without using the {{site.data.keyword.containerlong_notm}} observability plug-in, and make this monitoring configuration visible to the plug-in so that you can use the observability plug-in commands and functionality in the {{site.data.keyword.cloud_notm}} console to manage this configuration. {: shortdesc}

ibmcloud ob monitoring agent discover --cluster CLUSTER [--instance MONITORING_INSTANCE]

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for all Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}
  • Viewer platform access role for {{site.data.keyword.mon_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster where you manually created a {{site.data.keyword.mon_short}} configuration without using the {{site.data.keyword.containerlong_notm}} observability plug-in. To retrieve your cluster name or ID, run `ibmcloud ks clusters`. This value is required.
--instance MONITORING_INSTANCE
The ID or name of the {{site.data.keyword.mon_full_notm}} service instance that you use in your monitoring configuration. This value is optional. If you do not provide this value, the {{site.data.keyword.mon_full_notm}} service instance is automatically retrieved

ibmcloud ob monitoring config create

{: #monitoring_config_create}

Create a monitoring configuration for your cluster to automatically collect cluster and pod metrics, and send them to {{site.data.keyword.mon_full_notm}}. {: shortdesc}

This command deploys a {{site.data.keyword.mon_short}} agent as a Kubernetes daemon set in your cluster. The agent collects cluster and pod metrics, such as the worker node CPU and memory usage, and the amount of incoming and outgoing network traffic for your pods. For more information, see Forwarding cluster and app metrics to {{site.data.keyword.mon_full_notm}}.

ibmcloud ob monitoring config create --cluster CLUSTER --instance MONITORING_INSTANCE [--sysdig-access-key ACCESS_KEY] [--private-endpoint]

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for all Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}
  • Editor platform access role and Manager server access role for {{site.data.keyword.mon_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to create a monitoring configuration for {{site.data.keyword.mon_full_notm}}. To retrieve your cluster name or ID, run `ibmcloud ks clusters`. This value is required.
--instance MONITORING_INSTANCE
The ID or name of the {{site.data.keyword.mon_full_notm}} service instance that you want to use to create the monitoring configuration. The service instance must be in the same {{site.data.keyword.cloud_notm}} account as your cluster, but can be in a different resource group or region than you cluster. To create a service instance, follow the steps in [Provision an instance](/docs/monitoring?topic=monitoring-provision). This value is required.
--sysdig-access-key ACCESS_KEY
The {{site.data.keyword.mon_short}} access key that you want to use for your configuration. This value is optional. If you do not specify this option, the latest access key is used for your configuration.
--private-endpoint
When you add this option to your command, the private cloud service endpoint is used to connect to {{site.data.keyword.mon_full_notm}}. To use the private cloud service endpoint, your cluster must be enabled for using private cloud service endpoints.

Example:

ibmcloud ob monitoring config create --cluster mycluster --instance mymonitoringinstance

{: pre}

ibmcloud ob monitoring config delete

{: #monitoring_config_delete}

Delete a {{site.data.keyword.mon_short}} configuration from your cluster. {: shortdesc}

To remove monitoring configurations that you manually set up without using the {{site.data.keyword.containerlong_notm}} observability plug-in, you must first make this configuration available to the plug-in by using the ibmcloud ob monitoring agent discover command. {: note}

When you delete the monitoring configuration, the components that are deleted depend on how you created the monitoring configuration. For monitoring configurations that were created with the ibmcloud ob monitoring config create command, the daemon set for the {{site.data.keyword.mon_short}} agent, the configmap, and secret are removed from your cluster, and metrics are no longer sent to your {{site.data.keyword.mon_full_notm}} service instance. Monitoring configurations that you manually created and made visible to the plug-in by using the ibmcloud ob monitoring agent discover command, only the configmap is removed. Your daemon set, secret, and the {{site.data.keyword.mon_short}} agent are still deployed to your cluster and you must manually remove them. Because the configmap is removed, metrics are no longer sent to your {{site.data.keyword.mon_full_notm}} service instance. Independent of how you created the configuration, existing metrics are still available in {{site.data.keyword.mon_full_notm}} until your selected retention period ends.
{: important}

ibmcloud ob monitoring config delete --cluster CLUSTER --instance MONITORING_INSTANCE

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for the ibm-observe Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}.
  • Viewer platform access role for {{site.data.keyword.mon_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to delete an existing {{site.data.keyword.mon_short}} configuration. To retrieve the cluster name or ID, run `ibmcloud ks cluster ls`. This value is required.
--instance MONITORING_INSTANCE
The ID or name of the {{site.data.keyword.mon_full_notm}} service instance that you used in your monitoring configuration. To retrieve the service instance name, run `ibmcloud resource service-instances`. This value is required.

Example:

ibmcloud ob monitoring config delete --cluster mycluster --instance mymonitoringinstance

{: pre}

ibmcloud ob monitoring config list

{: #monitoring_config_list}

List all {{site.data.keyword.mon_short}} configurations that were created for your cluster with the {{site.data.keyword.containerlong_notm}} observability plug-in. {: shortdesc}

To list monitoring configurations that you manually set up without using the {{site.data.keyword.containerlong_notm}} observability plug-in, you must first make this configuration available to the plug-in by using the ibmcloud ob monitoring agent discover command. {: note}

ibmcloud ob monitoring config list --cluster CLUSTER

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Viewer platform access role and Reader service access role for the ibm-observe Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}.
  • Viewer platform access role for {{site.data.keyword.mon_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to list existing {{site.data.keyword.mon_short}} configurations. This value is required.

ibmcloud ob monitoring config enable public-endpoint|private-endpoint

{: #monitoring_config_enable}

Use the public or private cloud service endpoint to send metrics from your cluster to your {{site.data.keyword.mon_short}} service instance. {: shortdesc}

To use the private cloud service endpoint, your cluster must be enabled for using private cloud service endpoints. {: important}

ibmcloud ob monitoring config enable public-endpoint|private-endpoint --cluster CLUSTER --instance MONITORING_INSTANCE

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for all Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}
  • Editor platform access role and Manager server access role for {{site.data.keyword.mon_full_notm}}

Command options:

public-endpoint|private-endpoint
Enter public-endpoint to use the public cloud service endpoint of your {{site.data.keyword.mon_full_notm}} service instance, or private-endpoint to use the private cloud service endpoint to send metrics from your cluster. This value is required. To use the private cloud service endpoint, your cluster must be enabled for using private cloud service endpoints.
--cluster CLUSTER
The name or ID of the cluster for which you want to enable the private or public cloud service endpoint to connect to your {{site.data.keyword.mon_short}} service instance. To retrieve your cluster name or ID, run `ibmcloud ks clusters`. This value is required.
--instance MONITORING_INSTANCE
The ID or name of the {{site.data.keyword.mon_full_notm}} service instance to which you want to connect by using the public or private cloud service endpoint. To retrieve the name, run `ibmcloud resource service-instances`. This value is required.

ibmcloud ob monitoring config replace

{: #monitoring_config_replace}

Replace the {{site.data.keyword.mon_full_notm}} service instance or service access key that you use in your {{site.data.keyword.mon_short}} configuration. {: shortdesc}

Replace the service access key of an existing {{site.data.keyword.mon_full_notm}} service instance:

ibmcloud ob logging config replace --cluster CLUSTER --instance MONITORING_INSTANCE --sysdig-access-key ACCESS_KEY

{: pre}

Replace the {{site.data.keyword.mon_full_notm}} service instance:

ibmcloud ob logging config replace --cluster CLUSTER --instance MONITORING_INSTANCE  --new-instance MONITORING_INSTANCE_NEW [--sysdig-access-key ACCESS_KEY]

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Administrator platform access role and Manager service access role for all Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}
  • Editor platform access role and Manager server access role for {{site.data.keyword.mon_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to change the {{site.data.keyword.mon_full_notm}} service access key or service instance that you use in your {{site.data.keyword.mon_short}} configuration. This value is required.
--instance MONITORING_INSTANCE
The ID or name of the {{site.data.keyword.mon_full_notm}} service instance for which you want to change the service access key, or the {{site.data.keyword.mon_full_notm}} service instance that you want to replace. To retrieve the name, run `ibmcloud ob monitoring config list --cluster `. This value is required.
--new-instance MONITORING_INSTANCE_NEW
If you want to replace the {{site.data.keyword.mon_full_notm}} service instance that you use in your {{site.data.keyword.mon_short}} configuration, enter the ID or name of the new {{site.data.keyword.mon_full_notm}} service instance that you want to use. This value is required if you want to replace the {{site.data.keyword.mon_full_notm}} service instance. If you want to replace the service access key, do not include this command option.
--sysdig-access-key ACCESS_KEY
The {{site.data.keyword.mon_short}} service access key that you want to use for your configuration. For information about how to retrieve the service access key, see [Getting the access key through the {{site.data.keyword.cloud_notm}} UI](/docs/monitoring?topic=monitoring-access_key#access_key_ibm_cloud_ui). This value is required if you want to replace the service access key, and optional if you want to replace the {{site.data.keyword.mon_full_notm}} service instance. If you do not provide the service access key when replacing the {{site.data.keyword.mon_full_notm}} service instance, the service access key that was last added is retrieved automatically.

ibmcloud ob monitoring config show

{: #monitoring_config_show}

Show the details of a {{site.data.keyword.mon_short}} configuration. {: shortdesc}

To show the details of monitoring configurations that you manually set up without using the {{site.data.keyword.containerlong_notm}} observability plug-in, you must first make this configuration available to the plug-in by using the ibmcloud ob monitoring agent discover command. {: note}

ibmcloud ob monitoring config show --cluster CLUSTER --instance MONITORING_INSTANCE

{: pre}

Supported infrastructure provider:

  • Classic infrastructure provider icon Classic
  • VPC infrastructure provider icon VPC

Minimum required permissions:

  • Viewer platform access role and Reader service access role for the ibm-observe Kubernetes namespaces in {{site.data.keyword.containerlong_notm}}.
  • Viewer platform access role for {{site.data.keyword.la_full_notm}}

Command options:

--cluster CLUSTER
The name or ID of the cluster for which you want to list existing {{site.data.keyword.mon_short}} configurations. To retrieve your cluster name or ID, run `ibmcloud ks clusters`. This value is required.
--instance LOGGING_INSTANCE
The ID or name of the {{site.data.keyword.mon_full_notm}} service instance for which you want to show the monitoring configuration. To retrieve the name, run `ibmcloud resource service-instances`. This value is required.