Hi Albaasith,

artemis-prometheus-metrics-plugin 3.x is for future ActiveMQArtemis
versions. You can use artemis-prometheus-metrics-plugin 2.1.0 for
ActiveMQArtemis 2.33.0. A similar issue was already discussed at
https://github.com/rh-messaging/artemis-prometheus-metrics-plugin/issues/29

Regards,
Domenico

On Mon, 24 Jun 2024 at 00:17, Dondorp, Erwin <erwin.dond...@cgi.com.invalid>
wrote:

> Ahamed,
>
> > Dear Team
> You are asking this to a community…
>
> > Prometheus and Grafana Monitoring
> I’m already using this.
>
> > “building the project using Maven”
> Are you trying to rebuild Artemis for this? That should not be needed. I’m
> using just the regular Artemis distribution.
>
> I’m using the following steps after installing the Artemis software and
> after creating an instance, but before starting the instance:
>
>   1.  Copy artemis-prometheus-metrics-plugin-*.jar to the “lib” directory
> of the Artemis instance.
>   2.  Added “<plugin
> class-name="com.redhat.amq.broker.core.server.metrics.plugins.ArtemisPrometheusMetricsPlugin"/>”
> to the “<metrics>” section in broker.xml.
>   3.  Copy artemis-prometheus-metrics-plugin-servlet-*.war to the “web”
> directory of the Artemis instance and renaming it to “metrics.war”.
> Create the “web” directory when it is not yet there.
>   4.  Added “<app url="metrics" war="metrics.war"/>” to file
> etc/bootstrap.xml.
> If you do not rename in the previous step, this war-filename is different.
>   5.  Start the broker and pull the metrics from
> http://hostname:8161/metrics.
>   6.  The instructions for collecting the metrics and placing them in
> Prometheus is dependent on your actual environment.
>
> 1+2 make sure that Artemis can maintain the needed counters.
> 3+4 make sure that the counters can be exported in the Prometheus (or
> metrics) format using http.
>
> Erwin
>
> From: Albaasith Ahamed <albaasi...@amlakint.com.INVALID>
> Sent: Saturday, June 22, 2024 2:39 PM
> To: users@activemq.apache.org
> Cc: Justin Bertram <jbert...@apache.org>
> Subject: RE: Encountering Startup Error After Adding Prometheus and
> Grafana Monitoring to Artemis 2.33
>
> EXTERNAL SENDER: Do not click any links or open any attachments unless you
> trust the sender and know the content is safe.
> EXPÉDITEUR EXTERNE: Ne cliquez sur aucun lien et n’ouvrez aucune pièce
> jointe à moins qu’ils ne proviennent d’un expéditeur fiable, ou que vous
> ayez l'assurance que le contenu provient d'une source sûre.
>
>
> Any update
>
>
> Regards,
> Albaasith Ahamed
>
>
>
>
> Albaasith Ahamed
>
> https://www.amlakint.com<
> https://urldefense.com/v3/__https:/www.amlakint.com__;!!AaIhyw!qbjPH6jRpMVYinFFDaU90-OEznHOVYa4ZVZwEKy-xalj1kpi2p17MTGe0PX_g0y1lT06mnqAui_7mG9xD1p-FgwYspMMbg$
> >
> P.O Box 28088 Riyadh 11437
>
>
> albaasi...@amlakint.com<mailto:albaasi...@amlakint.com>
> [cid:imagee5fa8e.PNG@84a2f688.48b44401]<
> https://urldefense.com/v3/__https:/www.amlakint.com/__;!!AaIhyw!qbjPH6jRpMVYinFFDaU90-OEznHOVYa4ZVZwEKy-xalj1kpi2p17MTGe0PX_g0y1lT06mnqAui_7mG9xD1p-Fgx4fwH0dw$
> >
>
> [cid:image4074f5.PNG@10dfec0b.4bba7b5e]<
> https://urldefense.com/v3/__https:/www.facebook.com/Amlakint/__;!!AaIhyw!qbjPH6jRpMVYinFFDaU90-OEznHOVYa4ZVZwEKy-xalj1kpi2p17MTGe0PX_g0y1lT06mnqAui_7mG9xD1p-FgwOqWAjfA$
> >
>
> [cid:imagea9a038.PNG@85c2f2d7.428a4dea]<
> https://urldefense.com/v3/__https:/www.twitter.com/amlakint__;!!AaIhyw!qbjPH6jRpMVYinFFDaU90-OEznHOVYa4ZVZwEKy-xalj1kpi2p17MTGe0PX_g0y1lT06mnqAui_7mG9xD1p-FgwRFkOx8w$
> >
>
> [cid:image725893.PNG@729e9b71.41968fc8]<
> https://urldefense.com/v3/__https:/www.linkedin.com/company/amlakint__;!!AaIhyw!qbjPH6jRpMVYinFFDaU90-OEznHOVYa4ZVZwEKy-xalj1kpi2p17MTGe0PX_g0y1lT06mnqAui_7mG9xD1p-FgwCF2xghQ$
> >
>
> [cid:imagea47349.PNG@73d50f93.479c5b83]<
> https://urldefense.com/v3/__https:/www.youtube.com/channel/UCTSNh9_vD5jn1SW6Sjs-9MQ__;!!AaIhyw!qbjPH6jRpMVYinFFDaU90-OEznHOVYa4ZVZwEKy-xalj1kpi2p17MTGe0PX_g0y1lT06mnqAui_7mG9xD1p-Fgx4MR1XCg$
> >
>
>
> _
>
>
>
> From: Albaasith Ahamed
> Sent: Wednesday, June 19, 2024 2:08 PM
> To: users@activemq.apache.org<mailto:users@activemq.apache.org>
> Cc: 'Justin Bertram' <jbert...@apache.org<mailto:jbert...@apache.org>>
> Subject: Encountering Startup Error After Adding Prometheus and Grafana
> Monitoring to Artemis 2.33
>
> Dear Team,
>
>
> I am planning to implement monitoring using Prometheus and Grafana. To do
> this, I am adding the necessary JARs and WAR file to Artemis version 2.33.
> taking these files and building the project using Maven, I followed the
> steps from the provided GitHub URL. However, upon starting Artemis, I am
> encountering the following error in the console.
>
> https://github.com/rh-messaging/artemis-prometheus-metrics-plugin<
> https://urldefense.com/v3/__https:/github.com/rh-messaging/artemis-prometheus-metrics-plugin__;!!AaIhyw!qbjPH6jRpMVYinFFDaU90-OEznHOVYa4ZVZwEKy-xalj1kpi2p17MTGe0PX_g0y1lT06mnqAui_7mG9xD1p-Fgx3szy0TA$
> >
>
>
>
> Error
>
>
>
> Hawtio loginRedirectFilter is using 1800 sec. HttpSession timeout
> 2024-06-19 13:38:11,070 WARN  [org.eclipse.jetty.webapp.WebAppContext]
> Failed startup of context o.e.j.w.WebAppContext@5e85c21b
> {/metrics,file:///D:/apache-artemis-2.33.0-bin/apache-artemis-2.33.0/bin/primary/tmp/webapps/metrics.war/webapp/,UNAVAILABLE,@Connector-0}{D:\apache-artemis-2.33.0-bin\apache-artemis-2.33.0\web\metrics.war}<mailto:
> o.e.j.w.WebAppContext@5e85c21b
> %7b/metrics,file:///D:/apache-artemis-2.33.0-bin/apache-artemis-2.33.0/bin/primary/tmp/webapps/metrics.war/webapp/,UNAVAILABLE,@Connector-0%7d%7bD:\apache-artemis-2.33.0-bin\apache-artemis-2.33.0\web\metrics.war%7d>
> java.lang.NoClassDefFoundError: jakarta/servlet/http/HttpServlet
>         at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> ~[?:?]
>         at
> java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[?:?]
>         at
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> ~[?:?]
>         at 
> java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
> ~[?:?]
>         at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
> ~[?:?]
>         at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
> ~[?:?]
>         at java.base/java.security.AccessController.doPrivileged(Native
> Method) ~[?:?]
>         at 
> java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
> ~[?:?]
>         at
> org.eclipse.jetty.webapp.WebAppClassLoader.foundClass(WebAppClassLoader.java:594)
> ~[jetty-webapp-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource(WebAppClassLoader.java:567)
> ~[jetty-webapp-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:502)
> ~[jetty-webapp-10.0.20.jar:10.0.20]
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> ~[?:?]
>         at org.eclipse.jetty.util.Loader.loadClass(Loader.java:59)
> ~[jetty-util-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:97)
> ~[jetty-servlet-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:369)
> ~[jetty-servlet-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
> ~[jetty-util-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$2(ServletHandler.java:724)
> ~[jetty-servlet-10.0.20.jar:10.0.20]
>         at
> java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
> ~[?:?]
>         at
> java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
> ~[?:?]
>         at
> java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
> ~[?:?]
>         at
> java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
> ~[?:?]
>         at
> java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
> ~[?:?]
>         at
> java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
> ~[?:?]
>         at
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:749)
> ~[jetty-servlet-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
> ~[jetty-servlet-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304)
> ~[jetty-webapp-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:901)
> ~[jetty-server-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
> ~[jetty-servlet-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532)
> [jetty-webapp-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
> [jetty-util-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
> [jetty-util-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
> [jetty-util-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
> [jetty-server-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
> [jetty-util-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
> [jetty-util-10.0.20.jar:10.0.20]
>         at org.eclipse.jetty.server.Server.start(Server.java:470)
> [jetty-server-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
> [jetty-util-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
> [jetty-server-10.0.20.jar:10.0.20]
>         at org.eclipse.jetty.server.Server.doStart(Server.java:415)
> [jetty-server-10.0.20.jar:10.0.20]
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
> [jetty-util-10.0.20.jar:10.0.20]
>         at
> org.apache.activemq.artemis.component.WebServerComponent.start(WebServerComponent.java:215)
> [artemis-web-2.33.0.jar:2.33.0]
>         at
> org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.addExternalComponent(ActiveMQServerImpl.java:1018)
> [artemis-server-2.33.0.jar:2.33.0]
>         at
> org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:145)
> [artemis-cli-2.33.0.jar:2.33.0]
>         at
> org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:221)
> [artemis-cli-2.33.0.jar:2.33.0]
>         at
> org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:167)
> [artemis-cli-2.33.0.jar:2.33.0]
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) ~[?:?]
>         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> ~[?:?]
>         at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[?:?]
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> ~[?:?]
>         at
> org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:157)
> [artemis-boot.jar:2.33.0]
>         at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:64)
> [artemis-boot.jar:2.33.0]
> Caused by: java.lang.ClassNotFoundException:
> jakarta.servlet.http.HttpServlet
>         at 
> java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
> ~[?:?]
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
> ~[?:?]
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> ~[?:?]
>         at
> org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:511)
> ~[jetty-webapp-10.0.20.jar:10.0.20]
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> ~[?:?]
>
>
>
>
> regards,
> Albaasith Ahamed
>

Reply via email to