X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=a%2Fsite.yml;h=f9c14b6f733ea97cdc351561028312eceb48ddea;hb=HEAD;hp=b9a02761b7930cd9b0d4c1dff81a3751388019c9;hpb=d4366929e6e200155b010dc05ce74255ee6a45ed;p=distro-setup diff --git a/a/site.yml b/a/site.yml deleted file mode 100644 index b9a0276..0000000 --- a/a/site.yml +++ /dev/null @@ -1,84 +0,0 @@ ---- -- hosts: localhost - roles: - - role: prom - tags: a - prometheus_targets: - node: - - targets: - - "{{ ansible_fqdn }}:9100" - prometheus_scrape_configs: - - job_name: "prometheus" - metrics_path: "{{ prometheus_metrics_path }}" - static_configs: - - targets: - - "{{ ansible_fqdn }}:9090" - - job_name: "node" - basic_auth: - username: prom - password_file: /etc/prometheus-pass - #scheme: "https" - file_sd_configs: - - files: - - "{{ prometheus_config_dir }}/file_sd/node.yml" - # added because of warning in log - prometheus_alertmanager_config: - - static_configs: - - targets: - - "{{ ansible_fqdn }}:9093" - - - - role: node-exporter - tags: a - # node_exporter_tls_server_config: - # cert_file: /etc/node_exporter/fullchain.pem - # key_file: /etc/node_exporter/privkey.pem - node_exporter_web_listen_address: "127.0.1.1:9100" - node_exporter_basic_auth_users: - prom: "incarnadine.bloodied.maker" - - - role: alertmanager - alertmanager_smtp: - smarthost: 'mx.iankelling.org:587' - from: "alerts@iankelling.org" - require_tls: false - hello: 'defaultnn.b8.nz' - alertmanager_route: - receiver: defaultreceiver - repeat_interval: 7d - alertmanager_receivers: - - name: defaultreceiver - email_configs: - - to: alerts@iankelling.org - send_resolved: true - # the html was a bit ugly and just a huge waste of text, - # https://github.com/prometheus/alertmanager/issues/2232 - # lead me to find a convenient text option to use - html: - text: '{% raw -%}{{ template "opsgenie.default.description" . }}{% endraw -%}' - alertmanager_web_listen_address: '127.0.1.1:9093' - - - role: grafana - grafana_address: "127.0.1.1" - # iank: playbook will halt if no password is set. this is only - # available to localhost, so i dont really care, but might as well - # generate a pass isntead of putting in pw123 etc. - grafana_security: { admin_user: admin, admin_password: spheroid.recantation.shank } - grafana_datasources: - - name: prometheus - type: prometheus - access: proxy - url: 'http://{{ prometheus_web_listen_address }}' - basicAuth: false - isDefault: true - # This is based on looking at highly downloaded dashboards here - # https://grafana.com/dashboards?dataSource=prometheus&collector=nodeExporter - # Which is where you are lead to from - # https://prometheus.io/docs/visualization/grafana/ - grafana_dashboards: - - dashboard_id: 1860 - revision_id: 21 - datasource: prometheus - - dashboard_id: 405 - revision_id: 8 - datasource: prometheus