[Monitoring] Make monitoring collection API public again (#205190)

Related to https://github.com/elastic/kibana/pull/186882

## Summary

https://github.com/elastic/kibana/issues/186781 required all teams to
make sure that all Kibana APIs in their respective plugins were using
the appropriate access `internal` or `public`.

PR https://github.com/elastic/kibana/pull/186882 flagged the
`/api/monitoring_collection/{type}` API endpoint as `internal`. The
effect of that change was the [appearance of deprecation
logging](https://github.com/elastic/kibana/pull/186882#issuecomment-2431021055)
in Kibana logs, because that endpoint is called from the [`kibana`
Metricbeat
module](https://github.com/elastic/beats/blob/main/metricbeat/module/kibana/kibana.go#L42C1-L46C1)
in order to monitor Kibana.

For this reason, we need to change the access mode of that API endpoint
back to `public`.
This commit is contained in:
Valentin Crettaz 2024-12-27 13:16:01 +01:00 committed by GitHub
parent 03999da148
commit 52cab456fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,7 @@ export function registerDynamicRoute({
},
},
options: {
access: 'internal',
access: 'public',
authRequired: true,
tags: ['api'], // ensures that unauthenticated calls receive a 401 rather than a 302 redirect to login page
},