add exporters
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Torma Kristóf 2022-05-29 15:15:02 +02:00
parent 1a886ad9d4
commit f7ffff3b8d
10 changed files with 93 additions and 22 deletions

View File

@ -10,12 +10,18 @@ firewall:
- port: "https"
proto: tcp
interface: "eth1"
- port: "ssh"
proto: tcp
interface: "eth1"
- port: "59000:59049"
proto: udp
interface: "eth1"
- port: "9100"
proto: tcp
interface: "eth0"
- port: "9101"
proto: tcp
interface: "eth0"
- port: "9706"
proto: tcp
interface: "eth0"
netplan:
default_gateway: ""
additionalinterfaces:

View File

@ -7,4 +7,5 @@
- include_tasks: user-ops.yaml
- include_tasks: ssh-security-settings.yaml
- include_tasks: timesync.yaml
- include_tasks: node-exporter.yaml
...

View File

@ -0,0 +1,15 @@
---
- name: "Install node exporter"
apt:
update_cache: yes
state: present
name:
- prometheus-node-exporter
- name: Allow node-exporter via ufw
community.general.ufw:
rule: allow
port: 9100
proto: tcp
src: 192.168.69.0/24
...

View File

@ -1,3 +1,5 @@
{
"userland-proxy": false
"userland-proxy": false,
"metrics-addr" : "0.0.0.0:9323",
"experimental" : true
}

View File

@ -27,4 +27,11 @@
comment: Service user
groups: docker
append: yes
- name: Allow docker exporter via ufw
community.general.ufw:
rule: allow
port: 9323
proto: tcp
src: 192.168.69.0/24
...

View File

@ -16,4 +16,18 @@
name: postfix
state: restarted
enabled: yes
- name: "Install postfix exporter"
apt:
update_cache: yes
state: present
name:
- prometheus-postfix-exporter
- name: Allow postfix exporter via ufw
community.general.ufw:
rule: allow
port: 9706
proto: tcp
src: 192.168.69.0/24
...

View File

@ -53,26 +53,10 @@
community.general.ufw:
state: enabled
- name: Copy datadog repo config
copy:
src: datadog.list
dest: /etc/apt/sources.list.d/datadog.list
mode: 0655
owner: root
group: root
- name: "Install datadog-agent"
- name: "Install haproxy exporter"
apt:
update_cache: yes
state: present
name:
- datadog-agent
- name: "Generate datadog configuration"
ansible.builtin.template:
src: datadog.yaml
dest: /etc/datadog-agent/datadog.yaml
owner: dd-agent
group: dd-agent
mode: '0640'
- prometheus-haproxy-exporter
...

View File

@ -24,4 +24,18 @@
community.general.ufw:
rule: allow
port: smtp
- name: "Install postfix exporter"
apt:
update_cache: yes
state: present
name:
- prometheus-postfix-exporter
- name: Allow postfix exporter via ufw
community.general.ufw:
rule: allow
port: 9706
proto: tcp
src: 192.168.69.0/24
...

View File

@ -129,4 +129,18 @@
path: "{{ item.directory }}/.git"
state: absent
with_items: "{{ static }}"
- name: "Install nginx exporter"
apt:
update_cache: yes
state: present
name:
- prometheus-nginx-exporter
- name: Allow nginx exporter via ufw
community.general.ufw:
rule: allow
port: 9113
proto: tcp
src: 192.168.69.0/24
...

View File

@ -33,6 +33,20 @@
name: nginx
state: reloaded
- name: "Install nginx exporter"
apt:
update_cache: yes
state: present
name:
- prometheus-nginx-exporter
- name: Allow nginx exporter via ufw
community.general.ufw:
rule: allow
port: 9113
proto: tcp
src: 192.168.69.0/24
- name: Allow https port via ufw
community.general.ufw:
rule: allow