This commit is contained in:
parent
1a886ad9d4
commit
f7ffff3b8d
@ -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:
|
||||
|
@ -7,4 +7,5 @@
|
||||
- include_tasks: user-ops.yaml
|
||||
- include_tasks: ssh-security-settings.yaml
|
||||
- include_tasks: timesync.yaml
|
||||
- include_tasks: node-exporter.yaml
|
||||
...
|
||||
|
15
roles/common/tasks/node-exporter.yaml
Normal file
15
roles/common/tasks/node-exporter.yaml
Normal 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
|
||||
...
|
@ -1,3 +1,5 @@
|
||||
{
|
||||
"userland-proxy": false
|
||||
"userland-proxy": false,
|
||||
"metrics-addr" : "0.0.0.0:9323",
|
||||
"experimental" : true
|
||||
}
|
@ -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
|
||||
...
|
||||
|
@ -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
|
||||
...
|
||||
|
@ -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
|
||||
...
|
||||
|
@ -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
|
||||
...
|
||||
|
@ -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
|
||||
...
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user