Compare commits

..

No commits in common. "64721148d8494a61bebea6354b74f79792f630ff" and "5017cb5dfb3451d38a6531f3aca0926a51ccb238" have entirely different histories.

7 changed files with 2 additions and 41 deletions

View File

@ -54,13 +54,3 @@ groups:
annotations:
summary: Host out of inodes (instance {{ $labels.instance }})
description: "Disk is almost running out of available inodes (< 10% left)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- name: Network
rules:
- alert: PortChangedState
expr: changes(ifLastChange[2h]) != 0
labels:
severity: warning
annotations:
summary: A switch port changed it's state {{ $value }}x time
description: "For some reason a switch port changed it's state\n LABELS = {{ $labels }}"

View File

@ -6,6 +6,3 @@ pass on wg2 proto ospf
# allow prometheus on wg2
pass on wg2 proto tcp from any to self port 9100
# allow outgoing snmp on wg2
pass out on wg2 proto udp from self to any port snmp

Binary file not shown.

View File

@ -61,7 +61,6 @@
package:
name:
- prometheus
- snmp_exporter
- alertmanager
- grafana
@ -149,7 +148,6 @@
state: started
with_items:
- prometheus
- snmp_exporter
- alertmanager
- grafana

View File

@ -58,14 +58,6 @@ config rule
option dest_port 9100
option target ACCEPT
config rule
option name From-BACKBONE-Into-MGMT-Allow-SNMP
option src backbone
option dest mgmt
option proto udp
option dest_port 161
option target ACCEPT
config rule
option name From-Any-Allow-SSH
option src *

View File

@ -39,7 +39,8 @@ spanning-tree mst configuration
!
!
!
snmp community "public" ro
no snmp community "public"
snmp community "{{ lookup('passwordstore', 'snmp-community') }}" ro
!
!
ip ssh

View File

@ -36,23 +36,6 @@ scrape_configs:
{% endfor %}
- job_name: 'snmp'
static_configs:
- targets:
{% for host in groups['switches_stock'] %}
- {{ hostvars[host]['ip'] }}
{% endfor %}
metrics_path: /snmp
params:
module: [if_mib]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9116 # The SNMP exporter's real hostname:port.
- job_name: 'blackbox'
static_configs:
- targets: