crowdsec icon indicating copy to clipboard operation
crowdsec copied to clipboard

Seperate LAPI and Agent default metrics ports

Open Crow-Control opened this issue 4 years ago • 4 comments

What would you like to be added?

It would be nice to have the LAPI and Agents either on seperate ports by default or have them configured by env var.

Why is this needed?

When wanting to run Crowdsec LAPI and Agent in a single kubernetes pod with multiple containers, metrics cannot work "out of the box", because both containers use the same (default) port for metrics.

However this cannot be pre-configured by end var, requiring modifications to the configuration after installation, which makes things needlessly troublesome.

Crow-Control avatar Oct 02 '22 17:10 Crow-Control

Yes, we can have it configurable in the helm values.

But if an instance has both agent and lapi, we use the metrics port to see if both are ready, so I'd keep a single port.

mmetc avatar Nov 16 '22 13:11 mmetc

We require this ability to be reasonably able to include crowssec in our SCALE Apps. It has basically been put on hold completely waiting for this, as we do not want to include needless complications to work around this mistake.

To be clear: I'm not asking for anything in helm values, I don't care nor can-use the Helm chart. I'm asking for env-vars.

Crow-Control avatar Nov 16 '22 13:11 Crow-Control

Added METRICS_PORT in https://github.com/crowdsecurity/crowdsec/pull/1891

mmetc avatar Nov 28 '22 09:11 mmetc

Added METRICS_PORT in #1891

Quick, Easy and Clean fix. Thanks! :)

Crow-Control avatar Nov 28 '22 12:11 Crow-Control