Show metrics by server/IP

I’m using the node.js module to collect metrics. It is working well out of the box. But What I’d like to do is compare metrics between different servers running in my swarm. Is there some way that I can categorise the metrics by server (e.g. IP address)? Perhaps by adding a tag or category of some sort in the node.js code, so that I can then limit display of metrics to only one of those categories/tags (but still display metric across all categories/tags too)?

Hi, @michael53: Rather than calling recordMetric(), you might try POSTing to the Metric API, which allows you to add additional metadata (such as server name). There is also a Telemetry SDK, which provides a Node.js wrapper around the Metric API.

1 Like