Metrics exporter for prometheus
Hi.
I was wondering if you plan to add some kind of metrics for the SC? At the moment not sure what kind of metrics you can export, but I think may be useful to know the current state of the cluster.
Thx.
Yes please!
I don't think that's the purpose of the framework. You could implement this yourself using middleware. I put a quick example below:
agServer.setMiddleware(agServer.MIDDLEWARE_INBOUND, async (middlewareStream) => {
for await (let action of middlewareStream) {
console.log(action.data)
// All the metrics logic
action.allow()
}
});
More on middleware here
I'm a bit surprised there's no prometheus exporter for this project, especially since it provides a k8s installation out of the box.
I highly recommend using Rancher (https://rancher.com/) with Kubernetes. The Rancher control panel comes with Kubernetes and Grafana (https://grafana.com/) which provides detailed real-time metrics about the state of the cluster (CPU usage, memory, hard drive etc...). It's all free and open source.
The Rancher control panel allows any SC service to be scaled up or down at the click of a button.
That said, it someone wants to add support for some other cluster monitoring software, then feel free to raise an issue with a description of the proposed solution.