rh-messaging / artemis-prometheus-metrics-plugin

Apache License 2.0
22 stars 20 forks source link

Metrics plugin responds "404- not found" #21

Closed allwynsamuel closed 10 months ago

allwynsamuel commented 10 months ago

Wanted to report about an issue that im facing. During artemis service restart i often find that the metrics plugin responds "404- not found". Under what circumstance can I expect this to happen?.

Initially suspected if it has to do with scrape _interval setting under Prometheus, but tuning that didn't help fix this issue. Im using Artemis v2.31.0., Prometheus v2.45.0.

MicrosoftTeams-image (20)

brusdev commented 10 months ago

@allwynsamuel this issue is expected during the loading because the web apps are loaded after starting the embedded web server.

allwynsamuel commented 10 months ago

@allwynsamuel this issue is expected during the loading because the web apps are loaded after starting the embedded web server. Wanted to clarify, If this is expected to be observed even after the service is up(artemis service)?. "404-Not found" response is received during service restart (artemis service) and it prevails even after the service had started.

brusdev commented 10 months ago

@allwynsamuel could you clarify after the service had started? How do you check that the service had started?

allwynsamuel commented 10 months ago

@brusdev I check the artemis service which is configured as systemd service.

I understand that during startup, somehow the registry is getting marked as null and which is why this SC "404".

In artemis logs, only below info is logged w.r.t metrics plugin.

2023-10-27 11:10:34,657 INFO [org.apache.activemq.artemis.core.server] AMQ221082: Initializing metrics plugin com.redhat.amq.broker.core.server.metrics.plugins.Artemis PrometheusMetricsPlugin with properties: {} 2023-10-27 11:10:34,699 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server version 2.31.0 2023-10-27 11:10:34,756 INFO [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration

brusdev commented 10 months ago

@allwynsamuel the component that loads the registry and the web component start in parallel so it could happen that the metric endpoint starts listening before the registry is loaded and I don't think there is an easy way to change this behavior.