diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-14 18:13:43 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-14 18:59:03 +0200 |
commit | b5d92dc40627e96fd81ade2744d1576cf7671eb8 (patch) | |
tree | 5a45a0ccda67f463bd79c36d856c829221ab6dd4 /modules/profile | |
parent | 220496056eb730f204f9d21d61d10d41d876c5a1 (diff) | |
download | Puppet-b5d92dc40627e96fd81ade2744d1576cf7671eb8.tar.gz Puppet-b5d92dc40627e96fd81ade2744d1576cf7671eb8.tar.zst Puppet-b5d92dc40627e96fd81ade2744d1576cf7671eb8.zip |
Fix monitoring load average
Diffstat (limited to 'modules/profile')
-rw-r--r-- | modules/profile/manifests/monitoring/services.pp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/profile/manifests/monitoring/services.pp b/modules/profile/manifests/monitoring/services.pp index 95c6efb..0ecc135 100644 --- a/modules/profile/manifests/monitoring/services.pp +++ b/modules/profile/manifests/monitoring/services.pp | |||
@@ -1,5 +1,15 @@ | |||
1 | class profile::monitoring::services { | 1 | class profile::monitoring::services { |
2 | 2 | ||
3 | $warn_1_load = 1.5*$facts["processorcount"] | ||
4 | $warn_5_load = $facts["processorcount"] | ||
5 | $warn_15_load = $facts["processorcount"] | ||
6 | $warn_load = join([$warn_1_load, $warn_5_load, $warn_15_load], ",") | ||
7 | |||
8 | $max_1_load = 2*$facts["processorcount"] | ||
9 | $max_5_load = $facts["processorcount"] | ||
10 | $max_15_load = $facts["processorcount"] | ||
11 | $max_load = join([$max_1_load, $max_5_load, $max_15_load], ",") | ||
12 | |||
3 | profile::monitoring::local_service { | 13 | profile::monitoring::local_service { |
4 | "Size on root partition": | 14 | "Size on root partition": |
5 | local => { | 15 | local => { |
@@ -11,7 +21,7 @@ class profile::monitoring::services { | |||
11 | }; | 21 | }; |
12 | "Average load": | 22 | "Average load": |
13 | local => { | 23 | local => { |
14 | check_command => "check_local_load!8.0,8.0,8.0!10.0,10.0,10.0", | 24 | check_command => "check_local_load!$warn_load!$max_load", |
15 | }; | 25 | }; |
16 | "Swap usage": | 26 | "Swap usage": |
17 | local => { | 27 | local => { |