ministryofjustice / cloud-platform

Documentation on the MoJ cloud platform
MIT License
87 stars 44 forks source link

prometheus and alertmanager API access #5074

Closed mattops closed 9 months ago

mattops commented 10 months ago

Would it be possible to gain access to the these API end points from within the cluster:

https://prometheus.live.cloud-platform.service.justice.gov.uk/api/v1/alerts

and

https://alertmanager.live.cloud-platform.service.justice.gov.uk/api/v2/alerts

We would like to able to integrate the data from these endpoints in the hmpps developer portal so we can show currently firing alerts along with other alerting/monitoring data sources (e.g pingdom) in a unified view for dev teams.

sj-williams commented 9 months ago

Testing port-forwarding of alertmanager and prometheus web services shows that internal calls to these API endpoints can be done as internal cluster traffic does not need to route via the external facing proxies.

However enabling this without additional security measures applied for internal access would mean creating NetworkPolicy rules between client namespace and our Monitoring namespace which is not acceptable.

sj-williams commented 9 months ago

Created a new ticket to look at implementing this as a service: https://github.com/ministryofjustice/cloud-platform/issues/5207