This repository has been archived by the owner on Nov 1, 2018. It is now read-only.
forked from cyverse-archive/DE
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#15 import elk-elasticsearch from de-ansible/vmlab
- Loading branch information
1 parent
927cd12
commit bcb0eac
Showing
12 changed files
with
999 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
elk-elasticsearch | ||
================= | ||
|
||
This role deploys the elastic search instance for the DE ELK stack. | ||
The ELK stack refers to the use of ElasticSearch, Kibana, and Logstash together. | ||
|
||
|
||
Requirements | ||
------------ | ||
|
||
systemd | ||
|
||
Role Variables | ||
-------------- | ||
dockerHostStats_url: the location of the latest `dockerHostStats` file from Jenkins. | ||
|
||
Role Tags | ||
--------- | ||
|
||
config: deploys all config files. | ||
stop_services: stops all services | ||
update_service_files: updates all service files. CentOS 7, systemd files. | ||
restart_services: restarts all services. | ||
|
||
stop_elasticsearch: stops the elasticsearch service. CentOS 7 only. | ||
stop_kibana: stops the kibana service. CentOS 7 only. | ||
stop_logstash: stops the logstash service. CentOS 7 only. | ||
restart_data: resarts the data container service. CentOS 7 only. | ||
restart_elasticsearch: restarts the elasticsearch service. CentOS 7 only. | ||
restart_kibana: restarts the kibana service. CentOS 7 only. | ||
restart_logstash: restarts the logstash service. CentOS 7 only. | ||
|
||
Dependencies | ||
------------ | ||
N/A | ||
|
||
Example Playbook | ||
---------------- | ||
|
||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: | ||
|
||
- hosts: elk | ||
roles: | ||
- { role: elk-stack } | ||
|
||
License | ||
------- | ||
|
||
BSD | ||
|
||
Author Information | ||
------------------ | ||
|
||
Jonathan Strootman - [email protected] | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
# defaults file for elk-elasticsearch | ||
enable_services: yes |
12 changes: 12 additions & 0 deletions
12
ansible/roles/elk-elasticsearch/files/de-error-template.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"template": "de-error-logs-*", | ||
"order": 2, | ||
"settings": { | ||
"index.refresh_interval": "5s", | ||
"index.number_of_replicas": "0" | ||
}, | ||
"aliases": { | ||
"de-error-logs": {} | ||
} | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
ansible/roles/elk-elasticsearch/files/de-logs-template.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"template": "de-logs-*", | ||
"order": 2, | ||
"settings": { | ||
"index.refresh_interval": "5s", | ||
"index.number_of_replicas": "0" | ||
}, | ||
"aliases": { | ||
"de-logs": {} | ||
} | ||
} | ||
|
121 changes: 121 additions & 0 deletions
121
ansible/roles/elk-elasticsearch/files/de-metrics-template.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{ | ||
"template": "de-metrics-*", | ||
"order": 1, | ||
"settings": { | ||
"index.refresh_interval": "5s", | ||
"index.number_of_replicas": "0" | ||
}, | ||
"mappings": { | ||
"app_event": { | ||
"properties": { | ||
"app": { | ||
"type": "nested", | ||
"include_in_parent": true, | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"index": "not_analyzed" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"integrator_name": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"description": { | ||
"type": "string", | ||
"index": "analyzed" | ||
}, | ||
"step_count": { | ||
"type": "integer" | ||
} | ||
} | ||
}, | ||
"analysis": { | ||
"type": "nested", | ||
"include_in_parent": true, | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"index": "not_analyzed" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"output_dir": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
} | ||
} | ||
}, | ||
"request": { | ||
"type": "nested", | ||
"include_in_parent": true, | ||
"properties": { | ||
"path-info": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"uri": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"request-method": { | ||
"type": "string", | ||
"index": "analyzed" | ||
} | ||
} | ||
}, | ||
"response": { | ||
"type": "nested", | ||
"include_in_parent": true, | ||
"properties": { | ||
"path-info": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"uri": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"request-method": { | ||
"type": "string", | ||
"index": "analyzed" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"aliases": { | ||
"de-metrics": {} | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
{ | ||
"template": "de-*", | ||
"order": 0, | ||
"settings": { | ||
"index.refresh_interval": "5s", | ||
"index.number_of_replicas": "0" | ||
}, | ||
"mappings": { | ||
"_default_": { | ||
"dynamic_templates": [ | ||
{ | ||
"message_field": { | ||
"mapping": { | ||
"index": "analyzed", | ||
"omit_norms": true, | ||
"type": "string" | ||
}, | ||
"match_mapping_type": "string", | ||
"match": "message" | ||
} | ||
}, | ||
{ | ||
"string_fields": { | ||
"mapping": { | ||
"index": "analyzed", | ||
"omit_norms": true, | ||
"type": "string" | ||
}, | ||
"match_mapping_type": "string", | ||
"match": "*" | ||
} | ||
} | ||
], | ||
"properties": { | ||
"geoip": { | ||
"dynamic": true, | ||
"properties": { | ||
"location": { | ||
"type": "geo_point" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"service": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"ext_service": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"exception": { | ||
"type": "nested", | ||
"include_in_parent": true, | ||
"properties": { | ||
"error-code": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
} | ||
} | ||
}, | ||
"user-info": { | ||
"type": "nested", | ||
"include_in_parent": true, | ||
"properties": { | ||
"user": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"email": { "type": "string", "index": "analyzed"}, | ||
"first-name": { "type": "string", "index": "analyzed"}, | ||
"las-name": { "type": "string", "index": "analyzed"} | ||
} | ||
}, | ||
"app": { | ||
"type": "nested", | ||
"include_in_parent": true, | ||
"properties": { | ||
"id": { "type": "string", "index": "not_analyzed"}, | ||
"name": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"integrator_name": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"description": { "type": "string", "index": "analyzed"}, | ||
"step_count": { "type": "integer"} | ||
} | ||
}, | ||
"analysis": { | ||
"type": "nested", | ||
"include_in_parent": true, | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"index": "not_analyzed" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"output_dir": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
} | ||
} | ||
}, | ||
"request": { | ||
"type": "nested", | ||
"include_in_parent": true, | ||
"properties": { | ||
"path-info": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"uri": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
}, | ||
"request-method": { | ||
"type": "string", | ||
"index": "analyzed" | ||
}, | ||
"id": { | ||
"type": "string", | ||
"index": "analyzed", | ||
"fields": { | ||
"raw": {"type": "string", "index": "not_analyzed"} | ||
} | ||
} | ||
|
||
} | ||
}, | ||
"response": { | ||
"type": "nested", | ||
"include_in_parent": true | ||
} | ||
|
||
}, | ||
"_all": { | ||
"enabled": true, | ||
"omit_norms": true | ||
} | ||
} | ||
}, | ||
"aliases": { } | ||
} | ||
|
Oops, something went wrong.