Skip to content

Instantly share code, notes, and snippets.

@madelaney
Created April 16, 2019 12:05
Show Gist options
  • Save madelaney/9f9a80f39cf5d3bf69f31419adc08bb4 to your computer and use it in GitHub Desktop.
Save madelaney/9f9a80f39cf5d3bf69f31419adc08bb4 to your computer and use it in GitHub Desktop.
JMX Log stash
{
"host" : "10.10.9.73",
"port" : 9010,
"alias" : "test.homeserver.elasticsearch",
"queries" : [
{
"object_name" : "java.lang:type=Memory",
"object_alias" : "Memory"
}, {
"object_name" : "java.lang:type=Runtime",
"attributes" : [ "Uptime", "StartTime" ],
"object_alias" : "Runtime"
}, {
"object_name" : "java.lang:type=GarbageCollector,name=*",
"attributes" : [ "CollectionCount", "CollectionTime" ],
"object_alias" : "${type}.${name}"
}, {
"object_name" : "java.nio:type=BufferPool,name=*",
"object_alias" : "${type}.${name}"
} ]
}
input {
jmx {
path => "/etc/logstash/conf.d/jmx/"
polling_frequency => 30
type => "jmx"
nb_thread => 4
}
}
output {
elasticsearch {
hosts => ["10.10.9.231:9200"]
}
stdout {
codec => rubydebug
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment