aboutsummaryrefslogblamecommitdiff
path: root/modules/profile/manifests/monitoring/services.pp
blob: 95c6efba8bfb2ff026d4a3898e58267a9dc034e0 (plain) (tree)
1
2
3
4
5
6
7
8
                                     
 
                                      
                             


                                                      
                              


                                                          
                   


                                                                       
                 


                                                  
                         



                                                                                          
                                                                                  
        
                                   









                                                                                                   
   

                                          
                                             
 
class profile::monitoring::services {

  profile::monitoring::local_service {
    "Size on root partition":
      local => {
        check_command => "check_local_disk!20%!10%!/",
      };
    "Total number of process":
      local => {
        check_command => "check_local_procs!50!100!RSZDT",
      };
    "Average load":
      local => {
        check_command => "check_local_load!8.0,8.0,8.0!10.0,10.0,10.0",
      };
    "Swap usage":
      local => {
        check_command => "check_local_swap!20!10",
      };
    "fail2ban is active":
      sudos   => {
        "naemon-fail2ban" => "naemon  ALL=(root) NOPASSWD: /usr/bin/fail2ban-client ping",
      },
      local   => {
        check_command => "check_command_output!fail2ban-client ping!pong!-r root",
      };
    "NTP is activated and working":
      local => {
        check_command => "check_ntp",
      };
    "No mdadm array is degraded":
      common => {
        ensure => (find_file("/proc/mdstat") == undef) ? { true => "absent", default =>"present" },
      },
      local => {
        check_command => "check_md_raid",
      };
  }

  Profile::Monitoring::Local_service <| |>
  Profile::Monitoring::External_service <| |>
}