I have two queries:
max(pg_database_pg_database_size{instance=~"rds_db1"}) by (instance, kubernetes_namespace)
max(aws_rds_free_storage_space_average{dbinstance_identifier=~"rds_db1"}) by (dbinstance_identifier, kubernetes_namespace)
I want to add those queries together, but the name of the instance labels are different. How can I do it?
I am able to do it if I remove the labels:
max (aws_rds_free_storage_space_average{dbinstance_identifier=~"rds_db1"}) + max(pg_database_pg_database_size{instance=~"rds_db1"})
But I want one of the labels, either dbinstance_identifier or instance, and kubernetes_namespace, which is common to both queries.