Otis: You can parse the output from "status 'detailed'" command - look for the line starting with 'version'
I checked the output from /jmx but didn't find such information there. The version would appear in the classpath but that's not easy to parse. One note about "hbase version" is that it returns the version of HBase client was built with - not the version of the cluster the client is talking to. Cheers On Wed, Nov 12, 2014 at 1:49 PM, Otis Gospodnetic < [email protected]> wrote: > Hi Ted, > > Thanks, but I'm looking for something I can grab programmatically (not > manually), for example from a Java app. Maybe there is some API that > exposes this information or an MBean? > > Here's the use case: > SPM monitors HBase <http://sematext.com/spm/>, but HBase MBeans and > metrics > have changed over time. > How will SPM agent know which MBeans to look for, which metrics to extract, > and how to interpret values it extracts without knowing which version of > HBase it's monitoring? > It could try proming for some known MBeans and deduce HBase version from > that, but that feels a little sloppy. > Ideally, we'd be able to grab the version from some MBean and based on that > extract metrics we know are exposed in that version of HBase. > > Thanks, > Otis > -- > Monitoring * Alerting * Anomaly Detection * Centralized Log Management > Solr & Elasticsearch Support * http://sematext.com/ > > > On Wed, Nov 12, 2014 at 4:41 PM, Ted Yu <[email protected]> wrote: > > > Using hbase shell: > > > > hbase(main):002:0> status 'detailed' > > version 0.98.4.2-hadoop2 > > > > Cheers > > > > On Wed, Nov 12, 2014 at 1:37 PM, Otis Gospodnetic < > > [email protected]> wrote: > > > > > Hi, > > > > > > Is there a way to detect which version of HBase one is running? > > > Is there an API for that, or a constant with this value, or maybe an > > MBean > > > or some other way to get to this info? > > > > > > Thanks, > > > Otis > > > -- > > > Monitoring * Alerting * Anomaly Detection * Centralized Log Management > > > Solr & Elasticsearch Support * http://sematext.com/ > > > > > >
