mirror of
https://gitea.invidious.io/iv-org/infrastructure.git
synced 2024-08-15 00:53:31 +00:00
Add metrics
This commit is contained in:
parent
274df1b73a
commit
bc603de866
5 changed files with 73 additions and 7 deletions
|
@ -1,8 +1,13 @@
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
30613534346431333631646634333061336363386330343564323661356666663233656137343132
|
39303330616163326665373337326635386164616335626366333638653464303532643530333762
|
||||||
3034323166623230643138663761386234393537626262300a373139366231623230343361353937
|
6636626430613433623534373263633663303431316339640a613930623530623336373663323038
|
||||||
37663037323733623561356130373834396136336433636338646635666330666437323564636537
|
34666363393733363736323166343138656364373439366332623930633635616631386533306533
|
||||||
3731636465626463300a613263333138613230346639646337313332366262613630643164666431
|
3666663833353931360a636163646163363661666330633636353532323333386432633037653131
|
||||||
34636632643161383436326338646366323031363237343965336633343131353165613961653063
|
65343530643931303834633961633934613037396336646439663163326635656238623936343165
|
||||||
65316162613535353432613962353535333631326166383035366532366564653435613835356634
|
66386165653839323231333761343663613965326538303032363935643433306366643763393665
|
||||||
396466653535653563393632313736613735
|
30333033626162356564393439643866356266393362643664646365373535613764366130346438
|
||||||
|
33313330613163623339386130653032333962343235653135653431376165656163336531663162
|
||||||
|
61653763663162663933373236326365343365653233643830613237626639316666386530386434
|
||||||
|
33633136393637343863306261396334333533643233633236353531663066613637653236316632
|
||||||
|
31333435333835346364663638656266643230303163656362336566653638633361373532653834
|
||||||
|
34396162656135333337
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
ansible_user: root
|
ansible_user: root
|
||||||
ansible_port: 233
|
ansible_port: 233
|
||||||
|
@ -11,6 +12,7 @@ apt_packages:
|
||||||
- net-tools
|
- net-tools
|
||||||
- python3-setuptools
|
- python3-setuptools
|
||||||
- jq
|
- jq
|
||||||
|
- prometheus-node-exporter
|
||||||
|
|
||||||
pip_install_packages:
|
pip_install_packages:
|
||||||
- name: docker
|
- name: docker
|
||||||
|
|
36
host_vars/invidious.io/main.yml
Normal file
36
host_vars/invidious.io/main.yml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
---
|
||||||
|
prometheus_web_listen_address: "127.0.0.1:9090"
|
||||||
|
prometheus_scrape_configs:
|
||||||
|
- job_name: "prometheus"
|
||||||
|
static_configs:
|
||||||
|
- targets: ['localhost:9090']
|
||||||
|
- job_name: "node"
|
||||||
|
static_configs:
|
||||||
|
- targets: ['localhost:9100']
|
||||||
|
- job_name: "caddy"
|
||||||
|
static_configs:
|
||||||
|
- targets: ['127.0.0.1:2019']
|
||||||
|
|
||||||
|
grafana_url: "https://grafana.invidious.io"
|
||||||
|
grafana_domain: grafana.invidious.io
|
||||||
|
grafana_address: 127.0.0.1
|
||||||
|
grafana_port: 2000
|
||||||
|
grafana_security:
|
||||||
|
admin_user: admin
|
||||||
|
admin_password: "{{ vault_grafana_admin_password }}"
|
||||||
|
disable_gravatar: true
|
||||||
|
cookie_secure: true
|
||||||
|
grafana_auth:
|
||||||
|
anonymous:
|
||||||
|
enabled: true
|
||||||
|
grafana_datasources:
|
||||||
|
- name: Prometheus
|
||||||
|
type: prometheus
|
||||||
|
url: http://localhost:9090
|
||||||
|
grafana_dashboards:
|
||||||
|
- dashboard_id: '1860'
|
||||||
|
revision_id: '22'
|
||||||
|
datasource: 'Prometheus'
|
||||||
|
- dashboard_id: '13460'
|
||||||
|
revision_id: '2'
|
||||||
|
datasource: 'Prometheus'
|
17
main.yml
17
main.yml
|
@ -27,11 +27,28 @@
|
||||||
name: "{{ apt_packages }}"
|
name: "{{ apt_packages }}"
|
||||||
tags: [apt,base]
|
tags: [apt,base]
|
||||||
|
|
||||||
|
- name: Bind node exporter to localhost
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/default/prometheus-node-exporter
|
||||||
|
regexp: '^ARGS='
|
||||||
|
line: ARGS=--web.listen-address=localhost:9100
|
||||||
|
tags: [apt,base]
|
||||||
|
|
||||||
- name: unattended-upgrades
|
- name: unattended-upgrades
|
||||||
import_role:
|
import_role:
|
||||||
name: jvn.unattended-upgrades
|
name: jvn.unattended-upgrades
|
||||||
tags: [unattended-upgrades]
|
tags: [unattended-upgrades]
|
||||||
|
|
||||||
|
- name: prometheus
|
||||||
|
import_role:
|
||||||
|
name: cloudalchemy.prometheus
|
||||||
|
tags: [prometheus]
|
||||||
|
|
||||||
|
- name: grafana
|
||||||
|
import_role:
|
||||||
|
name: cloudalchemy.grafana
|
||||||
|
tags: [grafana]
|
||||||
|
|
||||||
- name: pip
|
- name: pip
|
||||||
import_role:
|
import_role:
|
||||||
name: geerlingguy.pip
|
name: geerlingguy.pip
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
body "User-agent: *
|
body "User-agent: *
|
||||||
Disallow: /
|
Disallow: /
|
||||||
"
|
"
|
||||||
|
}
|
||||||
log {
|
log {
|
||||||
output file /var/log/caddy/access.log {
|
output file /var/log/caddy/access.log {
|
||||||
roll_size 500mb
|
roll_size 500mb
|
||||||
|
@ -68,3 +69,8 @@ docs.invidious.io {
|
||||||
import common
|
import common
|
||||||
reverse_proxy http://127.0.0.1:3001
|
reverse_proxy http://127.0.0.1:3001
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grafana.invidious.io {
|
||||||
|
import common
|
||||||
|
reverse_proxy http://127.0.0.1:2000
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue