Deleting old resource configuration history using JBoss ON CLI

Solution Unverified - Updated

Environment

  • Red Hat JBoss Operations Network (ON) 3.1.2
  • Using JBoss ON Command-Line Interface (CLI) to delete resource or plug-in configuration update history

Issue

  • Script example that deletes old resource configuration histories
  • Script that finds and removes all resource configuration older then X days
  • Need to clean configuration history entries based on time
  • Example JScript to find and remove all configuration updates older 30 days

Resolution

Plug-in and resource configuration update history can not be removed or deleted using the JBoss ON CLI or remote API.

Configuration update history must be deleted using the JBoss ON user interface (UI). This can be done per resource or from the configuration history report page.

Root Cause

The necessary method required to delete the configuration update history using the remote API is not exposed. Specifically:

org.rhq.enterprise.server.configuration.ConfigurationManagerBean.purgeResourceConfigurationUpdates(Subject subject, int[] configurationUpdateIds, boolean purgeInProgress)

This content is not included.Red Hat Bugzilla 1155693 has been captured to address the missing method and will be considered in a future release.

SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.