Skip to content

Commit

Permalink
persist a few experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasberens committed Aug 25, 2024
1 parent ec1bc6e commit 9cd4430
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion roles/ff_monitor/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
name: remove old rrd files
special_time: daily
user: root
job: find /mnt/collectd/rrd/ -type f -mtime +14 -delete; find /mnt/collectd/rrd/ -type d -empty -delete
job: find /mnt/collectd/rrd/ -type f -mtime +30 -delete; find /mnt/collectd/rrd/ -type d -empty -delete

- name: Create a directory if it does not exist
ansible.builtin.file:
Expand Down
6 changes: 6 additions & 0 deletions roles/ff_monitor/templates/grafana.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ router_logging = false
[analytics]
reporting_enabled = false
check_for_updates = false
enabled = false
[security]
disable_gravatar = true
[users]
Expand Down Expand Up @@ -97,8 +98,13 @@ enabled = true

[plugins]
allow_loading_unsigned_plugins = panodata-map-panel
hide_angular_deprecation = true

[feature_toggles]
angularDeprecationUI=false
publicDashboards = true
[unified_alerting]
enabled = true

[panels]
enable_alpha = true
2 changes: 1 addition & 1 deletion roles/ff_monitor/templates/prometheus.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# {{ ansible_managed }}
# Set the command-line arguments to pass to the server.

ARGS="--storage.tsdb.retention.size=90GB --enable-feature=memory-snapshot-on-shutdown --web.listen-address=127.0.0.1:9090"
ARGS="--storage.tsdb.retention.size=100GB --enable-feature=memory-snapshot-on-shutdown --web.listen-address=127.0.0.1:9090"
15 changes: 15 additions & 0 deletions roles/ff_monitor/templates/prometheus.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ alerting:
- targets: ['localhost:9093']

rule_files:
- rules.yml

scrape_configs:

Expand All @@ -25,6 +26,13 @@ scrape_configs:
static_configs:
- targets: ['localhost:9090']

- job_name: 'pushgateway'
scrape_interval: 30s
scrape_timeout: 30s
honor_labels: true
static_configs:
- targets: ['localhost:9091']

- job_name: collectd
scrape_interval: 30s
static_configs:
Expand All @@ -38,6 +46,13 @@ scrape_configs:
- job_name: servers
static_configs:
- targets:
- "a36s-hyp03.berlin.freifunk.net:9100"
{% for host in groups.all %}
- "{{ host }}:9100"
{% endfor %}

- job_name: 'weather'
scrape_interval: 900s
scrape_timeout: 30s
static_configs:
- targets: ['127.0.0.1:9111']
12 changes: 10 additions & 2 deletions templates/Caddyfile_monitor.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@ monitor.berlin.freifunk.net {
}




# Pushgw
http://10.31.130.151:9091 {
bind 10.31.130.151
# @delete-get { # TODO Fix
# return 418
# }
# @put-post {
reverse_proxy http://127.0.0.1:9091
# }
}

0 comments on commit 9cd4430

Please sign in to comment.