Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Ansible
Roles
elasticsearch
Commits
9dc18d0f
Commit
9dc18d0f
authored
Mar 16, 2016
by
Jürgen Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HaProxy integration
parent
2e831a02
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
174 additions
and
0 deletions
+174
-0
handlers/main.yml
handlers/main.yml
+15
-0
tasks/install.yml
tasks/install.yml
+1
-0
templates/index/haproxy.json
templates/index/haproxy.json
+90
-0
templates/search/default.json
templates/search/default.json
+25
-0
templates/search/haproxy.json
templates/search/haproxy.json
+26
-0
templates/visualize/haproxy.json
templates/visualize/haproxy.json
+17
-0
No files found.
handlers/main.yml
View file @
9dc18d0f
...
...
@@ -8,3 +8,18 @@
service
:
name='elasticsearch'
state='started'
-
name
:
"
Copy
Indexes"
template
:
src='index/{{ item }}.json'
dest='/tmp/{{ item }}.json'
owner='root'
group='root'
mode='664'
with_items
:
-
'
haproxy'
-
name
:
"
Create
Indexes"
command
:
curl -X PUT 'http://localhost:9200/{{ item }}/' --data-ascii '@/tmp/{{ item }}.json'
with_items
:
-
'
haproxy'
tasks/install.yml
View file @
9dc18d0f
...
...
@@ -11,3 +11,4 @@
notify
:
-
"
Add
Elasticsearch
to
Boot-List"
-
"
Start
Elasticsearch"
-
"
Create
Indexes"
templates/index/haproxy.json
0 → 100644
View file @
9dc18d0f
{
"mappings"
:
{
"haproxy"
:
{
"properties"
:
{
"actconn"
:
{
"type"
:
"string"
},
"b_end"
:
{
"type"
:
"string"
},
"b_server"
:
{
"type"
:
"string"
},
"backend_queue"
:
{
"type"
:
"string"
},
"beconn"
:
{
"type"
:
"string"
},
"bytes_read"
:
{
"type"
:
"string"
},
"c_ip"
:
{
"type"
:
"string"
},
"c_port"
:
{
"type"
:
"string"
},
"captured_request_cookie"
:
{
"type"
:
"string"
},
"captured_response_cookie"
:
{
"type"
:
"string"
},
"f_end"
:
{
"type"
:
"string"
},
"feconn"
:
{
"type"
:
"string"
},
"http_request"
:
{
"type"
:
"string"
},
"pid"
:
{
"type"
:
"string"
},
"prefix"
:
{
"type"
:
"string"
},
"ps"
:
{
"type"
:
"string"
},
"retries"
:
{
"type"
:
"string"
},
"srv_conn"
:
{
"type"
:
"string"
},
"srv_queue"
:
{
"type"
:
"string"
},
"status_code"
:
{
"type"
:
"string"
},
"syslog_time"
:
{
"type"
:
"date"
,
"format"
:
"dd/MMM/yyyy:HH:mm:ss Z"
},
"tc"
:
{
"type"
:
"string"
},
"termination_state"
:
{
"type"
:
"string"
},
"tq"
:
{
"type"
:
"string"
},
"tr"
:
{
"type"
:
"string"
},
"tt"
:
{
"type"
:
"string"
},
"tw"
:
{
"type"
:
"string"
}
}
}
}
}
templates/search/default.json
0 → 100644
View file @
9dc18d0f
[
{
"_id"
:
"Default"
,
"_type"
:
"search"
,
"_source"
:
{
"title"
:
"Default"
,
"description"
:
""
,
"hits"
:
0
,
"columns"
:
[
"host"
,
"code"
,
"message"
,
"agent"
],
"sort"
:
[
"@timestamp"
,
"desc"
],
"version"
:
1
,
"kibanaSavedObjectMeta"
:
{
"searchSourceJSON"
:
"{
\"
index
\"
:
\"
logstash-*
\"
,
\"
query
\"
:{
\"
query_string
\"
:{
\"
query
\"
:
\"
*
\"
,
\"
analyze_wildcard
\"
:true}},
\"
filter
\"
:[],
\"
highlight
\"
:{
\"
pre_tags
\"
:[
\"
@kibana-highlighted-field@
\"
],
\"
post_tags
\"
:[
\"
@/kibana-highlighted-field@
\"
],
\"
fields
\"
:{
\"
*
\"
:{}},
\"
require_field_match
\"
:false,
\"
fragment_size
\"
:2147483647}}"
}
}
}
]
\ No newline at end of file
templates/search/haproxy.json
0 → 100644
View file @
9dc18d0f
[
{
"_id"
:
"HaProxy"
,
"_type"
:
"search"
,
"_source"
:
{
"title"
:
"HaProxy"
,
"description"
:
""
,
"hits"
:
0
,
"columns"
:
[
"f_end"
,
"b_end"
,
"c_ip"
,
"status_code"
,
"http_request"
],
"sort"
:
[
"syslog_time"
,
"desc"
],
"version"
:
1
,
"kibanaSavedObjectMeta"
:
{
"searchSourceJSON"
:
"{
\"
index
\"
:
\"
haproxy
\"
,
\"
query
\"
:{
\"
query_string
\"
:{
\"
analyze_wildcard
\"
:true,
\"
query
\"
:
\"
*
\"
}},
\"
filter
\"
:[],
\"
highlight
\"
:{
\"
pre_tags
\"
:[
\"
@kibana-highlighted-field@
\"
],
\"
post_tags
\"
:[
\"
@/kibana-highlighted-field@
\"
],
\"
fields
\"
:{
\"
*
\"
:{}},
\"
require_field_match
\"
:false,
\"
fragment_size
\"
:2147483647}}"
}
}
}
]
\ No newline at end of file
templates/visualize/haproxy.json
0 → 100644
View file @
9dc18d0f
[
{
"_id"
:
"HaProxy"
,
"_type"
:
"visualization"
,
"_source"
:
{
"title"
:
"HaProxy"
,
"visState"
:
"{
\"
title
\"
:
\"
HaProxy
\"
,
\"
type
\"
:
\"
area
\"
,
\"
params
\"
:{
\"
shareYAxis
\"
:true,
\"
addTooltip
\"
:true,
\"
addLegend
\"
:true,
\"
smoothLines
\"
:false,
\"
scale
\"
:
\"
linear
\"
,
\"
interpolate
\"
:
\"
linear
\"
,
\"
mode
\"
:
\"
stacked
\"
,
\"
times
\"
:[],
\"
addTimeMarker
\"
:false,
\"
defaultYExtents
\"
:false,
\"
setYExtents
\"
:false,
\"
yAxis
\"
:{}},
\"
aggs
\"
:[{
\"
id
\"
:
\"
1
\"
,
\"
type
\"
:
\"
count
\"
,
\"
schema
\"
:
\"
metric
\"
,
\"
params
\"
:{}},{
\"
id
\"
:
\"
2
\"
,
\"
type
\"
:
\"
date_histogram
\"
,
\"
schema
\"
:
\"
segment
\"
,
\"
params
\"
:{
\"
field
\"
:
\"
syslog_time
\"
,
\"
interval
\"
:
\"
m
\"
,
\"
customInterval
\"
:
\"
2h
\"
,
\"
min_doc_count
\"
:1,
\"
extended_bounds
\"
:{}}},{
\"
id
\"
:
\"
3
\"
,
\"
type
\"
:
\"
terms
\"
,
\"
schema
\"
:
\"
group
\"
,
\"
params
\"
:{
\"
field
\"
:
\"
b_end
\"
,
\"
size
\"
:5,
\"
order
\"
:
\"
desc
\"
,
\"
orderBy
\"
:
\"
1
\"
}}],
\"
listeners
\"
:{}}"
,
"uiStateJSON"
:
"{}"
,
"description"
:
""
,
"savedSearchId"
:
"HaProxy"
,
"version"
:
1
,
"kibanaSavedObjectMeta"
:
{
"searchSourceJSON"
:
"{
\"
filter
\"
:[]}"
}
}
}
]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment