Type: New Feature
Affects Version/s: None
Fix Version/s: 2.5.0
Sprint:Platform Sprint 10, Platform Sprint 11, Platform Sprint 12, Platform Sprint 13
Basic matrics more expensive then enhanced metrics.
CloudWatch Logs are not always available, too, for cost or other reasons.
We should allow users to disable basic and/or enhanced metrics when RDS instance is added. That feature should be available via API and Add RDS Instance UI (as an additional checkbox).
- Add disable_basic_metrics, disable_enhanced_metrics fields to per-instance configuration.
- Do not check session and start scraper for that instance if metrics are disabled.
- Both /basic and /enhanced endpoints / Prometheus registries should still be available even if basic and enhanced metrics are disabled for all instances in the configuration.
- Inventory API: add flags disable_basic_metrics, disable_enhanced_metrics to RDSExporter;
- Inventory API: add flags basic_metrics_disabled, enhanced_metrics_disabled to AddRDSExporterRequest;
- Management API: add flags disable_basic_metrics, disable_enhanced_metrics to AddRDSRequest.
- Add rds_basic_metrics_disabled, rds_enhanced_metrics_disabled fields into Agent model.
- Accept, save, and return those fields in all APIs.
- Include those fields in rds_exporter configuration for pmm-agent.
- Still always add /basic and /enhanced endpoints to Prometheus configuration even if all metrics are disabled.
- Add flags disable-basic-metrics, disable-enhanced-metrics into pmm-admin inventory add agent rds-exporter command.
- There is no management command to add RDS instance, so nothing should be done for management commands.
- Add two checkboxes on add RDS instance page / section .
- we MUST explain flags in our documentation
- All flags and fields are called "disable"/"disabled" instead of "enable"/"enabled" to play nicely with Go and protobuf default values for booleans, and for backward compatibility.
- The ability to change enable/disable enhanced/basic metrics without removing and re-adding RDS instance (or just rds_exporter via Inventory API) is not in scope. No changes in ChangeRDSExporter Inventory API.
- Refactoring Agent model in pmm-managed to merge several different fields (query_examples_disabled, max_query_log_size, basic_metrics_disabled, etc) into a single JSON field is a separate ticket: PMM-5086
- Combining basic and enhanced metrics in a single endpoint is a separate ticket: PMM-1901
- Automatic detection of whatever basic and enhanced metrics should be enabled is out-of-scope. Roma Novikov will create a separate ticket.