etsy/statsd-jvm-profiler

Problems writing directly to InfluxDB

Closed this issue · 3 comments

I'm getting this problem:
Exception in thread "Thread-1" java.lang.NullPointerException
at org.influxdb.impl.TimeUtil.toTimePrecision(TimeUtil.java:21)
at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:155)
at com.etsy.statsd.profiler.reporter.InfluxDBReporter.recordGaugeValues(InfluxDBReporter.java:69)
at com.etsy.statsd.profiler.Profiler.recordGaugeValues(Profiler.java:73)
at com.etsy.statsd.profiler.profilers.MemoryProfiler.recordStats(MemoryProfiler.java:108)
at com.etsy.statsd.profiler.profilers.MemoryProfiler.flushData(MemoryProfiler.java:49)
at com.etsy.statsd.profiler.worker.ProfilerShutdownHookWorker.run(ProfilerShutdownHookWorker.java:22)
at java.lang.Thread.run(Thread.java:744)

Steps to reproduce:

  1. download http://sourceforge.net/projects/suprfractalthng/ - the jar file name is superfractalthing_0.8.3.jar
  2. install InfluxDB on another machine
  3. run this set of commands:

export _JAVA_OPTIONS='-javaagent:/var/lib/statsd-jvm-profiler-0.8.1-SNAPSHOT.jar=server=192.168.56.101,port=8086,reporter=InfluxDBReporter,database=monitoring,username=monitoring,password=monitoring,profiler=CPUProfilers'

java -jar superfractalthing_0.8.3.jar

(I've built the profiler by git cloning your repository first, then "maven package", then copied to /var/lib/; then I created a database called "monitoring" with the same username and password in the InfluxDB).

  1. play with the app, close the app. And you will get an exception.

Thanks for reporting this, I was able to reproduce the problem. I'll look into it.

This should be fixed now. Let us know if you have additional issues!

yes, it works fine. thank you.