Skip to content
Snippets Groups Projects
Verified Commit 1e143dfe authored by David Mehren's avatar David Mehren
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Ansible template
*.retry
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# netdata-server
Configures netdata to monitor the host and send alerts.
## Alerts
Make sure to set `netdata_from_email` and `netdata_to_email` and to configure the `msmtp_relay` role.
You can override alarm settings in `files/health_override.conf`
## Incoming replication
If you set `netdata_master` to `true` it will also act as a central target for other collectors.
Set `netdata_apikey` to a valid UUID (you can use `uuidgen` for that)
and make sure to use the same value on all collectors.
---
netdata_master: false
# -----------------------------------------------------------------------------
# dropped packets
# check if an interface is dropping packets
# the alarm is checked every 1 minute
# and examines the last 10 minutes of data
#
# it is possible to have expected packet drops on an interface for some network configurations
# look at the Monitoring Network Interfaces section in the proc.plugin documentation for more information
template: inbound_packets_dropped
on: net.drops
os: linux
hosts: *
families: *
lookup: sum -10m unaligned absolute of inbound
units: packets
every: 1m
warn: $this >= 100
delay: down 1h multiplier 1.5 max 2h
info: interface inbound dropped packets in the last 10 minutes
to: sysadmin
template: outbound_packets_dropped
on: net.drops
os: linux
hosts: *
families: *
lookup: sum -10m unaligned absolute of outbound
units: packets
every: 1m
warn: $this >= 100
delay: down 1h multiplier 1.5 max 2h
info: interface outbound dropped packets in the last 10 minutes
to: sysadmin
template: inbound_packets_dropped_ratio
on: net.packets
os: linux
hosts: *
families: *
lookup: sum -10m unaligned absolute of received
calc: (($inbound_packets_dropped != nan AND $this > 0) ? ($inbound_packets_dropped * 100 / $this) : (0))
units: %
every: 1m
warn: $this >= 4
crit: $this >= 6
delay: down 1h multiplier 1.5 max 2h
info: the ratio of inbound dropped packets vs the total number of received packets of the network interface, during the last 10 minutes
to: sysadmin
template: outbound_packets_dropped_ratio
on: net.packets
os: linux
hosts: *
families: *
lookup: sum -10m unaligned absolute of sent
calc: (($outbound_packets_dropped != nan AND $this > 0) ? ($outbound_packets_dropped * 100 / $this) : (0))
units: %
every: 1m
warn: $this >= 4
crit: $this >= 6
delay: down 1h multiplier 1.5 max 2h
info: the ratio of outbound dropped packets vs the total number of sent packets of the network interface, during the last 10 minutes
to: sysadmin
---
dependencies:
- src: git@gitlab.fachschaften.org:fsi-ansible/netdata.git
scm: git
version: "master"
- src: git@gitlab.fachschaften.org:fsi-ansible/msmtp_relay.git
scm: git
version: "master"
---
- name: Copy netdata stream config
template:
src: stream.conf.j2
dest: /opt/netdata/etc/netdata/stream.conf
when: netdata_master
notify: restart netdata
name: Copy health override config
copy:
src: "{{ item }}"
dest: /opt/netdata/etc/netdata/health.d/
with_fileglob: "../../../files/{{ inventory_hostname }}/netdata_health_override.conf"
notify: restart netdata
- name: Enable netdata
service:
name: netdata
enabled: yes
- name: set email sender
lineinfile:
path: /opt/netdata/etc/netdata/health_alarm_notify.conf
regexp: "^EMAIL_SENDER=\".*\""
line: "EMAIL_SENDER=\"{{ netdata_from_email }}\""
state: present
create: true
notify: restart netdata
- name: set email recipient
lineinfile:
path: /opt/netdata/etc/netdata/health_alarm_notify.conf
regexp: "^DEFAULT_RECIPIENT_EMAIL=\".*\""
line: "DEFAULT_RECIPIENT_EMAIL=\"{{ netdata_to_email }}\""
state: present
notify: restart netdata
#{{ ansible_managed }}
[{{ netdata_apikey }}]
enabled = yes
default history = 86400
default memory mode = save
health enabled by default = auto
#{{ ansible_managed }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment