Overdue commit
This commit is contained in:
parent
1e03c32201
commit
692269f9ff
49 changed files with 843 additions and 198 deletions
1
roles/netdata/defaults/main.yml
Normal file
1
roles/netdata/defaults/main.yml
Normal file
|
@ -0,0 +1 @@
|
|||
has_gpu: False
|
21
roles/netdata/files/netdata.repo
Normal file
21
roles/netdata/files/netdata.repo
Normal file
|
@ -0,0 +1,21 @@
|
|||
[netdata]
|
||||
name=netdata
|
||||
baseurl=https://packagecloud.io/netdata/netdata/fedora/34/$basearch
|
||||
repo_gpgcheck=1
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
gpgkey=https://packagecloud.io/netdata/netdata/gpgkey
|
||||
sslverify=1
|
||||
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
|
||||
metadata_expire=300
|
||||
|
||||
[netdata-source]
|
||||
name=netdata-source
|
||||
baseurl=https://packagecloud.io/netdata/netdata/fedora/34/SRPMS
|
||||
repo_gpgcheck=1
|
||||
gpgcheck=0
|
||||
enabled=1
|
||||
gpgkey=https://packagecloud.io/netdata/netdata/gpgkey
|
||||
sslverify=1
|
||||
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
|
||||
metadata_expire=300
|
13
roles/netdata/handlers/main.yml
Normal file
13
roles/netdata/handlers/main.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- name: enable netdata
|
||||
service:
|
||||
name: netdata
|
||||
state: started
|
||||
enabled: yes
|
||||
become: yes
|
||||
|
||||
- name: restart netdata
|
||||
service:
|
||||
name: netdata
|
||||
state: restarted
|
||||
become: yes
|
39
roles/netdata/tasks/main.yml
Normal file
39
roles/netdata/tasks/main.yml
Normal file
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
|
||||
- name: Add netdata repo
|
||||
copy:
|
||||
src: netdata.repo
|
||||
mode: "0644"
|
||||
dest: /etc/yum.repos.d/netdata.repo
|
||||
become: yes
|
||||
|
||||
- name: Install netdata
|
||||
dnf:
|
||||
name:
|
||||
- netdata
|
||||
notify: enable netdata
|
||||
become: yes
|
||||
|
||||
- name: Add netdata conf
|
||||
template:
|
||||
src: netdata.conf.j2
|
||||
mode: "0644"
|
||||
dest: /etc/netdata/netdata.conf
|
||||
notify: restart netdata
|
||||
become: yes
|
||||
|
||||
- name: Add netdata python.d.conf
|
||||
template:
|
||||
src: python.d.conf.j2
|
||||
mode: "0644"
|
||||
dest: /etc/netdata/python.d.conf
|
||||
notify: restart netdata
|
||||
become: yes
|
||||
|
||||
- name: Add netdata nvidia_smi.conf
|
||||
template:
|
||||
src: nvidia_smi.conf.j2
|
||||
mode: "0644"
|
||||
dest: /etc/netdata/python.d/nvidia_smi.conf
|
||||
notify: restart netdata
|
||||
become: yes
|
36
roles/netdata/templates/netdata.conf.j2
Normal file
36
roles/netdata/templates/netdata.conf.j2
Normal file
|
@ -0,0 +1,36 @@
|
|||
# netdata configuration
|
||||
#
|
||||
# You can download the latest version of this file, using:
|
||||
#
|
||||
# wget -O /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
|
||||
# or
|
||||
# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
|
||||
#
|
||||
# You can uncomment and change any of the options below.
|
||||
# The value shown in the commented settings, is the default value.
|
||||
#
|
||||
|
||||
# global netdata configuration
|
||||
[global]
|
||||
run as user = netdata
|
||||
|
||||
memory mode = ram
|
||||
|
||||
# the default database size - 1 hour
|
||||
history = 3600
|
||||
|
||||
# some defaults to run netdata with least priority
|
||||
process scheduling policy = idle
|
||||
OOM score = 1000
|
||||
|
||||
stock config directory = /etc/netdata/conf.d
|
||||
|
||||
[web]
|
||||
web files owner = root
|
||||
web files group = netdata
|
||||
|
||||
# by default do not expose the netdata port
|
||||
bind to = 0.0.0.0
|
||||
|
||||
[health]
|
||||
stock health configuration directory = /etc/netdata/conf.d/health.d
|
72
roles/netdata/templates/nvidia_smi.conf.j2
Normal file
72
roles/netdata/templates/nvidia_smi.conf.j2
Normal file
|
@ -0,0 +1,72 @@
|
|||
# netdata python.d.plugin configuration for nvidia_smi
|
||||
#
|
||||
# This file is in YaML format. Generally the format is:
|
||||
#
|
||||
# name: value
|
||||
#
|
||||
# There are 2 sections:
|
||||
# - global variables
|
||||
# - one or more JOBS
|
||||
#
|
||||
# JOBS allow you to collect values from multiple sources.
|
||||
# Each source will have its own set of charts.
|
||||
#
|
||||
# JOB parameters have to be indented (using spaces only, example below).
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Global Variables
|
||||
# These variables set the defaults for all JOBs, however each JOB
|
||||
# may define its own, overriding the defaults.
|
||||
|
||||
# update_every sets the default data collection frequency.
|
||||
# If unset, the python.d.plugin default is used.
|
||||
# update_every: 1
|
||||
|
||||
# priority controls the order of charts at the netdata dashboard.
|
||||
# Lower numbers move the charts towards the top of the page.
|
||||
# If unset, the default for python.d.plugin is used.
|
||||
# priority: 60000
|
||||
|
||||
# penalty indicates whether to apply penalty to update_every in case of failures.
|
||||
# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
|
||||
# penalty: yes
|
||||
|
||||
# autodetection_retry sets the job re-check interval in seconds.
|
||||
# The job is not deleted if check fails.
|
||||
# Attempts to start the job are made once every autodetection_retry.
|
||||
# This feature is disabled by default.
|
||||
# autodetection_retry: 0
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# JOBS (data collection sources)
|
||||
#
|
||||
# The default JOBS share the same *name*. JOBS with the same name
|
||||
# are mutually exclusive. Only one of them will be allowed running at
|
||||
# any time. This allows autodetection to try several alternatives and
|
||||
# pick the one that works.
|
||||
#
|
||||
# Any number of jobs is supported.
|
||||
#
|
||||
# All python.d.plugin JOBS (for all its modules) support a set of
|
||||
# predefined parameters. These are:
|
||||
#
|
||||
# job_name:
|
||||
# name: myname # the JOB's name as it will appear at the
|
||||
# # dashboard (by default is the job_name)
|
||||
# # JOBs sharing a name are mutually exclusive
|
||||
# update_every: 1 # the JOB's data collection frequency
|
||||
# priority: 60000 # the JOB's order on the dashboard
|
||||
# penalty: yes # the JOB's penalty
|
||||
# autodetection_retry: 0 # the JOB's re-check interval in seconds
|
||||
#
|
||||
# Additionally to the above, example also supports the following:
|
||||
#
|
||||
# loop_mode: yes/no # default is yes. If set to yes `nvidia-smi` is executed in a separate thread using `-l` option.
|
||||
# poll_seconds: SECONDS # default is 1. Sets the frequency of seconds the nvidia-smi tool is polled in loop mode.
|
||||
# exclude_zero_memory_users: yes/no # default is no. Whether to collect users metrics with 0Mb memory allocation.
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
update_every : 5
|
||||
loop_mode : yes
|
||||
poll_seconds : 5
|
||||
exclude_zero_memory_users : yes
|
112
roles/netdata/templates/python.d.conf.j2
Normal file
112
roles/netdata/templates/python.d.conf.j2
Normal file
|
@ -0,0 +1,112 @@
|
|||
# netdata python.d.plugin configuration
|
||||
#
|
||||
# This file is in YaML format.
|
||||
# Generally the format is:
|
||||
#
|
||||
# name: value
|
||||
#
|
||||
|
||||
# Enable / disable the whole python.d.plugin (all its modules)
|
||||
enabled: yes
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Enable / Disable python.d.plugin modules
|
||||
#default_run: yes
|
||||
#
|
||||
# If "default_run" = "yes" the default for all modules is enabled (yes).
|
||||
# Setting any of these to "no" will disable it.
|
||||
#
|
||||
# If "default_run" = "no" the default for all modules is disabled (no).
|
||||
# Setting any of these to "yes" will enable it.
|
||||
|
||||
# Enable / Disable explicit garbage collection (full collection run). Default is enabled.
|
||||
gc_run: yes
|
||||
|
||||
# Garbage collection interval in seconds. Default is 300.
|
||||
gc_interval: 300
|
||||
|
||||
# apache: yes
|
||||
|
||||
# apache_cache has been replaced by web_log
|
||||
# adaptec_raid: yes
|
||||
# alarms: yes
|
||||
# am2320: yes
|
||||
# anomalies: no
|
||||
apache_cache: no
|
||||
# beanstalk: yes
|
||||
# bind_rndc: yes
|
||||
# boinc: yes
|
||||
# ceph: yes
|
||||
chrony: no
|
||||
# changefinder: no
|
||||
# couchdb: yes
|
||||
# dns_query_time: yes
|
||||
# dnsdist: yes
|
||||
# dockerd: yes
|
||||
# dovecot: yes
|
||||
# elasticsearch: yes
|
||||
# energid: yes
|
||||
|
||||
# this is just an example
|
||||
example: no
|
||||
|
||||
# exim: yes
|
||||
# fail2ban: yes
|
||||
# freeradius: yes
|
||||
# gearman: yes
|
||||
go_expvar: no
|
||||
|
||||
# gunicorn_log has been replaced by web_log
|
||||
gunicorn_log: no
|
||||
# haproxy: yes
|
||||
# hddtemp: yes
|
||||
# httpcheck: yes
|
||||
hpssa: no
|
||||
# icecast: yes
|
||||
# ipfs: yes
|
||||
# isc_dhcpd: yes
|
||||
# litespeed: yes
|
||||
logind: no
|
||||
# megacli: yes
|
||||
# memcached: yes
|
||||
# mongodb: yes
|
||||
# monit: yes
|
||||
# mysql: yes
|
||||
# nginx: yes
|
||||
# nginx_plus: yes
|
||||
{% if has_gpu %}
|
||||
nvidia_smi: yes
|
||||
{% endif %}
|
||||
# nginx_log has been replaced by web_log
|
||||
nginx_log: no
|
||||
# nsd: yes
|
||||
# ntpd: yes
|
||||
# openldap: yes
|
||||
# oracledb: yes
|
||||
# ovpn_status_log: yes
|
||||
# phpfpm: yes
|
||||
# portcheck: yes
|
||||
# postfix: yes
|
||||
# postgres: yes
|
||||
# powerdns: yes
|
||||
# proxysql: yes
|
||||
# puppet: yes
|
||||
# rabbitmq: yes
|
||||
# redis: yes
|
||||
# rethinkdbs: yes
|
||||
# retroshare: yes
|
||||
# riakkv: yes
|
||||
# samba: yes
|
||||
sensors: yes
|
||||
# smartd_log: yes
|
||||
# spigotmc: yes
|
||||
# springboot: yes
|
||||
# squid: yes
|
||||
# traefik: yes
|
||||
# tomcat: yes
|
||||
# tor: yes
|
||||
# uwsgi: yes
|
||||
# varnish: yes
|
||||
# w1sensor: yes
|
||||
# web_log: yes
|
||||
# zscores: no
|
Loading…
Add table
Add a link
Reference in a new issue