Query Double Check

Hey All,

I just wanted to double check a query I wrote. I have a switch that returns its port operating status 1 = up, 2 = down. We have some unused ports that are kept off so I don’t really need to report on those, I only want to know if the port has a status of 2 since the last time the metrics were scraped.

changes(status{devices="switch"}[120s]) > 0 and status == 2

the switch is scraped every 120 seconds