deleteAll

Use the deleteAll command to delete objects already discovered along with related artifacts such as transactions, properties, registered services, devices, and containers.

This is useful when initial discovery configuration results in the discovery of too many objects or of objects that are not of interest. Using this command allows you to start over without having to reinstall the system or to manually remove all observed entities and related artifacts.

Caution:

The deleteAll command gives you a clean slate and should be used judiciously to avoid unwanted loss of data, which includes historical data related to observed objects. It is best used when you start working with BTM and are fine tuning your discovery scheme. It should never be used in a production environment.

Run the command with the -preview option to determine what objects will be deleted. Run the command again without the -preview option to actually delete these objects.

After you use this command, you can adjust your discovery configuration and then run more traffic to produce the desired results.

Command Syntax

deleteAll [-f][-P]-s sphereUrl -l username:password
Name Long Name Description
-f -force Forces the deletion of any existing transaction definitions. To retain definitions, you should export them before using the deleteAll command, and reimport them after you re-define your discovery configuration. See the discussion below for more information.
-P -preview Shows the effect of the command by displaying a list of objects to be deleted, without executing the command.
-s -sphereUrl The URL of the sphere.

http://hostname:port/btmcentral/sphere/

This flag is not required if you have set the AP_SPHERE_URL environment variable for your sphere.

-l -userLogin The username and password associated with the sphere, in the format: username:password. This set of credentials must belong to a user in the btmadmin role.

See Security Options in Accessing CLI Commands for information on furnishing login credentials.

You can encrypt passwords using the encryptPassword command.


Discussion

When you start working with BTM, figuring out a good discovery configuration might take several tries. The deleteAll command makes it easy to start over.

There are a number of cases in which discovery results might prove overwhelming or uninteresting. Generally this happens when you accept default probe settings, which enable the monitoring of SOA based applications or OSB environments.

  • SOA-based applications depend upon a large number of internal interconnected EJB components.

  • OSB WebLogic application server hosts a large number of servlets which, in turn, invoke EJB's or other components.

Equally, WEB_APP and EJB probes are also enabled by default which, after a short time, results in discovering more than what you expected..

Making all these components visible is likely to produce too much information. You want to scale back the picture to the elements of interest.

Other factors might also contribute to producing confusing observation results:

  • You install an observer where it does not belong. Services and endpoints are discovered that you are not interested in.

  • It is not always obvious how to optimize the use of BTM monitors until you get to know how BTM works. You might decide to add a monitor and to reassign different probes to different monitors. Objects discovered before and after this change are both now visible.

  • You update deployments, which results in seemingly redundant service or endpoint registrations.

In sum, you want to start over completely without having to reinstall the system or to manually remove all observed entities and related artifacts. The deleteAll command allows you to do just this.

The deleteAll command deletes data about the following:

  • non-system containers

  • user services and service interfaces

    Both user-registered endpoints and discovered endpoints are deleted.

  • devices

  • dependencies

  • properties

  • transaction definitions (using the -f option)

  • observers and their probes (not the installed bits, just their representation in the Sphere)

  • persisted runtime data related to the items listed above

    This includes measurements and captured message data.

To ensure that you do not lose transaction definitions that you might need later, the deleteAll command requires that you use the -force option to force their deletion. If you want to use these definitions in the future, you should export the transactions and then re-import them after you have redefined your discovery configuration. If you have used properties to enable manual correlation, BTM will re-create these properties to specify those dependencies.

The deleteAll command does not delete data about the following:

  • system and user policies.

    These will be reapplied to newly discovered and registered entities. If you created policies that no longer apply to anything newly discovered, you will need to remove them.

  • consumers

  • schedules

  • alerts

  • system configuration

Examples

The following example show how you use the deleteAll command to delete all discovered and associated artifacts from your system. Sample output follows the command:

btmcli deleteAll 

Warning: This command will delete your discovered / registered items in BTM. Continue? (y/n) [n]: y
Deleted Services:
     OrderService
     ShippingService
     bookmartClient
     PurchasingDB
     CreditService
     WarehouseService
 
Deleted Containers:
    jmeredit-lap:9200
 
Deleted Observer Probes:
    Web Application
    Servlet
    Web Service
    JAX-RPC
    Database
    JDBC
    JMS Message Consumer
    JMS