Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It 4953 #95

Merged
merged 20 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ mod 'saz/sudo', '6.0.0'
mod 'puppetlabs-puppet_agent', '4.9.0'
mod 'saz/resolv_conf', '4.1.0'
mod 'puppet-cron', '3.0.0'
mod 'puppet/r10k', '8.0.0'
mod 'puppet/r10k', '10.3.0'
# mod 'camptocamp-systemd', '3.0.0'
mod 'puppet-systemd', '3.2.0'
mod 'bodgit/scl', '1.0.1'
mod 'theforeman/dhcp', '6.1.0'
mod 'theforeman/dns', '8.0.0'
mod 'puppet-archive', '6.0.2'
mod 'puppetlabs/concat', '6.0.0'
mod 'puppetlabs-inifile', '5.0.1'
mod 'puppetlabs-inifile', '5.2.0'
mod 'puppetlabs-java', '7.3.0'
mod 'puppetlabs-java_ks', '4.2.0'
mod 'puppetlabs-stdlib', '8.4.0'
mod 'puppetlabs/vcsrepo', '3.0.0'
mod 'puppetlabs-vcsrepo', '5.0.0'
mod 'puppet/ssh_keygen', '4.0.0'
mod 'puppetlabs-hocon', '1.1.0' # dependency
mod 'example42-network', '3.6.0'
Expand Down
3 changes: 0 additions & 3 deletions data/node/banshee.yaml

This file was deleted.

17 changes: 17 additions & 0 deletions data/node/puppetm-tuc-2.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
classes:
- profile::base_linux
- profile::puppet_master
profile::base_linux::graylog: true
profile::base_linux::postfix: true
network::interfaces_hash:
eth0:
type: Ethernet
ipaddress: 140.252.32.101
netmask: 255.255.254.0
gateway: 140.252.32.1
dns1: 140.252.32.125
dns2: 140.252.32.126
peerdns: yes
bootproto: none
onboot: yes
13 changes: 13 additions & 0 deletions data/site/po/role/foreman.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
r10k::version: '3.15.4'
r10k::mcollective: false
r10k::cachedir: "/var/cache/r10k"
r10k::sources:
private:
remote: "[email protected]:/lsst-it/pmo-puppet-private.git"
basedir: "/etc/puppetlabs/code/data/private"
invalid_branches: "correct"
control:
remote: "https://github.com/lsst-it/pmo-puppet"
basedir: "/etc/puppetlabs/code/environments"
invalid_branches: "correct"
36 changes: 36 additions & 0 deletions data/site/po/role/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ prometheus::alerts:
summary: Windows Server disk Space Usage (instance {{ $labels.instance }})
identifier: '{{ $labels.instance }}'
description: "Disk usage is more than 85%\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
# Windows memory usage
- alert: WindowsHighMemoryUsage
expr: ((windows_cs_physical_memory_bytes - windows_os_physical_memory_free_bytes) / (windows_cs_physical_memory_bytes)) * 100 > 80
for: 5m
labels:
severity: warning
annotations:
summary: "High memory usage on Windows server"
description: "Memory usage is above 80% on Windows server {{ $labels.instance }}"
# windows high CPU usage
- alert: windowsHostHighCpuLoad
expr: 100 - (avg by(instance) (rate(windows_cpu_time_total{mode="idle"}[2m])) * 100) > 80
for: 5m
labels:
severity: warning
annotations:
summary: Host high CPU load (instance {{ $labels.instance }})
description: "CPU load is > 80%\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"# Windows Defender Firewall service
# Windows Defender Firewall service
- alert: WindowsFirewallServiceStatus
expr: windows_service_state{name="mpssvc", state="running"} == 0
Expand Down Expand Up @@ -569,3 +587,21 @@ prometheus::alerts:
annotations:
summary: pingfederate.service down (instance {{ $labels.instance }})
description: "pingfederate.service service is down on {{ $labels.instance }}\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
# Linux memory usage
- alert: HighMemoryUsage
expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 20
for: 5m
labels:
severity: warning
annotations:
summary: "High memory usage on Windows server"
description: "Memory usage is above 80% on Linux server {{ $labels.instance }}"
# Linux high cpu usage
- alert: HostHighCpuLoad
expr: 100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[2m])) * 100) > 90
for: 5m
labels:
severity: warning
annotations:
summary: Host high CPU load (instance {{ $labels.instance }})
description: "CPU load is > 90%\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
5 changes: 5 additions & 0 deletions site/profile/manifests/puppet_master.pp
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# puppet master config
class profile::puppet_master {
include r10k
# The toml gem is required for grafana ldap.
package { 'toml':
ensure => present,
provider => 'puppetserver_gem',
}
package { 'hiera-eyaml':
ensure => '3.4.0',
provider => 'puppetserver_gem',
}
}