Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
dns-collector
Commits
5c31fe9c
Commit
5c31fe9c
authored
Sep 14, 2017
by
Tomas Gavenciak
Browse files
Add make install, rename dnscol to dns-collector, update default config
parent
42da4e1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
5c31fe9c
/dnscol
/dns
-
col
llector
/out
/misc
/docs
...
...
Makefile
View file @
5c31fe9c
.PHONY
:
all clean veryclean docs libucw
.PHONY
:
all clean veryclean docs libucw
install prog
PROG
=
./dnscol
all
:
$(PROG)
all
:
prog
## Docs
...
...
@@ -30,7 +28,7 @@ veryclean::
cd
$(LIBUCW_DIR)
/
&&
make clean
## dnscol
## dns
-
col
lector
LDLIBS
?=
LDFLAGS
?=
...
...
@@ -49,4 +47,20 @@ ifdef USE_TCMALLOC
LDLIBS
+=
-ltcmalloc
endif
PROG
=
./dns-collector
prog
:
$(PROG)
include
src/Makefile
## install
PREFIX
?=
/usr/local
DESTDIR
?=
$(PREFIX)
CONFIG
=
./dns-collector.conf
install
:
$(PROG)
install
-m
755
-D
$(PROG)
$(DESTDIR)
/usr/bin/dns-collector
install
-m
644
-D
$(CONFIG)
$(DESTDIR)
/etc/dns-collector/dns-collector.conf
dnscol.conf
→
dns
-
col
lector
.conf
View file @
5c31fe9c
...
...
@@ -28,6 +28,7 @@ dnscol {
### the command line). See http://www.wand.net.nz/trac/libtrace/wiki/SupportedTraceFormats
# input_uri "ring:wlp3s0"
# input_uri "ring:lo"
# input_uri "ring:bond0"
### Input PBF filter. The collector should see only DNS packets after this filter.
input_filter
"port 53"
...
...
@@ -60,20 +61,19 @@ dnscol {
### (together with high packet frequency)
match_window
5
.
0
### Common output file pattern, expanded with strftime(3) on opening.
### Use "" for stdout (default).
#output_path_fmt "data-%Y%m%d-%H%M%S.csv
.gz
"
output_path_fmt
"data-%Y%m%d-%H%M%S.csv"
### Use "" for stdout (default).
Any compression suffix must be included manually.
#output_path_fmt "data-%Y%m%d-%H%M%S.csv"
output_path_fmt
"data-%Y%m%d-%H%M%S.csv
.gz
"
### The output may be piped via this command before being written to the file above.
### May be used for any compression, but also for sending to an online processing etc.
#output_pipe_cmd "python generate_stats.py -S example.com:8888"
#
output_pipe_cmd "gzip -4"
output_pipe_cmd
"gzip -4"
### The output files can be periodically rotated, use 0 for no rotation.
### Note that the pipe command is restarted for every output file.
output_period
0
output_period
60
0
### Output format and type. Currently only "csv" is supported.
output_type
csv
...
...
@@ -115,17 +115,21 @@ logging {
stream
{
name
default
substream
stderr
log
}
stream
{
name
log
### When it should log the messages to a file, a name of the file should be specified.
### Escape sequences for current date and time as described in strftime(3) can be used.
#
filename
dnscol
-%Y%m%d
.log
filename
/
var
/
log
/
dns
-
col
lector
.
log
### Let stderr of the program (and any subprocesses) point to this file-based log_stream.
#stderrfollows 1
### If you need to log to stderr or another already opened descriptor,
### you can specify its number.
filedesc
2
#
filedesc 2
### Instead of a file, a syslog facility can be specified. See syslog(3) for an explanation.
#syslogfacility daemon
...
...
@@ -141,12 +145,18 @@ logging {
types
spam
### Rate per second
rate
5
rate
1
### Number of messages before rate-limiting kicks in
burst
10
}
}
stream
{
name
stderr
filedesc
2
types
:
reset
default
levels
:
reset
error
fatal
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment