JBoss Switchyard Metrics - where to find the data in the server? - jboss

I'm using JBoss AS7 and can see metrics in the following link in the Admin console in my build environment.
http://localhost:10090/console/App.html#sy-metrics
But we don't have the console running in Production nor JMX.
Does JBoss store the metrics somewhere in the server installation which can be extracted for use? It will be useful to find out the services and the methods which are the biggest bottlenecks so that we can improve them.

There's no store of server metrics - you can use something like JBoss Operations Network (https://www.redhat.com/en/technologies/jboss-middleware/operations-network) to collect them, or if you enable JMX you could probably collect them in Prometheus.
I'm not sure whether you are using Fuse 6 or whether you are using community SwitchYard on top of AS 7 - if you're using Fuse 6, you can probably access the JMX beans through hawtio's jolokia instance.

Related

Configure JBOSS EAP Server and Load Balancer

We need to setup JBOSS Server , Load Balancer for our Java/J2EE application in production server for approx 5000 users.
Can someone please elaborate on infrastructure required , like suitable Hardware ?
What kind on Web Server , then Application server like JBOSS EAP , How to setup load balancer , enable audit logs. Configure clustering, fail over and load balancing. Configure Web Connectors and web properties in JBoss applications.
High availability and disaster recovery. These topics are very important.
I am actually a developer , have never configured deployment environment in production as an Administrator. I tried to search similar post , but got no results. Please guide the architecture as guideline. I will explore it further
You have asked about a huge range of topics here. You can find guides on how to set up and configure most of them in the JBoss EAP documentation, which is available here: https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/

Configure IBM HTTP server for Jboss Application server

Recently we have moved our application from websphere to jboss application server.
IBM Http server (IHS) has front ended(proxy) the websphere application server.
Now we want to make changes to httpd.conf to make the IHS to front end the jboss. So whats the configuration to be done at IHS server to act like reverse proxy for JBOSS application server?
There's really no reason to do this, because IBM HTTP Server is only ever supported when it's used with IBM software that it was bundled with.
If you do do it, you're nearly alone in doing so and w/o the assistance of IBM.
Technically, you could use mod_proxy_balancer and mod_proxy_http just like any other Apache-based server, but they're not as well maintained because they are only used in one very obscure/withdrawn IBM product that bundles IHS. It's a basic proxy configuration for Apache and not really worth going into detail here.
The best option for JBoss AS/Wildfly application server proxy for you is Apache HTTP Server with mod_cluster.
Community
You can give it a try with Fedora: mod_cluster package
And there is an example on how to compile it from sources and configure it with Apache HTTP Server from scratch: example, recorded terminal session. It also operates on Windows and Solaris.
Why mod_cluster over mod_jk/mod_proxy?
The main benefit of mod_cluster over mod_proxy*balancer / mod_jk solutions is that both JBoss AS and Wildfly contain mod_cluster subsystems that automatically report deployed contexts and life cycle events to the mod_cluster balancer in Apache HTTP Server. JBoss AS/Wildfly workers join Apache HTTP Server balancer automatically, you don't have to reconfigure anything in your httpd.conf nor restart httpd when you add another JBoss AS/Wildfly worker.
Current load report is also a part of these service messages. One may use several different load metrics within JBoss AS/Wildfly, e.g. heap utilization, CPU load, number of currently open sessions, or one could easily implement a custom load metric.
The result is a high-throughput dynamic load balancer that takes into account actual utilization of your JBoss AS/Wildfly workers.
Commercial support
If you need a fully supported solution for mod_cluster balancer, both Red Hat JBoss Web Server, i.e. Apache HTTP Server, mod_cluster, OpenSSL, Tomcat 7, Tomcat 8, mod_jk, ModSecurity, and Red Hat JBoss Enterprise Application Platform (EAP), i.e. application server built on Wildfly 10+ or AS 7+, entitle you to fully supported mod_cluster balancer fronting either Tomcat workers or EAP workers.
Full Disclosure: I am an engineer at Red Hat

How to monitor ActiveMQ Artemis

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.

JBoss Fuse - Can we replace dependency on ActiveMQ to WebSphereMQ?

I would like to avoid dependency on ActiveMQ. Is there a way to make JBossFuse to use WebSphereMQ ? (I'm assuming activeMQ is required for framework to run - internal dependency)
The description on jboss fuse site reads like..
Core messaging is provided by Apache ActiveMQ, services framework (SOAP, XML/HTTP, RESTful HTTP)...
PS:
Arguements like "it would be innefficient, expensive" etc, need not be considered at this stage. Reason for prefering WebSphereMQ is beyond my control.
No you can use JBoss Fuse without ActiveMQ at all. For example the minimal distribution does not come with AMQ pre-installed.
JBoss Fuse allows you to slice and dice what you want pre-installed.
If you want to use WebSphereMQ then you can do that, though that would be under the assumption that WebSphereMQ as a server is running in another JVM / box. And that JBoss Fuse would act as a client to that broker. If so you can install the WebSphereMQ Java Client JARs in Jboss Fuse and use that.

Managing deployments for nodes running Camel routes

I have an enterprise application that uses Camel routes and need to be able to provision/start/stop nodes running these Camel routes on multiple machines.
I am looking at Apache Karaf and JBoss Switchyard as 2 solutions to help me deploy and manage these routes. I think I understand the value of Apache Karaf since it is a osgi container and I can un/deploy new routes into it. Will JBoss Switchyard also help me for this issue?
JBoss Fuse
JBoss Fuse which includes Fuse Fabric can manage and provision containers in a cluster / cloud / etc.
http://fuse.fusesource.org/fabric/
JBoss Fuse uses Karaf as the container. So what you can do with Karaf you can do as well with JBoss Fuse.
On top of that Fuse Fabric brings to the table, all the cluster provisioning and management. And with a distributed registry for HA et all.
With JBoss Fuse you can deploy and manage your Camel routes in a cluster. And perform rolling upgrades / downgrades across the nodes in the cluster, and much more. And to go along with that you have commands in the Karaf Shell to perform actions, and as well a web console UI based on http://hawt.io/.
Short answer: Yes JBoss Fuse can manage and provision your Camel routes in a cluster.
SwitchYard
In terms of JBoss SwitchYard, then it uses JBoss Application Server / WildFly as its container (at this time of writing SY does not yet support OSGi). So SY leverages the clustering and management support from JBoss Application Server.
Yes with Apache Karaf you'll be able to deploy/undeploy routes by either installing the appropriate bundle or by installing the corresponding blueprint.xml (containing the route) as Karaf supports deploying of various xml files (which are generated to bundles at runtime). This will give you an easy way of deploying / Developing. Also available with karaf is the def:watch command, it'll help you with developing Bundles cause it will watch your file/maven-repo location for updates and will install those immediately in the container.
For distributing your routes throughout a cluster there is also Apache Karaf - Cellar, a subproject for maintaining Cluster ability for the Karaf container.
take a look at Zookeeper and its support for distributed route policies...
also, check out these master election examples
http://www.systemmobile.com/?p=399
http://frommyworkshop.blogspot.com/2013/06/leader-election-of-camel-router-through.html