appmetrics-prometheus icon indicating copy to clipboard operation
appmetrics-prometheus copied to clipboard

Expose monitor to allow attaching to a particular server

Open dcowden opened this issue 7 years ago • 0 comments

For security reasons, we need to run our monitoring endpoints on a separate port.

We use appmetrics-dash, which allows us to create a new server, and host dashboard on that server:

	let metricsServer = http.createServer();
        metricsServer.listen(3030);
	dash.monitor({
		server: metricsServer,
		appmetrics: appmetrics
	});

This option is not available with appmetrics-prometheus, evidently by design

We can workaround this limitation by organizing our code to create the monitoring server after the main server, but this is annoying. I expect to be able to do :

        prometheus.monitor({
                server: myServer,
		appmetrics: appmetrics
	})

dcowden avatar May 04 '18 15:05 dcowden