jboss session discovery

98 views
Skip to first unread message

Alejandro Valcarcel - ODEC

unread,
Oct 8, 2014, 7:01:05 AM10/8/14
to zorka...@googlegroups.com
Hi,

we're using zabbix 2.2.6, zorka 1.0.7, jbossEAP6.0.1, rhel 6.4

when we deploy we use same runtime name for different deployment  names, which corresponds to versions.
Only one deploy is active with same runtime name.

I'm discovering deploys ok, and want to graph and monitor active sessions of app along versions.

But instead of using deployment name I'll like to use runtime name of active deploys.

This is motivated because I'll like to graph sessions of a deploy no matther the version name.

¿is this posible?

on jboss7.bsh I can see:

__jboss7() {

...

// Basic session statistics
  __sessions() {

    discovery() {
      return zabbix.discovery("java", "jboss.as:subsystem=web,deployment=*", "subsystem", "deployment");
    }

    stat(deployment, attr) {
       return zorka.jmx("java", "jboss.as:subsystem=web,deployment="+deployment, attr);
    }

    return this;
  }

with jboss-cli I can see:
[domain@as0-c2-pro:9999 /] deployment-info --name=c2Admin-2.1.1b-SNAPSHOT.war
NAME                        RUNTIME-NAME
c2Admin-2.1.1b-SNAPSHOT.war c2Admin.war

SERVER GROUP       STATE
GAS0               not added
G_DESIGNER         not added
G_EHPC             not added
G_ENGINE           not added
G_MANAGER          enabled
G_SYM_WS           not added
main-server-group  not added
other-server-group not added


Thanks

Rafal Lewczuk

unread,
Oct 13, 2014, 5:24:51 AM10/13/14
to zorka...@googlegroups.com
Hi,

I don't fully understand this description: you have several versions of your application, only one is active at any given time. What you're trying to do is to have one zabbix key that will always refer to active version. Am I right ?

If so, it will require some more BSH scripting than just simple zabbix.discovery() call. Some dedicated script that will contain functions returning attributes of the only active web deployment, whatever it is: there are some variants of 'zorka.jmx[]' that might be useful in such cases. Maybe 'zorka.ls[]' function could be extended in some way for such purposes.

Alternative method is to have parametrized zabbix template with a macro that will represent active deployment name. This is much simpler to implement but it requires to change macro value every time new version of your application is deployed.

Regards,
rle

Alejandro Valcarcel - ODEC

unread,
Oct 16, 2014, 5:03:28 AM10/16/14
to zorka...@googlegroups.com
Hi Rafal,
actually only active deployments are discovered, so further development is not nedded to find them ;-)

I was just thinking on retriving the "runtime name" (which I guess is an attribute) instead of the "deployment name" on the discovery. That will solve everything.

My limitations are that I don't touch code :-D I'll request help from my dev team.

Thanks for your tips, I'll take a look to zorka.ls()

Where can I find zabbix.discovery() source?


Rafal Lewczuk

unread,
Oct 17, 2014, 2:42:48 AM10/17/14
to zorka...@googlegroups.com
Hello,

Try something like this:

discovery() {
   return zabbix.discovery(zorka.query("java", "jboss.as:subsystem=web,deployment=*", "subsystem", "deployment").getAs("runtimeName", "runtimeName"));
}

Not sure if 'runtimeName' is proper name for this attribute, so fix it yourself if it is wrong.

Regards,
rle

Reply all
Reply to author
Forward
0 new messages