Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 26dc9cb

Browse files
committed
Add heka.bootstrap task
1 parent 196a076 commit 26dc9cb

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

fabfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import cdn
2121
import elasticsearch
2222
import graphite
23+
import heka
2324
import incident
2425
import kernel
2526
import licensify

heka.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from fabric.api import *
2+
3+
@task
4+
def bootstrap(utility, config):
5+
"""
6+
Bootstrap journal files for Heka
7+
8+
To prevent Heka from reading old log entries and sending duplicate data
9+
to Elasticsearch, when monitoring new log files. Utility built from:
10+
11+
https://github.com/dcarley/heka/compare/dcarley:versions/0.8...logstreamer_bootstrap_journals
12+
"""
13+
put(utility, mirror_local_mode=True)
14+
put(config)
15+
sudo('install -d -m0744 /var/cache/hekad/logstreamer')
16+
sudo('~/%s -config %s -bootstrapJournals' % (utility, config))
17+
run('rm %s %s' % (utility, config))

0 commit comments

Comments
 (0)