Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NetData
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
NetData
Commits
c15e3a9d
Commit
c15e3a9d
authored
7 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-roles/fluentd-client#4 Moior FluentD buffer
parent
32679100
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tasks/install.yml
+18
-0
18 additions, 0 deletions
tasks/install.yml
templates/fluentd_buffer.chart.sh
+34
-0
34 additions, 0 deletions
templates/fluentd_buffer.chart.sh
templates/fluentd_buffer.conf
+10
-0
10 additions, 0 deletions
templates/fluentd_buffer.conf
with
62 additions
and
0 deletions
tasks/install.yml
+
18
−
0
View file @
c15e3a9d
...
...
@@ -28,3 +28,21 @@
args
:
chdir
:
/opt/{{ netdata_local_archive|default('netdata') }}
when
:
netdata_clone.changed or netdata_extract.changed
-
name
:
"
Install
Custom
Charts"
template
:
src
:
'
{{
item
}}.chart.sh'
dest
:
'
/usr/libexec/netdata/charts.d/{{
item
}}.chart.sh'
with_items
:
-
'
fluentd_buffer'
notify
:
-
"
Restart
NetData"
-
name
:
"
Install
Custom
Alerts"
template
:
src
:
'
{{
item
}}.conf'
dest
:
'
/etc/netdata/health.d/{{
item
}}.conf'
with_items
:
-
'
fluentd_buffer'
notify
:
-
"
Restart
NetData"
This diff is collapsed.
Click to expand it.
templates/fluentd_buffer.chart.sh
0 → 100644
+
34
−
0
View file @
c15e3a9d
fluentd_buffer_update_every
=
5
fluentd_buffer_priority
=
12000
fluentd_buffer_value1
=
0
fluentd_buffer_last
=
0
fluentd_buffer_count
=
0
fluentd_buffer_get
()
{
fluentd_buffer_value1
=
$(
find /var/log/td-agent/buffer
-type
f |
wc
-l
)
return
0
}
fluentd_buffer_check
()
{
return
0
}
fluentd_buffer_create
()
{
cat
<<
EOF
CHART fluentd_buffer.files '' "Files in buffer" "files" fluentd fluentd.countfiles line
$((
fluentd_buffer_priority
+
1
))
$fluentd_buffer_update_every
DIMENSION countfiles '' absolute 1 1
EOF
return
0
}
fluentd_buffer_update
()
{
fluentd_buffer_get
||
return
1
cat
<<
VALUESEOF
BEGIN fluentd_buffer.files
$1
SET countfiles =
$fluentd_buffer_value1
END
VALUESEOF
return
0
}
This diff is collapsed.
Click to expand it.
templates/fluentd_buffer.conf
0 → 100644
+
10
−
0
View file @
c15e3a9d
template
:
fluentd_buffer_files
on
:
fluentd_buffer
.
files
calc
: $
this
green
:
15
red
:
20
every
:
10
s
warn
: $
this
> $
green
crit
: $
this
> $
red
info
:
files
in
buffer
to
:
sysadmin
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