# Download and install the Public Signing Key rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch # Add the following in your /etc/yum.repos.d/elasticsearch.repo \[elasticsearch-1.1\] name=Elasticsearch repository for 1.1.x packages baseurl=http://packages.elasticsearch.org/elasticsearch/1.1/centos gpgcheck=1 gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch enabled=1 # Install yum install elasticsearch
# Add the key rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch # Add the following in your /etc/yum.repos.d/logstash.repo [logstash-1.4] name=logstash repository for1.4.x packages baseurl=http://packages.elasticsearch.org/logstash/1.4/centos gpgcheck=1 gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch enabled=1
# Create a log format called 'logstash\_json' that emits, in json, the parts of an http # request I care about. For more details on the features of the 'LogFormat' # directive, see the apache docs: # http://httpd.apache.org/docs/2.2/mod/mod\_log\_config.html#formats LogFormat"{ \"@timestamp\": \"%{%Y-%m-%dT%H:%M:%S%z}t\", \"@fields\": { \"client\": \"%a\", \"duration_usec\": %D, \"status\": %s, \"request\": \"%U%q\", \"method\": \"%m\", \"referrer\": \"%{Referer}i\" } }" logstash_json