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

2017-08-11 Thread Mikhail Getmanov
-- Отправлено из мобильного приложения Яндекс.Почты13:47, 11 августа 2017 г., neerajbhatt :Thanks Slave, this is working for us now. There was a configuration issue inorg.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.htmlSent from the Apache Ignite Users mailing list archive at Nabble.com.


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

2017-08-10 Thread neerajbhatt
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.


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

2017-08-08 Thread slava.koptilin
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" : ,
"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.



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


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

2017-08-07 Thread neerajbhatt
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



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


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

2017-08-07 Thread karunakarsingh
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!  



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


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

2017-08-07 Thread slava.koptilin
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"
 



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