I have a small misunderstanding regards to Artemis console. When I open it on a local host it shows like this:
However, when I install it on a remote host and open it, it shows like this:
How to make it so that the first variation of UI would show on a remote host?
It looks like you're using 2 different versions of ActiveMQ Artemis. The first screenshot is the web console based on Hawtio 1 that was present in version 2.15.0 and earlier. The second screenshot has the web console based on Hawtio 2 that is present in version 2.16.0 which was just released. This work to migrate from Hawtio 1 to 2 was done as part of ARTEMIS-2838
Related
In the artemis example folder, there is a sample that helped me run artemis in embedded mode. This is helpful for me when dealing with unit tests.
Is it possible to view the console in browser (localhost:8161) after running the server in embedded mode.
I found that the console war file is listed in bootstrap.xml file and I tried to place bootstrap.xml file in classpath as well but still not able to run console.
Is it possible to view web console when artemis run in embedded mode?
When you run your own embedded instance of ActiveMQ Artemis the bootstrap.xml file isn't used. That file is only used by a standalone broker. The application which embeds the broker is itself responsible for bootstrapping it (i.e. configuring and passing in all the prerequisites).
By default a standalone broker will configure and start an embedded instance of Jetty. It will also deploy the web console WAR to this Jetty instance. All this is defined in bootstrap.xml.
However, when you embed your own broker all you get is the broker. If you want a web server in your application to serve any web applications (e.g. the ActiveMQ Artemis web console) then you'll have to embed that yourself as well along with the broker.
I'm doing some testing with RabbitMQ, ActiveMQ "Classic" and ActiveMQ Artemis in a Windows .NET environment. RabbitMQ and ActiveMQ "Classic" ship with a web interface where you can see information about your broker, queues, messages etc., but ActiveMQ Artemis does not. I really want to be able to monitor my ActiveMQ Artemis broker in a web interface or at the very least with some cmd/PowerShell commands.
I've read on this page about some third-party tools that can be used to monitor an ActiveMQ instance and I assumed that it also applied to Artemis. Unfortunately, I have not been able to get these third-party tools to work. Some of them don't seem to work well on Windows and some are old/inactive.
My clients are communicating with the brokers through NMS (.NET Messaging API) in C#. If anyone has been able to monitor their Artemis broker, especially on a Windows machine, please let me know how you did it!
EDIT:
I have managed to communicate with the Jolokia REST API now. With a GET request to:
http://username:password#localhost:8161/jolokia/read/org.apache.activemq.artemis:*
I am able to see a bunch of information about my queues such as messages added and consumed. This is nice information that will help me but I would like information about current memory usage and disk usage.
Take a look at the Management chapter of the Artemis manual. As far as I know, the following options are available to you
JMX (Java Management Service)
JMX is a Java API for managing Java servers. There are multiple GUIs that connect to java servers via JMX. The most notable being jConsole. There is a list of other GUIs here or there, or you could build your own
jConsole
jConsole is a GUI application that you can connect to a JMX enabled server. It is a part of the Java JDK, so you probably have it installed already.
Jolokia
Jolokia, tutorial, is a JSON API layer over JMX. It makes the JMX interface accessible over HTTP(S). You may query the information using any HTTP client library. You already figured out this in your question. Again, there are GUIs on top of that, the most notable being
Hawt.io Artemis plugin
Hawt.io is an Angular.js management console. It can be thought of as a GUI for Jolokia.
Artemis 2.6 and newer
Hawt.io plugin is built in, no extra setup necessary.
Artemis 1
There is a hawt.io plugin for Artemis made by Red Hat. Compile the plugin and get a .war file. Artemis contains a built-in Jetty webserver. You need put that war to apache-artemis-1.3.0/web. You also need to download hawtio-default.war from http://hawt.io/getstarted/index.html to the same directory. Then, in the instance directory, edit etc/bootstrap.xml and add these wars to config.
Or you can get Red Hat AMQ 7, currently in Alpha, which has the management plugin built in. Start it up and go to localhost:8161/hawtio. I work for a company that sells that product.
Prometheus and Grafana
There is a repository and an accompanying blogpost that describes Prometheus and Grafana setup with ActiveMQ Artemis, all running in OpenShift.
The jmx exporter for Prometheus contains example config for Artemis 2 to get started.
The simplest and easiest way to monitor the broker is with the ActiveMQ Artemis web console. This was added back in 2.3.0 (released in September 2017). At that time it was based on Hawtio 1, but it was recently updated to Hawtio 2.
The most powerful and flexible way to monitor the broker is to use a metrics plugin. Metrics plugins allow integration with specialized monitoring tools like CloudWatch, Datadog, Dynatrace, Elastic, Prometheus, etc. A Prometheus metrics plugin implementation is available. That combined with a Grafana dashboard for visualization and alerting is very powerful.
I am having trouble accessing ActiveMQ's web console.
On their website it says you can access the console through the URL : localhost:8161/admin
But all I get when I try this is "This webpage is not available"
I found another site saying I can access it through port '61616', which gives me a response in the form of the following :
I have done some extensive searching on this issue, and have found others with the same problem, but have not come across a solution.
I am fairly new to using ActiveMQ so please excuse me if I have left out any relevant information.
Any help is greatly appreciated.
The admin console is a web application (WAR-file) deployed in an embedded Jetty server that starts up along with ActiveMQ standalone distribution.
Since you intend to run ActiveMQ inside a web application inside Tomcat, it would not make sense to fire up a jetty server.
Simply deploy the web console WAR to your Tomcat. You need to point out the JMS/OpenWire connection URI as well as JMX connection URI to ActiveMQ Web Console to get it going. Typically in Tomcat setenv.sh (or similar file):
JAVA_OPTS="$JAVA_OPTS -Dwebconsole.type=properties -Dwebconsole.jms.url=tcp://localhost:61616- Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi -Dwebconsole.jmx.user=admin -Dwebconsole.jmx.password=mypassw0rd"
This requires you to have JMX setup on your Tomcat instance. If not, check this Tomcat doc page out.
This will deploy the console just like any app in your Tomcat (not port 8161).
Off-topic, but a nice feature with decoupling the web console from the actual broker is that you can access a the activem broker of a master/slave pair using failover protocol and comma separated jmx settings.
In my deployments config directory I see two versions of MongoDB (1.8 and 2.0). However when I run
vmc services
from my client, only 1.8 shows up (presumably because it is default). I tried changing the default in mongodb_gateway.yml (and node.yml), but after a restart the list is unchanged.
Any idea how I can get Mongo 2.0 to show up as a provisionable service?
If I removed 1.8 from the mongodb_node.yml and mongodb_gateway.yml files and then restarted cloud foundry, 2.0 (and 1.8) appeared. The problem is that there's no way to differentiate the two, so it appears to use what you have set as the default version in the yml files. At any rate it shows up now.
I'm totally a newbie in Java Enterprise and I have a lot stuff yet to learn. Right now I'm working which involves JMS using JBoss and ActiveMQ. An application sends messages to queues in JBoss and my goal is to access those messages using any message broker (in this case I tried to use ActiveMQ). So I think it's better for me to embed ActiveMQ to JBoss. I used the link below as the guidance :
http://activemq.apache.org/integrating-apache-activemq-with-jboss.html
I followed every single steps in the guide except that I used JBoss 4.2.3 and ActiveMQ 5.1.1. If this problem results from the different version of the tools, I think I can't help it out because other versions seem does not work on my machine. When I run JBoss to test whether the embedding is working or not, I can't see anything running on port localhost:61616 which is the default port for ActiveMQ, although JBoss seems run well. My question is :
Is any one know how to fix this? Or has anyone ever experienced such problem?
Is there any way to access queue in Jboss?
If this question is pretty ambiguous or need more details, let me know. Thanks in advance for any help.
I'm quite sure the embedded broker is started (transport vm://localhost) which results in a working JMS broker for that VM. But this broker isn't reachable from outside (via tcp or anything else)
Do you see any error in the log when launching jboss? I managed to make it work with Jboss 4.2 and ActiveMQ 5.4, and once integrated it only gives you a small hint that is working correctly with some info message saying "broker started in port ..." .
Also you can try to use the sample producers and receivers in ActiveMQ to test if the queue is working correctly.
If you still have problems I can try to help