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)\""'
# Via https://smelloworld.wordpress.com/2016/05/17/missing-fields-search-in-elasticsearch/ | |
{“query”:{“filtered”:{“query”:{“match_all”:{}},”filter”:{“missing”:{“field”:”FIELDNAME”}}}}} |
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)\""'
WINDNS %{NUMBER:log_date} %{TIME:log_time} %{WORD:dns_thread_id} %{WORD:dns_context}%{SPACE}%{WORD:dns_packet_id} %{WORD:dns_ip_protocol} %{WORD:dns_direction} %{IP:dns_client_address}%{SPACE}%{WORD:dns_xid}%{SPACE}(?:Q|R|U) ?(Q|R|U)?%{SPACE}[%{GREEDYDATA:dns_hex_flags}%{SPACE}%{WORD:dns_response}]%{SPACE}%{WORD:dns_recordtype}%{SPACE}([1-9][0-9]?)%{GREEDYDATA:dns_query_name} |
$ 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 |
F2B_DATE %{YEAR}-%{MONTHNUM}-%{MONTHDAY}[ ]%{HOUR}:?%{MINUTE}(?::?%{SECOND}) | |
F2B_ACTION (\w+)\.(?:\w+)(\s+)?\: | |
F2B_JAIL \[(?<jail>\w+\-?\w+?)\] | |
F2B_LEVEL (?<level>\w+)\s+ |
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.
input { | |
elasticsearch { | |
hosts => [ "HOSTNAME_HERE" ] | |
port => "9200" | |
index => "INDEXNAME_HERE" | |
size => 500 | |
scroll => "5m" | |
} | |
} | |
output { |
input { | |
elasticsearch { | |
hosts => [ "HOSTNAME_HERE" ] | |
port => "9200" | |
index => "INDEXNAME_HERE" | |
size => 1000 | |
scroll => "5m" | |
docinfo => true | |
scan => true | |
} |
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 |
I hereby claim:
To claim this, I am signing this object: