Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fluentd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
fluentd
Commits
5ecc8968
Commit
5ecc8968
authored
9 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Fully install and configure Fluentd aggregator/receiver
parent
14c0a902
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defaults/main.yml
+1
-0
1 addition, 0 deletions
defaults/main.yml
meta/main.yml
+1
-0
1 addition, 0 deletions
meta/main.yml
tasks/main.yml
+17
-10
17 additions, 10 deletions
tasks/main.yml
templates/td-agent.conf
+23
-0
23 additions, 0 deletions
templates/td-agent.conf
with
42 additions
and
10 deletions
defaults/main.yml
0 → 100644
+
1
−
0
View file @
5ecc8968
fluentd_cert_passphrase
:
'
'
This diff is collapsed.
Click to expand it.
meta/main.yml
+
1
−
0
View file @
5ecc8968
---
dependencies
:
-
{
role
:
fluentd-client
}
-
{
role
:
kibana
}
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
17
−
10
View file @
5ecc8968
# fluentd
# http://www.fluentd.org
# Prepare: http://docs.fluentd.org/articles/before-install
# curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-trusty-td-agent2.sh | sh
#
# UI: http://docs.fluentd.org/articles/fluentd-ui
# Plugins
# fluent-plugin-elasticsearch
# fluent-plugin-record-reformer
#
# Tutorials
# https://sonnguyen.ws/centralize-docker-logs-with-fluentd-elasticsearch-and-kibana/
# https://sonnguyen.ws/monitor-nginx-response-time-with-fluentd-kibana-and-elasticsearch/
#
# Create SSL-Cert once upfront in the inventory and use the passührase similar to {{ fluentd_cert_passphrase }}:
# openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 90 -subj '/CN={{ fluentd_hostname }}'
---
# file: roles/fluentd/tasks/main.yml
-
name
:
"
Install
Plugins"
command
:
td-agent-gem install {{ item }}
with_items
:
-
'
fluent-plugin-elasticsearch'
-
'
fluent-plugin-record-reformer'
-
name
:
"
Copy
SSL
Key"
copy
:
src='{{ inventory_dir }}/files/ssl/td-agent/key.pem'
dest='/etc/ssl/td-agent/key.pem'
owner='root'
group='root'
mode=644
This diff is collapsed.
Click to expand it.
templates/td-agent.conf
0 → 100644
+
23
−
0
View file @
5ecc8968
<
source
>
@
type
secure_forward
shared_key
{{
fluentd_shared_key
}}
self_hostname
{{
inventory_hostname
}}
secure
true
ca_cert_path
/
etc
/
ssl
/
td
-
agent
/
cert
.
pem
ca_private_key_path
/
etc
/
ssl
/
td
-
agent
/
key
.
pem
ca_private_key_passphrase
{{
fluentd_cert_passphrase
}}
authentication
yes
<
user
>
username
{{
fluentd_username
}}
password
{{
fluentd_password
}}
</
user
>
</
source
>
<
match
**>
@
type
elasticsearch
logstash_format
true
host
127
.
0
.
0
.
1
port
9200
index_name
fluentd
type_name
fluentd
</
match
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment