Follow

Removing Sources from Your Account

A sourceassociated with a measurement value, describes an instance of a thing being measured such as the overall CPU usage of a host, or number of gigabytes used on a file system.

When using the AWS Integration, sources in the form of instance ids are unique across time and can accumulate if your particular workloads are elastic enough that instances are started and terminated on regular basis.

To prevent cruft sources from being displayed in the left-hand legend, sources can be removed by either using the web interface or programmatically through a REST API.

NOTE: Removing a source does not remove its associated measurements; it only removes its visibility within the account, such as the left-hand legend.

 

Removing Sources Using the Web UI

  1. Click on the settings icon (a gear) and select Sources.
  2. For each source you wish to remove select 'Delete'.

Removing Source Programmatically

Removing many sources is tedious so REST API calls are provided to programmatically remove sources.

Listing Sources In An Account

Sources in an account are listed by the following call:

$ curl https://api.truesight.bmc.com/v1/sources -X GET -u <email>:<api-token>

You can add the query parameter '?query=service' to get all sources with that service name. For instance, getting all sources with 'ubuntu' in the service name.

$ curl https://api.truesight.bmc.com/v1/sources?query=ubuntu -X GET -u <email>:<api-token>

To bring back information on a specific source you can use the service name. For example:

$ curl https://api.truesight.bmc.com/v1/sources/service-01.prod.domain.com -X GET -u <email>:<api-token>

Listing Groups In An Account

Groups (filters) in an account are listed by the following call:

$ curl https://api.truesight.bmc.com/v1/groups -X GET -u <email>:<api-token>

Example output:

{
"id": "prod-servers",
"name": "prod servers",
"description": "Production Servers",
"query": "*prod* && last: 2h",
"system": false,
"tenantId": "78facb56-f21c-40bb-9cb5-ddae78fb47b8"
},
{
"id": "stage-servers",
"name": "stage servers",
"description": "Staging Servers",
"query": "*stage* && last: 8h",
"system": false,
"tenantId": "78facb56-f21c-40bb-9cb5-ddae78fb47b8"
}


Deleting A Source In An Account

Once you know the source name it can be removed with the following command. For example to delete a source named 'service-02.prod.domain.com':

$ curl https://api.truesight.bmc.com/v1/sources/service-02.prod.domain.com -X DELETE -u <email>:<api-token>

Deleting A Group In An Account

For instance, using the group ID, to delete all servers associated to the 'prod-servers' group:

$ curl https://api.truesight.bmc.com/v1/groups/prod-servers -X DELETE -u <email>:<api-token>

Deleting All Sources

WARNING - This command will delete ALL sources in an account:

$ curl https://api.truesight.bmc.com/v1/sources -X DELETE -u <email>:<api-token>

For more information on API documentation please see the following link.

Have more questions? Submit a request