Monitoring Wildfly with Zabbix - wildfly

Wildfly supports monitoring over http-remoting-jmx protocol and Zabbix uses rmi. So is it good practise to use "standard" way of specifying JMX (in the Java opts) in the Wildfly? Or how can i achieve monitoring Wildfly using Zabbix?

Usually the applications that support remoting-jmx do no not work very well with rmi. You can patch the Java gateway to support remoting-jmx - there are community patches floating around. Keep in mind that it is completely unsupported. This support is supposedly coming with Zabbix 3.4 - see https://support.zabbix.com/browse/ZBXNEXT-1274 .

Related

Does Keycloak stopped configuration with Wildfly after Keyclaok 17?

What is meaning of (https://www.keycloak.org/archive/downloads-17.0.1.html)
Keycloak: Distribution powered by Quarkus
Keycloak WildFly (deprecated): Distribution powered by WildFly
When i see documentation it says:
The default distribution of Keycloak is now powered by Quarkus, which brings a number
of breaking changes to you configure Keycloak and deploy custom providers.
For more information check out the Quarkus Migration Guide.
The WildFly distribution of Keycloak is now deprecated, with support ending June 2022.
We recommend migrating to the Quarkus distribution as soon as possible.
However, if you need to remain on the legacy WildFly distribution for some time,
there are some changes to consider
I am using Wildfly as application Server where projects are deployed.
Shall this means i use Wildfly distribution of Keycloak only whose support is ending June 2022.
or
Does this mean that Keycloak use Wildfly underneath and not use that anymore and quarkus is used? (now here can quarkus distribution work fine with wildfly settings we currently have)
Unfortunately, it has nothing to do with WildFly anymore. Until recent versions, the Keycloak was being packaged as a Java EE archive file (or as WildFly module) that you could deploy into WildFly application server.
Quarkus on the other hand is a framework to develop cloud native Java applications. It's runtime relies on many open source projects for underlying services (e.g. Vertx, SmallRye projects, etc.) and has a completely different architecture. As part of such a migration, Keycloak is now being packaged as an standalone java application (that is a typical output for an app developed using Quarkus) and contains all its dependencies. So there is no deployment/installation on WildFly anymore.
Quarkus applications are being designed by default to be run on cloud environments like Kubernetes. So you may also require to consider if you can benefit from this if you have such an infrastructure in your organization (however it's not mandatory and you can just run it as a normal java app on your server). But you can definitely not use your WildFly specific configurations (e.g. the Keycloak subsystem or OpenID subsystem) anymore.
You can find more details here.
Quarkus is a variation of Wildfly that is packaged in such a way as to make containerization (i.e. Docker, Kubernetes, etc.) much easier. Applications written for Wildfly (and JEE in general) can be made to run in Quarkus quickly.
Wildfy 25 and above include OIDC functionality internally. Therefore, you don't need to install the Keycloak extensions like you used to. And Keycloak, as of version 15, is based on Quarkus too. Because of this there is a build phase of the installation that lets you set many of the options before the run phase. For example, I used to setup a data source in the standalone.xml for my database. Now, I use the resources.properties to setup my database for Keycloak. The concepts are similar.
If you're using a version of Wildfly less than 25 then you'll still want the Keycloak adapter.

What is main difference between Apache Camel and Jboss Fuse?

I know that Apache Camel is java open source framework and Jboss Fuse is ESB which act like container to bind camel into its container . However i need to know its differences in some more depth .
Any help will be appreciated .
In simplified terms, camel framework is the set of api's (java code) which are used in system integration projects whereas fuse is the server like tomcat where code is deployed.
"JBoss Fuse combines several technologies like core Enterprise Service Bus capabilities (based on Apache Camel, Apache CXF, Apache ActiveMQ), Apache Karaf and Fabric8 in a single integrated distribution."
Deploy applications utilizing some different configurations and technologies is one of many qualities in Jboss Fuse.
"Camel" as being a rule based routing & mediation engine which can be used inside a full blown ESB, a message broker or a web services smart client. Though if you want to, you could consider that Camel is a small, lightweight embeddable ESB since it can provide many of the common ESB services like smart routing, transformation, mediation, monitoring, orchestration etc.
We should also mention what Camel isn’t. Camel isn’t an enterprise service bus complete(ESB ), although some call Camel a lightweight ESB because of its support for routing, transformation, monitoring, orchestration, and so forth. Camel doesn’t have a container or a reliable message bus, but it can be deployed in one, such as Open-ESB or ServiceMix. For that reason, we prefer to call
Camel an integration framework rather than an ESB.

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.

Monitor JBoss through SNMPv3

I am on a development team that is using JBoss EAP 4.3.0.GA_CP06. I need to be able to monitor JBoss using SNMPv3.
I understand I am able to use SNMP to monitor, but is it possible to monitor using v3 out-of-the box? If it is possible, what configurations need to be made to do this? If it is not possible, what external/other options are there for monitoring JBoss with SNMPv3?
Thanks.
Assuming the snmp-agent.sar is in your deploy directory (which depends on which config you picked), then JBoss will be exposing SNMP information on port 1161 (see inside the .sar for additional configuration).
I don't recall if this is SNMPv3, though, or v2.
This is not possible "out-of-the-box". An external SNMP adapter is required (e.g. WebNMS, iReasoning).