Hi,

yes, by default Decanter collects all JMX attributes (from all MBean).

You can filter the ones you want in etc/org.apache.karaf.decanter.collector.jmx-*.cfg.

Regards
JB

On 04/26/2016 09:49 PM, kumar rishabh wrote:
Hi,
I tried it for karaf-decanter-1.0.0 initially. Today I tried it for
karaf-decanter-1.1.0 and got the same message.

My aim is to harvest basic JVM metrics like MemoryUsed, ThreadCount, cpu
usage, objectcount etc. I can connect to the elasticsearch cluster and
can see the data is being harvested.

By default does the decanter harvest all the jvm metrics(for the all the
mbean servers)? Also if I need harvest some particular metrics, will I
have to write a custom appender and install it in karaf?

Sorry for asking such basic questions this stuff is kind of new to me.

Thanks

On Tue, Apr 26, 2016 at 10:33 AM, Jean-Baptiste Onofré <[email protected]
<mailto:[email protected]>> wrote:

    Hi,

    what's the decanter version ?

    The warn about sshd (No session available) is not a big deal: it's
    when we call the instance list via JMX.

    The KeyAlreadyExistsException is related to instance listing too.
    However, Decanter should work (it just not connect instances list,
    which is not very important).

    You should have some metrics in Decanter, right ?

    Regards
    JB


    On 04/25/2016 10:20 PM, kumar rishabh wrote:

        Hi,

        I am trying to use Decanter in the OpenDayLight karaf shell for
        resource
        profiling of jvm.


        opendaylight-user@root> system:version
        3.0.3

        After I install the feature decanter-collector-jmx I get this error.

        javax.management.openmbean.KeyAlreadyExistsException: Argument
        value's
        index, calculated according to this TabularData instance's
        tabularType,
        already refers to a value in this table.
              at
        
javax.management.openmbean.TabularDataSupport.checkValueAndIndex(TabularDataSupport.java:898)
              at
        
javax.management.openmbean.TabularDataSupport.internalPut(TabularDataSupport.java:358)
              at
        
javax.management.openmbean.TabularDataSupport.put(TabularDataSupport.java:350)
              at
        
org.apache.karaf.features.management.codec.JmxFeature.getConfigFileList(JmxFeature.java:145)
              at
        
org.apache.karaf.features.management.codec.JmxFeature.<init>(JmxFeature.java:83)
              at
        
org.apache.karaf.features.management.internal.FeaturesServiceMBeanImpl.getFeatures(FeaturesServiceMBeanImpl.java:89)
              at sun.reflect.GeneratedMethodAccessor538.invoke(Unknown
        Source)
              at
        
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
              at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown
        Source)
              at
        
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
              at
        
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
              at
        
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
              at
        
com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
              at
        com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:83)
              at
        com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:206)
              at
        javax.management.StandardMBean.getAttribute(StandardMBean.java:372)
              at
        Proxy15bec55b_656f_4eca_b39b_826dfc294f22.getAttribute(Unknown
        Source)
              at
        
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
              at
        
com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
              at
        
org.apache.karaf.decanter.collector.jmx.JmxCollector.harvestBean(JmxCollector.java:151)
              at
        
org.apache.karaf.decanter.collector.jmx.JmxCollector.run(JmxCollector.java:106)
              at
        
org.apache.karaf.decanter.scheduler.simple.SimpleScheduler.run(SimpleScheduler.java:64)
              at java.lang.Thread.run(Thread.java:745)



        When I check the karaf.log I get this error

        2016-04-26 01:38:40,634 | INFO  | ]-timer-thread-1 |
        ServerSession                    | 28 - org.apache.sshd.core -
        0.12.0 |
        Disconnecting: Session has timed out waiting for authentication
        after
        120000 ms.
        2016-04-26 01:38:45,652 | INFO  | e]-nio2-thread-1 |
        ServerSession                    | 28 - org.apache.sshd.core -
        0.12.0 |
        Server session created from /127.0.0.1:47285
        <http://127.0.0.1:47285> <http://127.0.0.1:47285>

        2016-04-26 01:38:45,652 | INFO  | e]-nio2-thread-1 |
        Nio2Session                      | 28 - org.apache.sshd.core -
        0.12.0 |
        Exception handler threw exception, closing the session
        java.lang.IllegalStateException: No session available
              at
        
