General questions on all things Hawtio.
Hawtio uses the Apache 2.0 License.
It's a pluggable management console for Java stuff which supports any kind of JVM, any kind of container (Tomcat, Jetty, Karaf, JBoss, Fuse Fabric, etc), and any kind of Java technology and middleware.
Mostly Hawtio just works. However, please check out the Configuration Guide to see what kinds of things you can configure via system properties, environment variables, web.xml context-params or dependency injection.
Since 1.2-M2 of Hawtio we enable security by default using the underlying application container's security mechanism.
Here's how to disable security if you wish to remove the need to login to Hawtio.
The easiest thing to do is add jolokia as a java agent via a java agent command line:
java -javaagent:jolokia-agent.jar=host=0.0.0.0 -jar foo.jar
Then by default you can connect on http;//localhost:8778/jolokia to access the jolokia REST API.
Now you can use Hawtio (e.g. the Google Chrome Extension or the stand alone Hawtio application) to connect to it - and it then minimises the effect of Hawtio/jolokia on your app (e.g. you don't need to mess about with whats inside your application or even change the classpath)
All that's required for Hawtio to connect to any remote JVM is that a jolokia agent is attached to the JVM you wish to connect to. This can be done in various ways.
If a JVM has no jolokia agent, you can use the Local tab of the Connect menu (in 1.2.x or later of hawtio-default.war). The Local tab lists all local Java processes on the same machine (just like JConsole does).
For JVMs not running a jolokia agent already, there's a start button (on the right) which will dynamically add the jolokia JVM agent into the selected JVM process. You can then click on the Agent URL link to connect into it.
Note that the Local plugin only works when the JVM running Hawtio has the hawtio-local-jvm-mbean plugin installed (which depends on the JVM finding the com.sun.tools.attach.VirtualMachine API that jconsole uses and is included in the hawtio-default.war). BTW if you don't see a Local tab inside the Conect menu in your Hawtio application; check the log of your Hawtio JVM; there might be a warning around com.sun.tools.attach.VirtualMachine not being available on the classpath. Or you could just try using the executable jar to run Hawtio which seems to work on most platforms.
Note also that the Local tab only works when the process is on the same machine as the JVM running Hawtio. So a safer option is just to make sure there's a jolokia agent running in each JVM you want to manage with Hawtio.
There are a few different agents you can use:
So once you've got a jolokia agent in your JVM you can test it by accessing
http://host:port/jolokia in a browser to see if you can view the JSON returned for the version information of the jolokia agent.
Assuming you have jolokia working in your JVM, then you can use the Remote tab on the Connect menu in Hawtio to connect; just enter the host, port, jolokia path and user/password. Note by default only
localhost is accepted to connect for security, so you need to configure
hawtio.proxyWhitelist system property or
proxyWhitelist init parameter on
WEB-INF/web.xml to explicitly allow hosts that you are connecting to.
Each Hawtio distro has these browser based plugins inside already; plus Hawtio can discover any other external plugins deployed in the same JVM too.
Then the Hawtio UI updates itself in real time based on what it can find in the server side JVM it connects to. So, for example, if you connect to an empty tomcat/jetty you'll just see things like JMX and tomcat/jetty (and maybe wiki / dashboard / maven if you're using hawtio-default.war which has a few more server side plugins inside).
Then if you deploy a WAR which has ActiveMQ or Camel inside it, you should see an ActiveMQ or Camel tab appear as you deploy code which registers mbeans for ActiveMQ or Camel.
So usually, if you are interested in a particular plugin and its not visible in the Hawtio UI (after checking your preferences in case you disabled it), usually you just need to deploy or add a server side plugin; which is usually a case of deploying some Java code (e.g. ActiveMQ, Camel, Infinispan etc).
Try have a look at the change log to see the latest changes in Hawtio!
Try have a look at the articles and demos to see what other folks are saying about Hawtio.
The Hawtio help registry tries to automatically discover help data for each registered plugin even if plugins haven't specifically registered a help file.
At first a git-based wiki might not seem terribly relevant to Hawtio. A wiki can be useful to document running systems and link to the various consoles, operational tools and views. Though in addition to being used for documentation, Hawtio's wiki also lets you view and edit any text file; such as Camel routes, Fuse Fabric profiles, Spring XML files, Drools rulebases, etc.
This lets us use HTML and Markdown files to define custom views using HTML directives (custom tags) from any Hawtio plugins. Hopefully over time we can build a large library of HTML directives that folks can use inside HTML or Markdown files to show attribute values or charts from MBeans in real time, to show a panel from a dashboard, etc. Then folks can make their own mashups and happy pages showing just the information they want.
So another way to think of Hawtio wiki pages is as a kind of plugin or a custom format of a dashboard page. Right now each dashboard page assumes a grid layout of rectangular widgets which you can add to and then move around. However with a wiki page you can choose to render whatever information & widgets you like in whatever layout you like. You have full control over the content and layout of the page!
So whether the Hawtio wiki is used for documentation, to link to various Hawtio and external resources, to create custom mashups or happy pages or to provide new plugin views--all the content of the wiki is audited, versioned and stored in git so it's easy to see who changed what, when and to roll back changes, etc.
You can use Hawtio to remote manage any ActiveMQ brokers without the need to co-install Hawtio together with the ActiveMQ broker. However you can also install Hawtio with the broker if you want. Dejan Bosanac blogged how to do this.
Questions relating to errors you get while using Hawtio or other general questions:
An easy way is to use a plugin to reconfigure the default perspective definition. Have a look at the custom-perspective for a plugin-based solution.
From Hawtio 1.2.2 onwards you can reorder and hide plugins from the preference.
If you see an error like this:
java.util.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Provider sun.tools.attach.WindowsAttachProvider could not be instantiated: java.lang.UnsatisfiedLinkError: no attach in java.library.path
Basically you need to make sure that you have JAVA_HOME/bin on your path. e.g. try this first before starting Hawtio:
The terminal plugin may have trouble the first time in use, not being able to connect and show the terminal. Try selecting another plugin, and go back to the terminal plugin a bit later, and it then may be able to login. Also if the screen is all black, then pressing ENTER may help show the terminal.
If you use Apache ServiceMix / Karaf and you deploy a Camel XML file by copying a xml file to the deploy directory, then the deployer does not run this with proper security. So the Karaf RBAC will deny the Apache Camel plugin to query the Camel routes to gather performance counters. As deploying by using plain XML files is not recommended, then it works by using a deployment unit as a proper OSGi bundle such as a JAR or KAR file.
The reason is that there is something running in the JVM which keeps modifying the JMX tree, such as repeatedly adding / removing the same set of MBeans. For example, Apache ActiveMQ does that when a JMS Client has been misconfigured or configured without a connection pool. When there is no connection pool, the ActiveMQ JMS client repeatedly creates and closes connections. The result is that the MBean tree keeps being modified, which causes Hawtio to trigger a tree refresh. To resolve this issue, use connection pooling with ActiveMQ - which you should always do. For an example see issue 1903 for more details.
Questions on using the available plugins:
See the list of Hawtio plugins
See How Plugins Work
This is a reported issue. It turns out that the standard OSGi MBeans (in the osgi.core domain) are not installed by default on GlassFish.
The workaround is to install the Gemini Management bundle then you should see the MBeans in the osgi.core domain in the JMX tree; then the OSGi tab should appear!
Questions on using Apache Camel and Hawtio.
The Camel plugin currently requires that the Camel MBeans are stored using the default domain name which is
org.apache.camel. So if you configure Camel to use a different name, using the
mbeanObjectDomainName configuration, then the Camel plugin will not work. See details reported in ticket 1712.
The Debug and Trace tabs depend on the JMX MBeans provided by the Camel release you use.
Questions on writing new plugins or hacking on existing ones:
If you just want to run Hawtio in a JVM then please see the Getting Started section.
If you want to hack the source code then check out how to build Hawtio.
Check out the Coding Conventions for our recommended approach.
Anything you like :). So long as it runs on a web browser, you're good to go. Please start contributing!
So take your pick; the person who creates a plugin can use whatever language they prefer, so please contribute a new plugin :).
The only real APIs a plugin needs to worry about are AngularJS (if you want to work in the core layout rather than just be an iframe), JSON (for some pretty trivial extension points such as adding new tabs), HTML and CSS.
Check out how plugins work. You can then either:
We hope that folks can just write plugins for Hawtio to be able to reuse all the various plugins in Hawtio.
However if you are writing your own stand alone web application using AngularJS then please check out the Hawtio Directives which you should be able to reuse in any AngularJS application