Follow

Removing Sources from Your Account

A source, associated 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. Check the box labeled Allow removing / un-removing.
  3. For each source you wish to remove uncheck enabled and check removed.
  4. Click the save button to apply your changes.

Removing Source Programmatically

Removing many sources is tedious so a REST API call is provide to programmatically remove sources.

Documentation on the API to remove sources by name is here

Listing Sources In An Account

Sources in an account are listed by the following call:

$ curl -X GET -u "<e-mail>:$<api-token>" \ 'https://api.truesight.bmc.com/v1/account/sources'

Deleting A Source In An Account

1 or more sources can be removed by the following command:

$ curl -X DELETE -u "<e-mail>:$<api-token>" \

'https://api.truesight.bmc.com/v1/sources/byName' \

-H "Content-Type: application/json" \

-d ' { "names": [ "source1", "source2" ] }'

Deleting All Sources

For this example you need to have the command line tools described here and have the jq tool installed which is downloaded from here.

$ source-list | jq '.result.sources | .[] | .name' | tr -d '"' > sources.txt # Generate a list of sources

$ for source in $(cat sources.txt); do echo "deleting source: $source" ; source-delete -s $source; sleep 1; done # Remove each of the sources listed in the file

Have more questions? Submit a request