copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2021-03-28 |
IBM Cloud, monitoring, provision instance |
monitoring |
{{site.data.keyword.attribute-definition-list}}
{: #provision}
Before you can monitor and manage metrics, you must provision an instance of the service in {{site.data.keyword.cloud_notm}}. {: shortdesc}
{: #provision_ui}
To provision an instance from the {{site.data.keyword.cloud_notm}} catalog, complete the following steps:
-
Log in to the {{site.data.keyword.cloud_notm}} console{: external}.
-
Click Catalog. The list of the services that are available on {{site.data.keyword.cloud_notm}} opens.
-
To filter the list of services that is displayed, select the Logging and Monitoring category.
-
Click the {{site.data.keyword.mon_full_notm}} tile.
-
Select Create.
-
Select the location.
-
Select a service plan. By default, the Lite plan is set.
To provision an instance that only includes the Monitor component, select the plan Graduated Tier.
To provision an instance that include the Monitor and the Secure components, select the plan Graduated Tier - Sysdig Secure + Monitor.
For more information about the service plans, see Service plans.
-
Enter a service name.
-
Select a resource group. By default, the Default resource group is set.
-
Set on automatic collection of platform metrics by clicking Enable.
-
Click Create.
After you provision an instance,
- The Observability dashboard opens.
- A service ID is automatically created. You can use this service ID to get the access key for your instance. The name of the service ID has the following format:
{InstanceName}-key-admin
.
Next, configure a metric source by adding an agent. This agent is responsible for collecting and forwarding metrics to the monitoring instance.
{: #provision_cli}
To provision an instance through the command line, complete the following steps:
-
[Pre-requisite] Installion of the {{site.data.keyword.cloud_notm}} CLI. If the CLI is installed, continue with the next step.
-
Log in to the region in the {{site.data.keyword.cloud_notm}} where you want to provision the instance. Run the following command: ibmcloud login
-
Set the resource group where you want to provision the instance. Run the following command: ibmcloud target
By default, the
default
resource group is set. -
Create the instance. Run the ibmcloud resource service-instance-create command:
ibmcloud resource service-instance-create NAME sysdig-monitor SERVICE_PLAN_NAME LOCATION -p '{"default_receiver": false,"external_api_auth": "API_AUTH"}'
{: pre}
Where
NAME
is the name of the instance.service-name
is the name of the {{site.data.keyword.mon_full_notm}} service name in the {{site.data.keyword.cloud_notm}}.SERVICE_PLAN_NAME
is the type of plan. See Service plans to get the plan name.LOCATION
is the region where the instance is created.default_receiver
is set tofalse
by default. Set totrue
to collect platform metrics automatically through this instance in a region.API_AUTH
is set to the authorization model that is enabled to authenticate with the {{site.data.keyword.mon_full_notm}} service when you use Python scripts or the REST API. Valid values are:ANY
, andIAM_ONLY
.For example, to provision an instance with the paid plan, run the following command:
ibmcloud resource service-instance-create monitoring-instance-01 service-name graduated-tier us-south -p '{"default_receiver": false}'
{: pre}
To provision an instance with the paid plan that only allows IAM tokens, run the following command:
ibmcloud resource service-instance-create monitoring-instance-01 service-name graduated-tier us-south -p '{"default_receiver": false,"external_api_auth": "IAM_ONLY"}'
{: pre}
-
Create the service key that connects to the instance ibmcloud resource service-key-create
ibmcloud resource service-key-create NAME ROLE_NAME --instance-name SERVICE_INSTANCE_NAME
{: pre}
Where
NAME
is the name of your new service keyROLE_NAME
is eitherAdministrator
,Manager
,Writer
, orReader
SERVICE_INSTANCE_NAME
is the name of the instance you createdThis will gain you access to the instance's access key.