blob: ee358124a85366ec958fac4ff6b7f05c04345db7 [file]
# Churn server configuration.
#
# Copy this file to /opt/churn/server.yaml and change what you need. Every setting is
# optional: a line you leave out gets the value shown here.
#
# A misspelled setting is not silently accepted. The server logs a warning that names
# it at start-up, so have a look at `journalctl -u churn` after editing.
listen:
# Churn itself speaks plain HTTP and is meant to sit behind Apache, which does the
# TLS. Keep it on the loopback address so nothing can reach it around the proxy.
host: 127.0.0.1
port: 8084
# The address people and clients use to reach this server. After logging in, the
# OAuth service sends the browser back to this host name, so it has to be right.
public_url: https://churn.apache.org
# The client registry, one SQLite file per client, the IP datasets and the secret
# that signs login cookies all live here.
data_dir: /opt/churn/data
# DANGER. With this on, nobody is asked to log in and every visitor is treated as a
# root user. It exists for working on the dashboard on your own machine. The server
# refuses to start with it unless listen.host is a loopback address, and it ignores
# the switch for any request that arrived through a proxy.
dev_login: false
# The legacy ASF OAuth service. There is normally no reason to change these.
oauth:
init_url: "https://oauth.apache.org/auth?state=%s&redirect_uri=%s"
callback_url: "https://oauth.apache.org/token?code=%s"
# How long each level of detail is kept. Coarser data is cheaper, so it stays longer.
retention:
raw_hours: 2 # one point per packet (every 5 seconds)
minute_hours: 48 # one point per minute, and top lists per 10 minutes
days: 30 # one point per 10 minutes, and top lists per day
findings_days: 30 # closed findings
ingest:
# Threads that check signatures, unpack packets and write them to disk. A client
# always lands on the same thread. Two is plenty for a hundred machines.
workers: 2
# Packets waiting for a worker. When this is full, clients are told to come back
# later (and they do: the packet goes to their spool).
queue_size: 4000
max_packet_kb: 4096 # largest packet accepted, compressed
max_unpacked_mb: 64 # largest packet accepted, unpacked
# A packet whose send time is further from the server's clock than this many
# seconds is refused. Backfilled and spooled data is not affected: this is about
# when the packet was sent, not about the period it describes.
max_clock_skew: 300
# Seconds between writing the top-list tallies to disk.
flush_interval: 30
registration:
# Unapproved keys the server is willing to remember. Past this, new requests are
# turned away until some of the waiting ones have been decided or have expired.
# It keeps somebody from filling the registry with made-up keys.
max_pending: 500
# A pending client that has not asked again for this many days is forgotten.
pending_expire_days: 7
# The datasets that turn an address into a network prefix and an AS name. They are
# the same three files sg2.py uses, fetched the same way.
ipdata:
directory: "" # empty means <data_dir>/ipdata
pyasn_url: https://infra-reports.apache.org/_assets/pyasn.dat
asnames_url: https://infra-reports.apache.org/_assets/asnames.json
known_hosts_url: https://svn.apache.org/repos/infra/infrastructure/trunk/dns/zones/ipdata.json
max_age_days: 7 # a file older than this is downloaded again
refresh_check_hours: 6 # how often the ages are looked at
# IPv4 announcements wider than this are ignored. BGP tables regularly carry junk
# such as a /2 that would hand a quarter of the internet to one AS. See the README.
min_ipv4_prefix: 8
download_timeout: 60
# Sizes of the top lists. "keep" settings bound what is stored once a period has
# closed; top_n is how many rows the dashboard shows.
tables:
top_n: 25
keep_ips_per_bucket: 500
keep_ips_per_site: 50
keep_ips_per_day: 5000
keep_nets_per_site: 300
keep_agents_per_site: 150
keep_dims_per_site: 100
# What makes an origin show up under Findings. All rates are averages over the
# window, per machine.
detection:
enabled: true
interval: 60 # seconds between evaluations
window_minutes: 10
resolve_after_minutes: 15 # a finding closes after this long without a rule firing
# Hard limits: more than this is always worth a look.
requests_per_minute: {ip: 300, prefix: 1200, asn: 3000}
mbytes_per_minute: {ip: 200, prefix: 500, asn: 1000}
# Comparison with everybody else on the same machine.
share_of_requests: {ip: 0.10, prefix: 0.20, asn: 0.35}
share_min_total: 1000 # shares mean nothing on a machine this quiet
share_min_requests: 200 # ...or for an origin this small
median_multiple: 20 # an address this many times busier than the typical one
median_min_requests: 200
faked_min_requests: 50 # requests with a faked user agent
error_ratio: 0.8 # this share of 4xx answers looks like probing
error_min_requests: 200
# Leave addresses from the ASF's own host list out of it.
exempt_known_hosts: true
# AS numbers that never raise a finding, for instance your monitoring provider.
exempt_asns: []
# New findings can be posted to a webhook. The body is JSON with a "text" field, which
# Slack and compatible services show as a message, plus the findings as data.
webhook:
url: ""
min_interval_seconds: 30 # several findings in this time go out as one message
timeout: 10
# DEBUG, INFO, WARNING or ERROR.
log_level: INFO