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" - port: "https"
proto: tcp proto: tcp
interface: "eth1" interface: "eth1"
- port: "ssh"
proto: tcp
interface: "eth1"
- port: "59000:59049" - port: "59000:59049"
proto: udp proto: udp
interface: "eth1" interface: "eth1"
- port: "9100"
proto: tcp
interface: "eth0"
- port: "9101"
proto: tcp
interface: "eth0"
- port: "9706"
proto: tcp
interface: "eth0"
netplan: netplan:
default_gateway: "" default_gateway: ""
additionalinterfaces: additionalinterfaces:

View File

@ -7,4 +7,5 @@
- include_tasks: user-ops.yaml - include_tasks: user-ops.yaml
- include_tasks: ssh-security-settings.yaml - include_tasks: ssh-security-settings.yaml
- include_tasks: timesync.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 comment: Service user
groups: docker groups: docker
append: yes 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 name: postfix
state: restarted state: restarted
enabled: yes 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: community.general.ufw:
state: enabled state: enabled
- name: Copy datadog repo config - name: "Install haproxy exporter"
copy:
src: datadog.list
dest: /etc/apt/sources.list.d/datadog.list
mode: 0655
owner: root
group: root
- name: "Install datadog-agent"
apt: apt:
update_cache: yes update_cache: yes
state: present state: present
name: name:
- datadog-agent - prometheus-haproxy-exporter
- name: "Generate datadog configuration"
ansible.builtin.template:
src: datadog.yaml
dest: /etc/datadog-agent/datadog.yaml
owner: dd-agent
group: dd-agent
mode: '0640'
... ...

View File

@ -24,4 +24,18 @@
community.general.ufw: community.general.ufw:
rule: allow rule: allow
port: smtp 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" path: "{{ item.directory }}/.git"
state: absent state: absent
with_items: "{{ static }}" 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 name: nginx
state: reloaded 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 - name: Allow https port via ufw
community.general.ufw: community.general.ufw:
rule: allow rule: allow