I didn't see any attachments on Sri's email. I think the Sampler thread
must've thrown something and died.

-Kirk


On Tue, Sep 27, 2016 at 7:31 AM, Jens Deppe <jde...@pivotal.io> wrote:

> Hi Sri,
>
> I did something similar a while back for a hackday project. My approach
> was to expose all of GemFire JMX metrics with jmxtrans which can
> automatically write to InfluxDB as a Graphite source. I like this approach
> because a GemFire member can be instrumented without adding *any*
> additional code.
>
> FWIW I'm attaching the jmxtrans.xml I used to expose a couple of standard
> JMX JVM attributes.
>
> --Jens
>
>
> On Mon, Sep 26, 2016 at 3:10 PM, sri man <manv...@gmail.com> wrote:
>
>> Hi,
>>
>> I am trying to experiment with exposing Geode stats to Grafana
>> <http://grafana.org/> using a the time-series database InfluxDB
>> <https://www.influxdata.com/time-series-platform/influxdb/>.
>>
>> Facing the below exception when I start the server after enabling stats
>> and
>> including influxDB java client <https://github.com/influxdata
>> /influxdb-java> in
>> the project.
>> I am new to gradle (and also the above technologies ! ), not sure if I am
>> doing something wrong here w.r.t including the influxdb-java client.
>>
>> When I enable statistics, the server doesn't start(the .... after the
>>  start server command doesn't seem to stop), and I see the below exception
>> in the server logs
>>
>> [warning 2016/09/26 17:47:45.408 EDT geode-server1 <main> tid=0x1]
>> Statistics sampler is not available
>> *java.lang.IllegalStateException: Statistics sampler is not available*
>>         at
>> org.apache.geode.internal.statistics.SampleCollector.getStat
>> MonitorHandler(SampleCollector.java:127)
>>         at
>> org.apache.geode.internal.statistics.StatisticsMonitor.getSt
>> atMonitorHandler(StatisticsMonitor.java:139)
>>         at
>> org.apache.geode.internal.statistics.StatisticsMonitor.addLi
>> stener(StatisticsMonitor.java:83)
>>         at
>> org.apache.geode.management.internal.beans.stats.MBeanStatsM
>> onitor.addStatisticsToMonitor(MBeanStatsMonitor.java:59)
>>         at
>> org.apache.geode.management.internal.beans.MemberMBeanBridge
>> .addCacheStats(MemberMBeanBridge.java:470)
>>         at
>> org.apache.geode.management.internal.beans.MemberMBeanBridge
>> .init(MemberMBeanBridge.java:420)
>>         at
>> org.apache.geode.management.internal.beans.ManagementAdapter
>> .handleCacheCreation(ManagementAdapter.java:161)
>>         at
>> org.apache.geode.management.internal.beans.ManagementListene
>> r.handleEvent(ManagementListener.java:119)
>>         at
>> org.apache.geode.distributed.internal.InternalDistributedSys
>> tem.notifyResourceEventListeners(InternalDistributedSystem.java:2077)
>>         at
>> org.apache.geode.distributed.internal.InternalDistributedSys
>> tem.handleResourceEvent(InternalDistributedSystem.java:525)
>>         at
>> org.apache.geode.internal.cache.GemFireCacheImpl.initialize(
>> GemFireCacheImpl.java:1113)
>>         at
>> org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate
>> (GemFireCacheImpl.java:765)
>>         at
>> org.apache.geode.internal.cache.GemFireCacheImpl.create(GemF
>> ireCacheImpl.java:752)
>>         at org.apache.geode.cache.CacheFactory.create(CacheFactory.
>> java:181)
>>         at org.apache.geode.cache.CacheFactory.create(CacheFactory.
>> java:231)
>>         at
>> org.apache.geode.distributed.internal.DefaultServerLauncherC
>> acheProvider.createCache(DefaultServerLauncherCacheProvider.java:55)
>>         at
>> org.apache.geode.distributed.ServerLauncher.createCache(Serv
>> erLauncher.java:783)
>>         at
>> org.apache.geode.distributed.ServerLauncher.start(ServerLaun
>> cher.java:703)
>>         at
>> org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:633)
>>         at
>> org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:184)
>> For now I have changed the method (private writeSample
>> in StatArchiveWriter.java) to write to influxDB.
>>
>> *Geode Properties:*
>> statistic-sampling-enabled=true
>> statistic-archive-file=statsFile.gfs
>>
>> When I remove the above properties from the properties file the server
>> starts up fine, which makes me think that my gradle changes should be
>> fine.
>>
>> *Gradle changes:*
>>
>> 1. I have included the below line in geode-core/build.gradle
>> <https://github.com/apache/incubator-geode/blob/develop/geod
>> e-core/build.gradle#L39>
>>  dependencies.
>>   compile 'org.influxdb:influxdb-java:' + project.'influxdb-client-versi
>> on'
>>
>> 2. I have included the dependency version here
>> https://github.com/apache/incubator-geode/blob/develop/gradl
>> e/dependency-versions.properties
>>
>> 3. Have added the influxdb jar name here
>> https://github.com/apache/incubator-geode/blob/develop/geode
>> -assembly/src/test/resources/expected_jars.txt
>>
>>
>> Please let me know why one would see exception
>> "java.lang.IllegalStateException: Statistics sampler is not available".
>>
>> Any feedback on the approach/usefulness of using InfluxDB-Grafana for
>> geode
>> stats is appreciated.
>>
>>
>> Thanks,
>> Srikanth Manvi
>>
>
>

Reply via email to