I have this query:

*((node_memory_MemTotal{instance="hostname.example.com:9100"} - 
(node_memory_MemFree + node_memory_Buffers + node_memory_Cached)) / 
node_memory_MemTotal) * 100 *

I'm surprised to find that every other metric after:
*node_memory_MemTotal{instance="hostname.example.com:9100"}*

"knows" to use that instance, such as node_memory_MemFree, and that I don't 
need to declare that instance every time thereafter so that the query grows 
into:

*((node_memory_MemTotal{instance="hostname.example.com:9100"} - 
(node_memory_MemFree{instance="hostname.example.com:9100"} + 
node_memory_Buffers{instance="hostname.example.com:9100"} + 
node_memory_Cached{instance="hostname.example.com:9100"})) / 
node_memory_MemTotal{instance="hostname.example.com:9100"}) * 100* 

How does Prometheus know to keep and use that same returned instance for 
the entire query? 

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/06b8d835-2c30-43dd-9467-16f6c032e28an%40googlegroups.com.

Reply via email to