mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2024-06-09 00:16:11 +02:00
Add prometheus-memcached-exporter
Extend the memcached service for the AUR to allow the memcached group to read the socket to obtain statistics.
This commit is contained in:
parent
b25f11123f
commit
68b9fbb8bb
|
@ -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'
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
filesystem: btrfs
|
||||
memcached_socket: "/var/run/aurweb.sock"
|
||||
|
||||
zabbix_agent_templates:
|
||||
- Template OS Linux
|
||||
- Template App Borg Backup
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
filesystem: btrfs
|
||||
memcached_socket: "/var/run/aurweb.sock"
|
||||
|
||||
zabbix_agent_templates:
|
||||
- Template OS Linux
|
||||
- Template App Borg Backup
|
||||
|
|
2
hosts
2
hosts
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue