wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.3.1.tar.gz
wget https://artifacts.elastic.co/downloads/kibana/kibana-5.3.1-darwin-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.3.1.zip
This is an example of using ELK to parse and view collectd data.
Caveat - I haven't fully tested this mapping yet, it doesn't take into account any other fields that may be added with other collectd plugins, just the ones I have specified below.
cat nodes_stats.json|jq '.nodes[].indices.docs.count'|awk '{s+=$0} END {print s}'
cat nodes_stats.json|jq '.nodes[].indices.store.size_in_bytes'|awk '{s+=$0} END {print s}'
cat people.json | jq -r '.[]|"\"\(.pk)\"" + ": " + "\"\(.fields.name)\""'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Via https://smelloworld.wordpress.com/2016/05/17/missing-fields-search-in-elasticsearch/ | |
{“query”:{“filtered”:{“query”:{“match_all”:{}},”filter”:{“missing”:{“field”:”FIELDNAME”}}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ logstash-2.2.0/bin/plugin list | |
logstash-codec-avro | |
logstash-codec-cef | |
logstash-codec-cloudfront | |
logstash-codec-cloudtrail | |
logstash-codec-collectd | |
logstash-codec-compress_spooler | |
logstash-codec-dots | |
logstash-codec-edn | |
logstash-codec-edn_lines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen *:80; | |
server_name kibana.domain.com; | |
access_log /var/log/nginx/kibana_access.log; | |
error_log /var/log/nginx/kibana_error.log; | |
location /kibana { | |
root /var/www; | |
index index.html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
F2B_DATE %{YEAR}-%{MONTHNUM}-%{MONTHDAY}[ ]%{HOUR}:?%{MINUTE}(?::?%{SECOND}) | |
F2B_ACTION (\w+)\.(?:\w+)(\s+)?\: | |
F2B_JAIL \[(?<jail>\w+\-?\w+?)\] | |
F2B_LEVEL (?<level>\w+)\s+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
elasticsearch { | |
hosts => [ "HOSTNAME_HERE" ] | |
port => "9200" | |
index => "INDEXNAME_HERE" | |
size => 500 | |
scroll => "5m" | |
} | |
} | |
output { |
Name | Description |
---|---|
action.allow_id_generation | - |
action.auto_create_index | - |
action.bulk.compress | - |
action.destructive_requires_name | http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_parameters.html#_parameters |
action.disable_shutdown | http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-shutdown.html#_disable_shutdown |
action.get.realtime | http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-get.html#realtime |