mirror of
https://github.com/davestephens/ansible-nas
synced 2024-11-15 08:27:19 +00:00
Lots of work on stats, including an awesome Ansible-NAS Grafana dashboard
This commit is contained in:
parent
c354802d71
commit
0a9ea0da86
4 changed files with 5337 additions and 13 deletions
5259
files/grafana/dashboards/ansible-nas/ansible-nas-overview.json
Normal file
5259
files/grafana/dashboards/ansible-nas/ansible-nas-overview.json
Normal file
File diff suppressed because it is too large
Load diff
24
files/grafana/provisioning/dashboards/ansible-nas.yml
Normal file
24
files/grafana/provisioning/dashboards/ansible-nas.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
# <string> an unique provider name
|
||||
- name: 'Ansible-NAS Dashboards'
|
||||
# <int> org id. will default to orgId 1 if not specified
|
||||
orgId: 1
|
||||
# <string, required> name of the dashboard folder. Required
|
||||
folder: 'Ansible-NAS'
|
||||
# <string> folder UID. will be automatically generated if not specified
|
||||
folderUid: ''
|
||||
# <string, required> provider type. Required
|
||||
type: file
|
||||
# <bool> disable dashboard deletion
|
||||
disableDeletion: false
|
||||
# <bool> enable dashboard editing
|
||||
editable: true
|
||||
# <int> how often Grafana will scan for changed dashboards
|
||||
updateIntervalSeconds: 60
|
||||
# <bool> allow updating provisioned dashboards from the UI
|
||||
allowUiUpdates: false
|
||||
options:
|
||||
# <string, required> path to dashboard files on disk. Required
|
||||
path: /var/lib/grafana/dashboards/ansible-nas
|
|
@ -16,9 +16,11 @@
|
|||
with_items:
|
||||
- "{{ grafana_data_directory }}"
|
||||
- "{{ grafana_data_directory }}/data"
|
||||
- "{{ grafana_data_directory }}/data/dashboards/ansible-nas"
|
||||
- "{{ grafana_data_directory }}/config/"
|
||||
- "{{ grafana_data_directory }}/config/provisioning"
|
||||
- "{{ grafana_data_directory }}/config/provisioning/datasources"
|
||||
- "{{ grafana_data_directory }}/config/provisioning/dashboards"
|
||||
|
||||
- name: InfluxDB
|
||||
docker_container:
|
||||
|
@ -34,6 +36,18 @@
|
|||
INFLUXDB_LOGGING_LEVEL: "error"
|
||||
memory: 1g
|
||||
|
||||
- name: hddtemp
|
||||
docker_container:
|
||||
name: hddtemp
|
||||
image: drewster727/hddtemp-docker
|
||||
pull: true
|
||||
privileged: true
|
||||
restart_policy: unless-stopped
|
||||
env:
|
||||
HDDTEMP_ARGS: "-q -d -F /dev/sd*"
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
memory: 128m
|
||||
|
||||
- name: Template telegraf.conf
|
||||
template:
|
||||
src: telegraf/telegraf.conf
|
||||
|
@ -44,9 +58,26 @@
|
|||
name: telegraf
|
||||
image: telegraf
|
||||
pull: true
|
||||
links:
|
||||
- hddtemp:hddtemp
|
||||
privileged: true
|
||||
ipc_mode: host
|
||||
volumes:
|
||||
- "{{ telegraf_data_directory }}/telegraf.conf:/etc/telegraf/telegraf.conf:ro"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
- "/:/hostfs:ro"
|
||||
- "/etc:/hostfs/etc:ro"
|
||||
- "/proc:/hostfs/proc:ro"
|
||||
- "/sys:/hostfs/sys:ro"
|
||||
- "/var:/hostfs/var:ro"
|
||||
- "/run:/hostfs/run:ro"
|
||||
env:
|
||||
HOST_ETC: "/hostfs/etc"
|
||||
HOST_PROC: "/hostfs/proc"
|
||||
HOST_SYS: "/hostfs/sys"
|
||||
HOST_VAR: "/hostfs/var"
|
||||
HOST_RUN: "/hostfs/run"
|
||||
HOST_MOUNT_PREFIX: "/hostfs"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
||||
|
@ -55,6 +86,16 @@
|
|||
src: grafana/provisioning/datasources/ansible-nas.yml
|
||||
dest: "{{ grafana_data_directory }}/config/provisioning/datasources/ansible-nas.yml"
|
||||
|
||||
- name: Copy Ansible-NAS Dashboard Provisioner
|
||||
copy:
|
||||
src: grafana/provisioning/dashboards/ansible-nas.yml
|
||||
dest: "{{ grafana_data_directory }}/config/provisioning/dashboards/ansible-nas.yml"
|
||||
|
||||
- name: Copy Ansible-NAS Dashboard
|
||||
copy:
|
||||
src: grafana/dashboards/ansible-nas/ansible-nas-overview.json
|
||||
dest: "{{ grafana_data_directory }}/data/dashboards/ansible-nas/ansible-nas-overview.json"
|
||||
|
||||
- name: Grafana
|
||||
docker_container:
|
||||
name: grafana
|
||||
|
|
|
@ -271,17 +271,17 @@
|
|||
# insecure_skip_verify = false
|
||||
|
||||
|
||||
# # Monitor disks' temperatures using hddtemp
|
||||
# [[inputs.hddtemp]]
|
||||
# ## By default, telegraf gathers temps data from all disks detected by the
|
||||
# ## hddtemp.
|
||||
# ##
|
||||
# ## Only collect temps from the selected disks.
|
||||
# ##
|
||||
# ## A * as the device name will return the temperature values of all disks.
|
||||
# ##
|
||||
# # address = "127.0.0.1:7634"
|
||||
# # devices = ["sda", "*"]
|
||||
# Monitor disks' temperatures using hddtemp
|
||||
[[inputs.hddtemp]]
|
||||
## By default, telegraf gathers temps data from all disks detected by the
|
||||
## hddtemp.
|
||||
##
|
||||
## Only collect temps from the selected disks.
|
||||
##
|
||||
## A * as the device name will return the temperature values of all disks.
|
||||
##
|
||||
address = "hddtemp:7634"
|
||||
devices = ["*"]
|
||||
|
||||
# Read metrics about network interface usage
|
||||
[[inputs.net]]
|
||||
|
@ -309,7 +309,7 @@
|
|||
# remove_numbers = true
|
||||
|
||||
|
||||
# # Read metrics from storage devices supporting S.M.A.R.T.
|
||||
# Read metrics from storage devices supporting S.M.A.R.T.
|
||||
# [[inputs.smart]]
|
||||
# ## Optionally specify the path to the smartctl executable
|
||||
# # path = "/usr/bin/smartctl"
|
||||
|
@ -418,5 +418,5 @@
|
|||
# kstatMetrics = ["abdstats", "arcstats", "dnodestats", "dbufcachestats",
|
||||
# "dmu_tx", "fm", "vdev_mirror_stats", "zfetchstats", "zil"]
|
||||
## By default, don't gather zpool stats
|
||||
# poolMetrics = false
|
||||
poolMetrics = true
|
||||
|
||||
|
|
Loading…
Reference in a new issue