I am trying to come up with a way to verify that the list of values for a label “hosts” for one metric is the same as the list of values for a similar label for a different metric and return the difference as a list. At this time one Prometheus job is manually configured and one is dynamic so I want to create a verification table.
I can come up with any number of queries to return each list but how would I then compare results 1 to results 2 based on a label? I thought of using variables where variable_1 is all of the label values for metric 1 and variable_2 is a list of all the label values for metric 2. But is there a way to compare the 2 variables (strings) and return the difference?