I am not able to read mxbean values of ignite

classic Classic list List threaded Threaded
7 messages Options
karunakarsingh karunakarsingh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

I am not able to read mxbean values of ignite

Team, here is the scenario, i am fetching jmx values of application and servers through logstash and it is getting visible for java app. but when i tried it for ignite it is not getting getheched. as per my finding the mxbean value for objects are false. please help. jmx values for java jmx value for ignite
slava.koptilin slava.koptilin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I am not able to read mxbean values of ignite

Hello,

Could you please check that statistics gathering is enabled?
Please take a look at this method org.apache.ignite.configuration.CacheConfiguration#setStatisticsEnabled(boolean)

The metrics will be available under "Attributes"
karunakarsingh karunakarsingh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I am not able to read mxbean values of ignite

Thanks slava.koptilin,

Yes the attribute have the values as per shared source.

but I am not able to get it through while fetching with logstash and json. please suggest!  
neerajbhatt neerajbhatt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I am not able to read mxbean values of ignite

mxbean in MBeaninfo of a particluar cache is coming as false, because of which logstash jmx plugin is not able to get data.

I am also facing the same problem

we have used
cacheCfg.setStatisticsEnabled(true);
cacheCfg.setManagementEnabled(true);

Attributes values are coming in jconsole but probably becuase in MBeaninfo mxbean is false we are not able to fetch values in logstash
slava.koptilin slava.koptilin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I am not able to read mxbean values of ignite

Hello,

The reason whyr mxbean is false that Apache Ignite "exports" its own beans as DynamicBean.

I've tried logstash 5.5.1 with logstash-input-jmx 3.0.2 plugin
I've used the following jmx configuration that is gathering simple statistics about MyTestCache, DiscoverySpi and CommunicationSpi:
{
    "host" : "localhost",
    "port" : <JMX port should be specified here>,
    "queries" : [
      {
          "object_name" : "org.apache:clsLdr=*,group=MyTestCache,name=org.apache.ignite.internal.processors.cache.CacheClusterMetricsMXBeanImpl",
          "object_alias" : "CacheStatistics",
   "attributes" : ["StatisticsEnabled","Size"]
      },
      {
          "object_name" : "org.apache:clsLdr=*,group=SPIs,name=TcpDiscoverySpi",
          "object_alias" : "TcpDiscoverySpi",
   "attributes" : ["Coordinator","IgniteHome","ClientMode"]
      },
      {
          "object_name" : "org.apache:clsLdr=*,group=SPIs,name=TcpCommunicationSpi",
          "object_alias" : "TcpCommunicationSpi",
   "attributes" : ["ConnectTimeout","LocalNodeId","LocalPort"]
      }
   ]
}

You have two options to specify JMX port:
1. set environment variable  IGNITE_JMX_PORT
2. pass the following system parameters to your JVM:
    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port={preferred_port}
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false

And it works good:
[2017-08-08T14:25:45,614][INFO ][logstash.inputs.jmx      ] Loading configuration files in path {:path=>"/home/slava/logstash-5.5.1/jmx"}
{
    "metric_value_number" => 0,
                   "path" => "/home/slava/logstash-5.5.1/jmx",
             "@timestamp" => 2017-08-08T11:25:45.630Z,
               "@version" => "1",
                   "host" => "localhost",
            "metric_path" => "localhost_49117.CacheStatistics.StatisticsEnabled_bool",
                   "type" => "jmx"
}
{
    "metric_value_number" => 0,
                   "path" => "/home/slava/logstash-5.5.1/jmx",
             "@timestamp" => 2017-08-08T11:25:45.635Z,
               "@version" => "1",
                   "host" => "localhost",
            "metric_path" => "localhost_49117.CacheStatistics.Size",
                   "type" => "jmx"
}
{
                   "path" => "/home/slava/logstash-5.5.1/jmx",
             "@timestamp" => 2017-08-08T11:25:45.639Z,
               "@version" => "1",
                   "host" => "localhost",
            "metric_path" => "localhost_49117.TcpDiscoverySpi.Coordinator",
                   "type" => "jmx",
    "metric_value_string" => "f642dc26-3af0-4ba1-ba13-1fb361e7c6f5"
}
{
                   "path" => "/home/slava/logstash-5.5.1/jmx",
             "@timestamp" => 2017-08-08T11:25:45.640Z,
               "@version" => "1",
                   "host" => "localhost",
            "metric_path" => "localhost_49117.TcpDiscoverySpi.IgniteHome",
                   "type" => "jmx",
    "metric_value_string" => "/projects/binaries/fabric.2.1.0"
}
{
    "metric_value_number" => 0,
                   "path" => "/home/slava/logstash-5.5.1/jmx",
             "@timestamp" => 2017-08-08T11:25:45.640Z,
               "@version" => "1",
                   "host" => "localhost",
            "metric_path" => "localhost_49117.TcpDiscoverySpi.ClientMode_bool",
                   "type" => "jmx"
}
{
    "metric_value_number" => 5000,
                   "path" => "/home/slava/logstash-5.5.1/jmx",
             "@timestamp" => 2017-08-08T11:25:45.661Z,
               "@version" => "1",
                   "host" => "localhost",
            "metric_path" => "localhost_49117.TcpCommunicationSpi.ConnectTimeout",
                   "type" => "jmx"
}
{
                   "path" => "/home/slava/logstash-5.5.1/jmx",
             "@timestamp" => 2017-08-08T11:25:45.662Z,
               "@version" => "1",
                   "host" => "localhost",
            "metric_path" => "localhost_49117.TcpCommunicationSpi.LocalNodeId",
                   "type" => "jmx",
    "metric_value_string" => "f642dc26-3af0-4ba1-ba13-1fb361e7c6f5"
}
{
    "metric_value_number" => 47100,
                   "path" => "/home/slava/logstash-5.5.1/jmx",
             "@timestamp" => 2017-08-08T11:25:45.663Z,
               "@version" => "1",
                   "host" => "localhost",
            "metric_path" => "localhost_49117.TcpCommunicationSpi.LocalPort",
                   "type" => "jmx"
}

Thanks,
Slava.
neerajbhatt neerajbhatt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I am not able to read mxbean values of ignite

Thanks Slave, this is working for us now. There was a configuration issue in org.apache:clsLdr=*
Mikhail Getmanov Mikhail Getmanov
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: I am not able to read mxbean values of ignite



--
Отправлено из мобильного приложения Яндекс.Почты

13:47, 11 августа 2017 г., neerajbhatt <[hidden email]>:

Thanks Slave, this is working for us now. There was a configuration issue in
org.apache:clsLdr=*



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/I-am-not-able-to-read-mxbean-values-of-ignite-tp16022p16123.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Loading...