The setting for the metrics retention time needs to be set on every appliance. This is because the request to execute a purge is based on the presence of the ems_metrics_coordinator role in the environment, but the setting is not taken from the appliance with that role. The safest option would be to set the value everywhere, but the setting is being taken from the appliance with the scheduler role active. Because the the scheduler role could failover to a different server, this should just always be set for all appliances in a region (or ideally set as a region wide setting). This should take care of the purging issue; the growth of the table is a separate issue. To stop the growth of that particular table a user should be able to stop collecting metrics based on tags be turning off the "Capture C & U Data by Tag" value described by the "4.1.1.4.2. Creating a Tag Category" section in https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.5/html-single/general_configuration/#regions for all tag categories.
https://github.com/ManageIQ/manageiq/pull/16425
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/e04a60eb67c81f39944b417c450290ee74deea68 commit e04a60eb67c81f39944b417c450290ee74deea68 Author: Nick Carboni <ncarboni> AuthorDate: Wed Nov 8 17:28:58 2017 -0500 Commit: Nick Carboni <ncarboni> CommitDate: Wed Nov 8 17:28:58 2017 -0500 Add purging for vim_performance_tag_values with disabled tags When a user stops collecting C&U data for a particular tag category, the records hang around in vim_performance_tag_values until they are purged by date. This commit adds an option to the purge_orphaned_tag_values.rb tool to remove such values immediately. https://bugzilla.redhat.com/show_bug.cgi?id=1510484 tools/purge_orphaned_tag_values.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
Created attachment 1349998 [details] vim_performance_tag_values purge tool This is a replacement for the current file at /var/www/miq/vmdb/tools/purge_orphaned_tag_values.rb Running this file with no options will purge rows from the vim_performance_tag_values table which no longer have a corresponding metric. This new version adds an option to remove rows which map to a tag category which is no longer set to collect data from metrics. These rows could still be used in reports (as their metrics likely still exist), but if the C&U collection was enabled for many tags by mistake, this is how you can remove some of the data which would accumulate in this table. To delete both types of rows you can run the following from the vmdb directory: `tools/purge_orphaned_tag_values.rb --purge-disabled-tag-values`
Please provide script and instructions in comment #9 to customer
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/d0bc3369c04d7196e97a54176505299109fb2107 commit d0bc3369c04d7196e97a54176505299109fb2107 Author: Gregg Tanzillo <gtanzill> AuthorDate: Tue Dec 19 15:36:36 2017 -0500 Commit: Gregg Tanzillo <gtanzill> CommitDate: Tue Jan 2 14:17:14 2018 -0500 Stop generating `vim_performance_tag_values` rows Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1510484 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1514505 app/models/metric/ci_mixin/rollup.rb | 1 - app/models/storage.rb | 2 -- .../connection_adapters/miq_postgres_adapter.rb | 4 ---- .../connection_adapters/miq_postgres_legacy_adapter.rb | 4 ---- spec/models/vim_performance_tag_spec.rb | 2 -- tools/metrics_populate_retro_tags.rb | 13 ------------- 6 files changed, 26 deletions(-)
Verified on 5.10.0.3.