Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fluentd-client
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-client
Commits
c37092fb
Commit
c37092fb
authored
1 year ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Add support to output to elasticsearch and openobserve in parallel
parent
b2eca526
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/td-agent.conf
+92
-8
92 additions, 8 deletions
templates/td-agent.conf
with
92 additions
and
8 deletions
templates/td-agent.conf
+
92
−
8
View file @
c37092fb
...
...
@@ -274,8 +274,12 @@
{%
for
appl
in
hostvars
[
host
].
fluentd_applications
|
default
([]) %}
{%
if
appl
.
type
|
default
(
false
) %}
<
match
{{
appl
.
index
}}>
@
type
{%
if
elasticsearch_install
|
default
(
'yes'
) %}{{
appl
.
plugin
|
default
(
'elasticsearch'
) }}{%
else
%}
http
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
@
type
copy
<
store
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
) %}
@
type
{{
appl
.
plugin
|
default
(
'elasticsearch'
) }}
host
127
.
0
.
0
.
1
port
9200
include_tag_key
true
...
...
@@ -288,7 +292,12 @@
{%
if
appl
.
plugin
|
default
(
'elasticsearch'
) ==
'elasticsearch'
%}
reconnect_on_error
true
{%
endif
%}
{%
else
%}
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
<
store
>
{%
endif
%}
{%
if
fluentd_openobserve_backend
is
defined
%}
@
type
http
endpoint
https
://{{
fluentd_openobserve_backend
.
domain
}}/
api
/
default
/{{
appl
.
index
}}/
_
json
content_type
json
...
...
@@ -298,6 +307,9 @@
username
{{
fluentd_openobserve_backend
.
username
}}
password
{{
fluentd_openobserve_backend
.
password
}}
</
auth
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
{%
endif
%}
<
buffer
>
@
type
file
...
...
@@ -311,6 +323,10 @@
{%
endfor
%}
<
match
app
.
ansible
>
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
@
type
copy
<
store
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
) %}
@
type
elasticsearch
host
127
.
0
.
0
.
1
...
...
@@ -322,7 +338,12 @@
index_name
ansible
type_name
ansible
reconnect_on_error
true
{%
else
%}
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
<
store
>
{%
endif
%}
{%
if
fluentd_openobserve_backend
is
defined
%}
@
type
http
endpoint
https
://{{
fluentd_openobserve_backend
.
domain
}}/
api
/
default
/
ansible
/
_
json
content_type
json
...
...
@@ -332,6 +353,9 @@
username
{{
fluentd_openobserve_backend
.
username
}}
password
{{
fluentd_openobserve_backend
.
password
}}
</
auth
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
{%
endif
%}
<
buffer
>
@
type
file
...
...
@@ -343,6 +367,10 @@
</
match
>
<
match
app
.
uptime
.
ping
>
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
@
type
copy
<
store
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
) %}
@
type
elasticsearch
host
127
.
0
.
0
.
1
...
...
@@ -354,7 +382,12 @@
index_name
uptime
type_name
ping
reconnect_on_error
true
{%
else
%}
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
<
store
>
{%
endif
%}
{%
if
fluentd_openobserve_backend
is
defined
%}
@
type
http
endpoint
https
://{{
fluentd_openobserve_backend
.
domain
}}/
api
/
default
/
uptime
/
_
json
content_type
json
...
...
@@ -364,6 +397,9 @@
username
{{
fluentd_openobserve_backend
.
username
}}
password
{{
fluentd_openobserve_backend
.
password
}}
</
auth
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
{%
endif
%}
<
buffer
>
@
type
file
...
...
@@ -375,6 +411,10 @@
</
match
>
<
match
haproxy
.*>
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
@
type
copy
<
store
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
) %}
@
type
elasticsearch
host
127
.
0
.
0
.
1
...
...
@@ -386,7 +426,12 @@
index_name
haproxy
type_name
haproxy
reconnect_on_error
true
{%
else
%}
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
<
store
>
{%
endif
%}
{%
if
fluentd_openobserve_backend
is
defined
%}
@
type
http
endpoint
https
://{{
fluentd_openobserve_backend
.
domain
}}/
api
/
default
/
haproxy
/
_
json
content_type
json
...
...
@@ -396,6 +441,9 @@
username
{{
fluentd_openobserve_backend
.
username
}}
password
{{
fluentd_openobserve_backend
.
password
}}
</
auth
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
{%
endif
%}
<
buffer
>
@
type
file
...
...
@@ -407,6 +455,10 @@
</
match
>
<
match
*
beat
>
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
@
type
copy
<
store
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
) %}
@
type
elasticsearch_dynamic
logstash_format
true
...
...
@@ -419,7 +471,12 @@
include_tag_key
true
tag_key
@
log_name
reconnect_on_error
true
{%
else
%}
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
<
store
>
{%
endif
%}
{%
if
fluentd_openobserve_backend
is
defined
%}
@
type
http
endpoint
https
://{{
fluentd_openobserve_backend
.
domain
}}/
api
/
default
/
beat
/
_
json
content_type
json
...
...
@@ -429,6 +486,9 @@
username
{{
fluentd_openobserve_backend
.
username
}}
password
{{
fluentd_openobserve_backend
.
password
}}
</
auth
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
{%
endif
%}
<
buffer
>
@
type
file
...
...
@@ -440,6 +500,10 @@
</
match
>
<
match
netdata
>
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
@
type
copy
<
store
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
) %}
@
type
elasticsearch
host
127
.
0
.
0
.
1
...
...
@@ -451,7 +515,12 @@
index_name
netdata
type_name
netdata
reconnect_on_error
true
{%
else
%}
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
<
store
>
{%
endif
%}
{%
if
fluentd_openobserve_backend
is
defined
%}
@
type
http
endpoint
https
://{{
fluentd_openobserve_backend
.
domain
}}/
api
/
default
/
netdata
/
_
json
content_type
json
...
...
@@ -461,6 +530,9 @@
username
{{
fluentd_openobserve_backend
.
username
}}
password
{{
fluentd_openobserve_backend
.
password
}}
</
auth
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
{%
endif
%}
<
buffer
>
@
type
file
...
...
@@ -475,6 +547,10 @@
</
match
>
<
match
**>
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
@
type
copy
<
store
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
) %}
@
type
elasticsearch
logstash_format
true
...
...
@@ -487,7 +563,12 @@
index_name
fluentd
type_name
fluentd
reconnect_on_error
true
{%
else
%}
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
<
store
>
{%
endif
%}
{%
if
fluentd_openobserve_backend
is
defined
%}
@
type
http
endpoint
https
://{{
fluentd_openobserve_backend
.
domain
}}/
api
/
default
/
default
/
_
json
content_type
json
...
...
@@ -497,6 +578,9 @@
username
{{
fluentd_openobserve_backend
.
username
}}
password
{{
fluentd_openobserve_backend
.
password
}}
</
auth
>
{%
endif
%}
{%
if
elasticsearch_install
|
default
(
'yes'
)
and
fluentd_openobserve_backend
is
defined
%}
</
store
>
{%
endif
%}
<
buffer
>
@
type
file
...
...
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