org.apache.sshd.common.AbstractSessionIoHandler.exceptionCaught(AbstractSessionIoHandler.java:49)[28:org.apache.sshd.core:0.12.0]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2Session.exceptionCaught(Nio2Session.java:126)[28:org.apache.sshd.core:0.12.0]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2Session.access$500(Nio2Session.java:47)[28:org.apache.sshd.core:0.12.0]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2Session$2.onFailed(Nio2Session.java:230)
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2CompletionHandler$2.run(Nio2CompletionHandler.java:41)
              at java.security.AccessController.doPrivileged(Native
        Method)[:1.8.0_77]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2CompletionHandler.failed(Nio2CompletionHandler.java:39)[28:org.apache.sshd.core:0.12.0]
              at
        sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:128)[:1.8.0_77]
              at
        sun.nio.ch.Invoker.invokeDirect(Invoker.java:157)[:1.8.0_77]
              at
        sun.nio.ch
        
<http://sun.nio.ch>.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:736)[:1.8.0_77]
              at
        sun.nio.ch
        
<http://sun.nio.ch>.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382)[:1.8.0_77]
              at
        sun.nio.ch
        
<http://sun.nio.ch>.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:399)[:1.8.0_77]
              at
        
java.nio.channels.AsynchronousSocketChannel.write(AsynchronousSocketChannel.java:577)[:1.8.0_77]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2Session.startWriting(Nio2Session.java:212)[28:org.apache.sshd.core:0.12.0]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2Session.write(Nio2Session.java:115)[28:org.apache.sshd.core:0.12.0]
              at
        
org.apache.sshd.common.session.AbstractSession.doWritePacket(AbstractSession.java:508)[28:org.apache.sshd.core:0.12.0]
              at
        
org.apache.sshd.common.session.AbstractSession.writePacket(AbstractSession.java:495)[28:org.apache.sshd.core:0.12.0]
              at
        
org.apache.sshd.common.session.AbstractSession.sendKexInit(AbstractSession.java:856)[28:org.apache.sshd.core:0.12.0]
              at
        
org.apache.sshd.server.session.ServerSession.sendKexInit(ServerSession.java:128)[28:org.apache.sshd.core:0.12.0]
              at
        
org.apache.sshd.server.session.ServerSession.<init>(ServerSession.java:60)[28:org.apache.sshd.core:0.12.0]
              at
        
org.apache.sshd.server.session.SessionFactory.doCreateSession(SessionFactory.java:43)[28:org.apache.sshd.core:0.12.0]
              at
        
org.apache.sshd.common.session.AbstractSessionFactory.createSession(AbstractSessionFactory.java:38)[28:org.apache.sshd.core:0.12.0]
              at
        
org.apache.sshd.common.AbstractSessionIoHandler.sessionCreated(AbstractSessionIoHandler.java:36)[28:org.apache.sshd.core:0.12.0]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2Acceptor$AcceptCompletionHandler.onCompleted(Nio2Acceptor.java:127)[28:org.apache.sshd.core:0.12.0]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2Acceptor$AcceptCompletionHandler.onCompleted(Nio2Acceptor.java:108)[28:org.apache.sshd.core:0.12.0]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
              at java.security.AccessController.doPrivileged(Native
        Method)[:1.8.0_77]
              at
        org.apache.sshd.common.io
        
<http://org.apache.sshd.common.io>.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)[28:org.apache.sshd.core:0.12.0]
              at
        sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)[:1.8.0_77]
              at sun.nio.ch.Invoker$2.run(Invoker.java:218)[:1.8.0_77]
              at
        sun.nio.ch
        
<http://sun.nio.ch>.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)[:1.8.0_77]
              at
        
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_77]
              at
        
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_77]
              at java.lang.Thread.run(Thread.java:745)[:1.8.0_77]
        Caused by: java.io.IOException: Broken pipe
              at sun.nio.ch.FileDispatcherImpl.write0(Native
        Method)[:1.8.0_77]
              at
        sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)[:1.8.0_77]
              at
        sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)[:1.8.0_77]
              at sun.nio.ch.IOUtil.write(IOUtil.java:65)[:1.8.0_77]
              at
        sun.nio.ch
        
<http://sun.nio.ch>.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:691)[:1.8.0_77]
              ... 24 more



        Am I doing something wrong here ?

        Thanks


        --
        Kumar Rishabh
        IIIT-Hyderabad


    --
    Jean-Baptiste Onofré
    [email protected] <mailto:[email protected]>
    http://blog.nanthrax.net
    Talend - http://www.talend.com




--
Kumar Rishabh
UG3, BTech CS+MS
IIIT-Hyderabad

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to