]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Merge branch 'dev'
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 25 Jul 2018 18:06:46 +0000 (20:06 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 25 Jul 2018 18:06:46 +0000 (20:06 +0200)
modules/profile/manifests/monitoring/services.pp
modules/role/templates/cryptoportfolio/bot_config.ini.erb

index 95c6efba8bfb2ff026d4a3898e58267a9dc034e0..0ecc135ebbab8b31418545667fbc78fe96c7fd02 100644 (file)
@@ -1,5 +1,15 @@
 class profile::monitoring::services {
 
+  $warn_1_load  = 1.5*$facts["processorcount"]
+  $warn_5_load  = $facts["processorcount"]
+  $warn_15_load = $facts["processorcount"]
+  $warn_load = join([$warn_1_load, $warn_5_load, $warn_15_load], ",")
+
+  $max_1_load  = 2*$facts["processorcount"]
+  $max_5_load  = $facts["processorcount"]
+  $max_15_load = $facts["processorcount"]
+  $max_load = join([$max_1_load, $max_5_load, $max_15_load], ",")
+
   profile::monitoring::local_service {
     "Size on root partition":
       local => {
@@ -11,7 +21,7 @@ class profile::monitoring::services {
       };
     "Average load":
       local => {
-        check_command => "check_local_load!8.0,8.0,8.0!10.0,10.0,10.0",
+        check_command => "check_local_load!$warn_load!$max_load",
       };
     "Swap usage":
       local => {
index 705b38dab792ea93aa634aba7b17daba416f3cbd..96283973b581b380410bcc404ac5282496d895d4 100644 (file)
@@ -5,6 +5,9 @@ db-user = <%= @pg_user %>
 db-password = <%= @pg_password %>
 db-database = <%= @pg_db %>
 
+[redis]
+redis-host = <%= @redis_host %>
+
 [app]
 report-path = <%= @cf_bot_app_reports %>
 quiet = True