devops-ia / helm-opencti

Helm chart for Open Cyber Threat Intelligence Platform
https://devops-ia.github.io/helm-opencti/
MIT License
13 stars 9 forks source link

Expose metrics port for connectors #85

Open qoeveleie21 opened 1 week ago

qoeveleie21 commented 1 week ago

Is your feature request related to a problem?

I would like to use prometheus to scrape the metric endpoint for each connector. However it appears that the deployment for connectors does not expose a port to be able to do this.

Describe the solution you'd like

Expose a port to scrape the metric endpoint from the pod. The port should be configurable through the helm values.

qoeveleie21 commented 2 days ago

@ialejandro Would the maintainers be willing to merge a PR if I were to open one myself?

ialejandro commented 2 days ago

@ialejandro Would the maintainers be willing to merge a PR if I were to open one myself?

Yes!

qoeveleie21 commented 1 day ago

@ialejandro Great! Before I start I had a small consideration for the solution:

It would be neat to use a service monitor definition as the server component uses that as well. Do you think it is better to be able to turn on/off monitoring per connector. Or should I reuse the the generic service monitor settings from the values file, and just enable/disable the service monitor object for all connectors?

ialejandro commented 1 day ago

@ialejandro Great! Before I start I had a small consideration for the solution:

It would be neat to use a service monitor definition as the server component uses that as well. Do you think it is better to be able to turn on/off monitoring per connector. Or should I reuse the the generic service monitor settings from the values file, and just enable/disable the service monitor object for all connectors?

Exists https://github.com/devops-ia/helm-opencti/tree/main/charts/opencti/templates/connector template folder exclusive for connector, I think its a good a idea use ServiceMonitor only for connector with a conditional to enable or disable per each connector.

What do you think?

qoeveleie21 commented 14 hours ago

@ialejandro Great! Before I start I had a small consideration for the solution: It would be neat to use a service monitor definition as the server component uses that as well. Do you think it is better to be able to turn on/off monitoring per connector. Or should I reuse the the generic service monitor settings from the values file, and just enable/disable the service monitor object for all connectors?

Exists https://github.com/devops-ia/helm-opencti/tree/main/charts/opencti/templates/connector template folder exclusive for connector, I think its a good a idea use ServiceMonitor only for connector with a conditional to enable or disable per each connector.

What do you think?

Agreed! It should be configurable for each connector.