In Graphite, it is not easy to add / subtract / multiply / divide a metric from another one. Graphite provides a lot of functions that enable users to have meaningful metrics, but it has its own limited usage to one single type of metric. Users have to generate a metric from different types of metrics by applying those arithmetic operations in non-intuitive way. Suppose we want to generate a new metric by applying summation on cpu_user and memory_usage. To do this, users have to use group() function to bundle two metrics together and use groupByTags on them to get desired result.
In Prometheus, it is done in quite intuitive way by querying with cpu_user + memory_usage. Prometheus automatically matches metrics having the same set of tags and make the desired result.
Currently users are now able to query metrics with tags, this can be achieved in limited sense but more intuitive way by supporting arithmetic operations in the value of @name tag. Users may generate the metric in the above by simply querying with seriesByTags('@name=cpu_user+memory_usage'), handling the query on the server by fetching metrics having @name=cpu_user, @name=memory_usage first then matching metrics having the same set of tags, and finally applying +operation on them.
In Graphite, it is not easy to add / subtract / multiply / divide a metric from another one. Graphite provides a lot of functions that enable users to have meaningful metrics, but it has its own limited usage to one single type of metric. Users have to generate a metric from different types of metrics by applying those arithmetic operations in non-intuitive way. Suppose we want to generate a new metric by applying summation on
cpu_userandmemory_usage. To do this, users have to use group() function to bundle two metrics together and use groupByTags on them to get desired result.In Prometheus, it is done in quite intuitive way by querying with
cpu_user + memory_usage. Prometheus automatically matches metrics having the same set of tags and make the desired result.Currently users are now able to query metrics with tags, this can be achieved in limited sense but more intuitive way by supporting arithmetic operations in the value of
@nametag. Users may generate the metric in the above by simply querying withseriesByTags('@name=cpu_user+memory_usage'), handling the query on the server by fetching metrics having@name=cpu_user,@name=memory_usagefirst then matching metrics having the same set of tags, and finally applying+operation on them.