Grafana work.

This commit is contained in:
Hyperling 2021-03-20 06:12:04 -05:00
parent 366c4635d6
commit 7b8ec929db
5 changed files with 11 additions and 5 deletions

2
hosts
View File

@ -44,4 +44,4 @@ x570 amdgpu=true nanominer=true nanominer_gpu=eth nanominer_gpus=0 nanominer_gpu
; Example: true
;
office domain=hyperling.com onlyoffice=true
grafana domain=hyperling.com grafana=true influxdb1=true
grafana domain=hyperling.com grafana=true influxdb1=true telegraf=true

View File

@ -1,5 +1,6 @@
---
# Install everything needed for a Grafana subsite.
# https://grafana.com/docs/grafana/latest/getting-started/getting-started/
## Pre-reqs ##
@ -16,8 +17,8 @@
- name: Server | Grafana | Install | Add Repo
shell: '{{ item }}'
loop:
- wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
- echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
- wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
- echo "deb https://packages.grafana.com/oss/deb stable main" | tee /etc/apt/sources.list.d/grafana.list
- apt update
- name: Server | Grafana | Install | Main

View File

@ -1,5 +1,6 @@
---
# InfluxDB 1.* to be used with Grafana.
# https://docs.influxdata.com/influxdb/v1.8/introduction/get-started/
- name: Server | InfluxDB | Check
shell: which influxd
@ -23,4 +24,5 @@
loop:
- influx -execute "create database main"
- influx -execute "show databases"
- influx -database main -execute "INSERT cpu,host=success,region=test value=1.00"
- influx -database main -execute "INSERT cpu,host=success,region=test value=1.00"
when: influxdb_check.failed

View File

@ -1,5 +1,6 @@
---
# Create an Influx2.0 DB. Have not successfully used in Grafana yet.
@ https://docs.influxdata.com/influxdb/v2.0/get-started/?t=Linux
- name: Server | InfluxDB | Check
shell: which influxd

View File

@ -15,4 +15,6 @@
- wget https://dl.influxdata.com/telegraf/releases/telegraf_1.17.3-1_amd64.deb
- dpkg -i telegraf_1.17.3-1_amd64.deb
- service telegraf start
when: telegraf_check.failed
when: telegraf_check.failed
# TODO: Add cron job(s)