Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to write graylog2 metrics to mongodb #1228

jgkirschbaum opened this issue Jun 8, 2015 · 1 comment

Unable to write graylog2 metrics to mongodb #1228

jgkirschbaum opened this issue Jun 8, 2015 · 1 comment


Copy link

@jgkirschbaum jgkirschbaum commented Jun 8, 2015

I upgraded graylog from 1.0.2 to 1.1.1 this morning and from now on I get the following error in the logfile:

2015-06-08T14:25:59.814+02:00 WARN  [MongoDbMetricsReporter] Unable to write graylog2 metrics to mongodb. Ignoring this error.
java.lang.IllegalArgumentException: can't serialize class org.joda.time.DateTime
        at org.bson.BasicBSONEncoder._putObjectField(
        at org.bson.BasicBSONEncoder.putObject(
        at org.bson.BasicBSONEncoder.putObject(
        at com.mongodb.DefaultDBEncoder.writeObject(
        at com.mongodb.OutMessage.putObject(
        at com.mongodb.DBCollectionImpl.insertWithWriteProtocol(
        at com.mongodb.DBCollectionImpl.insert(
        at com.mongodb.DBCollectionImpl.insert(
        at com.mongodb.DBCollection.insert(
        at com.codahale.metrics.ScheduledReporter$
        at java.util.concurrent.Executors$
        at java.util.concurrent.FutureTask.runAndReset(
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(
        at java.util.concurrent.ScheduledThreadPoolExecutor$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
@joschi joschi added the bug label Jun 8, 2015
@joschi joschi added this to the 1.1.2 milestone Jun 8, 2015
@joschi joschi self-assigned this Jun 8, 2015
Copy link

@joschi joschi commented Jun 8, 2015

Thanks for reporting this!

The reason for the error was a type of metric (Gauge<DateTime>) being recorded which is incompatible with the (vanilla) MongoDB driver.

As a workaround until the fix has been released, you could deactivate the MongoDB metrics reporter in your setup (

@joschi joschi closed this in f8401f4 Jun 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants