Skip to content

Instantly share code, notes, and snippets.

@alexlovelltroy
Created April 18, 2015 00:07
Show Gist options
  • Save alexlovelltroy/076aa1f04148d2b875b5 to your computer and use it in GitHub Desktop.
Save alexlovelltroy/076aa1f04148d2b875b5 to your computer and use it in GitHub Desktop.
geoip and statsd example
"logstash": {
"version": "1.4.4",
"server": {
"enabled": true,
"inputs": [
{
"rabbitmq": {
"exchange": "logstash",
"user": "username",
"password": "password",
"host": "rabbit1"
},
"queue": "incoming_logs",
"exclusive": false,
"threads": 4
}
}
],
"filters": [
{
"geoip": {
"source": "remote_addr"
}
},
{
"geoip": {
"source": "ipAddress"
}
},
{
"geoip": {
"source": "clientip"
}
}
],
"outputs": [
{
"elasticsearch": {
"host": ["elasticsearch1"],
"protocol": "http"
}
},
{
"statsd": {
"increment": [
"%{type}.status.%{status}",
"%{type}.response.%{response}"
],
"count": [
"%{type}.bytes_sent",
"%{body_bytes_sent}"
],
"timing": [
"%{type}.request_time",
"%{request_time}",
"%{type}.responseTime",
"%{responseTime}"
],
"namespace": ""
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment