Verified Commit 68b9fbb8 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

Add prometheus-memcached-exporter

Extend the memcached service for the AUR to allow the memcached group to
read the socket to obtain statistics.
parent b25f1112
Pipeline #1782 passed with stage
in 30 seconds
......@@ -13,3 +13,4 @@ maintenance_remote_machine: "{{ hostvars[inventory_hostname]['ansible_env'].SSH_
# prometheus-node-exporter port
prometheus_exporter_port: '9100'
prometheus_memcached_exporter_port: '9150'
---
filesystem: btrfs
memcached_socket: "/var/run/aurweb.sock"
zabbix_agent_templates:
- Template OS Linux
- Template App Borg Backup
......
---
filesystem: btrfs
memcached_socket: "/var/run/aurweb.sock"
zabbix_agent_templates:
- Template OS Linux
- Template App Borg Backup
......
......@@ -31,7 +31,6 @@ bbs.archlinux.org
homedir.archlinux.org
bugs.archlinux.org
aur.archlinux.org
aur-dev.archlinux.org
gitlab.archlinux.org
accounts.archlinux.org
gemini.archlinux.org
......@@ -84,7 +83,6 @@ repro3.pkgbuild.com
reproducible.archlinux.org
[memcached]
apollo.archlinux.org
aur.archlinux.org
aur-dev.archlinux.org
......
......@@ -5,7 +5,7 @@ After=network.target
[Service]
User={{ aurweb_user }}
Group=memcached
ExecStart=/usr/bin/memcached -s {{ aurweb_memcached_socket }} -m {{ aurweb_memcached_memory }} -o modern
ExecStart=/usr/bin/memcached -s {{ aurweb_memcached_socket }} -m {{ aurweb_memcached_memory }} -o modern -a 770
Restart=always
NoNewPrivileges=yes
PrivateTmp=yes
......
......@@ -61,6 +61,16 @@ scrape_configs:
labels:
instance: "aur.archlinux.org"
- job_name: 'memcached_exporter'
static_configs:
{% for host in groups['memcached'] %}
- targets: ['{{ host }}:{{ prometheus_memcached_exporter_port }}']
labels:
instance: "{{ host }}"
{% endfor %}
- job_name: 'blackbox'
metrics_path: /probe
scrape_interval: 15s
......
......@@ -44,6 +44,10 @@
systemd: name=prometheus-mysqld-exporter enabled=yes daemon_reload=yes state=started
when: "'mysql_servers' in group_names"
- name: copy prometheus memcached exporter configuration
template: src=prometheus-memcached-exporter.j2 dest=/etc/conf.d/prometheus-memcached-exporter owner=root group=root mode=600
when: "'memcached' in group_names"
- name: install node exporter configuration
template: src=prometheus-node-exporter.env.j2 dest=/etc/conf.d/prometheus-node-exporter owner=root group=root mode=600
......@@ -119,3 +123,8 @@
firewalld: state=enabled permanent=true immediate=yes
rich_rule="rule family=ipv4 source address={{ hostvars['monitoring.archlinux.org']['ipv4_address'] }} port protocol=tcp port={{ prometheus_mysqld_exporter_port }} accept"
when: "'mysql_servers' in group_names"
- name: open prometheus memcached exporter ipv4 port for monitoring.archlinux.org
firewalld: state=enabled permanent=true immediate=yes
rich_rule="rule family=ipv4 source address={{ hostvars['monitoring.archlinux.org']['ipv4_address'] }} port protocol=tcp port={{ prometheus_memcached_exporter_port }} accept"
when: "'memcached' in group_names"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment