This commit is contained in:
parent
1a886ad9d4
commit
f7ffff3b8d
@ -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:
|
||||||
|
@ -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
|
||||||
...
|
...
|
||||||
|
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
|
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
|
||||||
...
|
...
|
||||||
|
@ -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
|
||||||
...
|
...
|
||||||
|
@ -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'
|
|
||||||
...
|
...
|
||||||
|
@ -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
|
||||||
...
|
...
|
||||||
|
@ -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
|
||||||
...
|
...
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user