Difference between revisions of "LCG-FR / SA1-FR Monitoring NagiosWithQuattor"

Un article de lcgwiki.
Jump to: navigation, search
 
Ligne 9: Ligne 9:
 
http://www.sysadmin.hep.ac.uk/rpms/grid-services/RPMS.monitoring/
 
http://www.sysadmin.hep.ac.uk/rpms/grid-services/RPMS.monitoring/
  
An example Nagios server template is included in the QWG distribution !A FAIRE! :
+
An example Nagios server template is included in the QWG distribution !A FAIRE! :
  
 
  object template profile_node58;
 
  object template profile_node58;
Ligne 21: Ligne 21:
 
  ############
 
  ############
 
  #Fonctionnalite UI utile pour nagios service grille
 
  #Fonctionnalite UI utile pour nagios service grille
variable VOS ?= list('grif','dteam');
+
  variable VOS ?= list('grif','dteam');
include { 'machine-types/ui' };
+
include { 'machine-types/ui' };
############
+
############
 
+
 
#include Nagios server
+
#include Nagios server
##############################
+
##############################
##What resources are monitored
+
##What resources are monitored
variable SITES = list('dapnia');
+
variable SITES = list('dapnia');
include { 'config/nodes_properties' };
+
include { 'config/nodes_properties' };
##############################
+
##############################
###Configuration, setting variables
+
###Configuration, setting variables
variable NAGIOS_NCG_CONFIG = true;
+
variable NAGIOS_NCG_CONFIG = true;
variable NAGIOS_NOTIFICATIONS_ENABLED = false;
+
variable NAGIOS_NOTIFICATIONS_ENABLED = false;
variable NAGIOS_NODES_PROPERTIES  = NODES_PROPS;
+
variable NAGIOS_NODES_PROPERTIES  = NODES_PROPS;
variable NAGIOS_DEFAULT_ADMIN_NAME = "dapnia";
+
variable NAGIOS_DEFAULT_ADMIN_NAME = "dapnia";
variable NAGIOS_IGNORED_NODES = list("node09.datagrid.cea.fr","node19.datagrid.cea.fr","node22.datagrid.cea.fr");
+
variable NAGIOS_IGNORED_NODES = list("node09.datagrid.cea.fr","node19.datagrid.cea.fr","node22.datagrid.cea.fr");
variable NAGIOS_MONITORED_HOSTGROUPS = list("WN","NFS","SEDPM","SE_DISK","SITE_BDII","MON","LFC","CE","CE-MPI","VOBOX","UI","WMS");
+
variable NAGIOS_MONITORED_HOSTGROUPS =  
variable NAGIOS_ADMIN_CONTACTS= nlist(
+
list("WN","NFS","SEDPM","SE_DISK","SITE_BDII","MON","LFC","CE","CE-MPI","VOBOX","UI","WMS");
#      "Fred"          ,"frederic.schaer@cea.fr",
+
variable NAGIOS_ADMIN_CONTACTS= nlist(
         "Christine"    ,"c.leroy@cea.fr",
+
        "tuto1"          ,"tuto1@org.fr",
#      "Pierrick"      ,"pierrick.micout@cea.fr"
+
         "tuto2"    ,"tuto2@org.fr",
        );
+
variable NAGIOS_HTPASSWD_LOGIN ?= "grif";
+
        );
variable NAGIOS_HTPASSWD_PASS  ?= 'LuK2o4bOG5h16';
+
  variable NAGIOS_HTPASSWD_LOGIN ?= "grif";
 
+
variable NAGIOS_HTPASSWD_PASS  ?= 'xxxxxx';
##############################
+
###Functions used to configure services and hosts
+
##############################
include { 'monitoring/nagios3/server/functions' };
+
###Functions used to configure services and hosts
 
+
include { 'monitoring/nagios3/server/functions' };
##############################
+
###Services configuration
+
##############################
variable TMP_SERVICE=nlist(
+
###Services configuration
    "use","                            generic-service",
+
variable TMP_SERVICE=nlist(
    "host_name","                      node07.datagrid.cea.fr",
+
    "use","                            generic-service",
    "service_description","            Workers ssh_known_hosts",
+
    "host_name","                      node07.datagrid.cea.fr",
    "contact_groups","                  admins",
+
    "service_description","            Workers ssh_known_hosts",
    "check_command","                  check_nrpe_long!check_ssh_known_hosts!60",
+
    "contact_groups","                  admins",
    "normal_check_interval","          60 ; check every hour",
+
    "check_command","                  check_nrpe_long!check_ssh_known_hosts!60",
    "max_check_attempts","              1",
+
    "normal_check_interval","          60 ; check every hour",
);
+
    "max_check_attempts","              1",
variable NAGIOS_SERVICES=nagios_add_service(TMP_SERVICE);
+
);
variable NAGIOS_USER_DEFINED_HOST_DEPENDENCIES=nagios_add_host_service_dependency("node07.datagrid.cea.fr","nrpe daemon","node07.datagrid.cea.fr","Workers ssh_known_hosts");
+
variable NAGIOS_SERVICES=nagios_add_service(TMP_SERVICE);
include { 'monitoring/nagios3/server/config' };
+
variable NAGIOS_USER_DEFINED_HOST_DEPENDENCIES=nagios_add_host_service_dependency\
 
+
("node07.datagrid.cea.fr","nrpe daemon","node07.datagrid.cea.fr","Workers ssh_known_hosts");
###
+
include { 'monitoring/nagios3/server/config' };
#
+
# software repositories (should be last)
+
###
#
+
#
include { 'rpms/siteupdates' };
+
# software repositories (should be last)
include { PKG_REPOSITORY_CONFIG };
+
#
 +
include { 'rpms/siteupdates' };
 +
include { PKG_REPOSITORY_CONFIG };
  
  

Version du 16:55, 19 janvier 2009

Installation de Nagios par Quattor

Nagios configuration requires both a set of client templates for commands to be run on clients by the Nagios Remote Plug-in Executor (NRPE) and a set of server templates configuring contacts for alarms, hosts to be monitored, services (AKA sensors) and so on.


Configuring the Nagios server

The configuration of a Nagios server is done in a set of standard templates, in the 'monitoring/nagios3' namespace. Sensors are provided for many of the plug-ins from the SA1 repository: http://www.sysadmin.hep.ac.uk/rpms/grid-services/RPMS.monitoring/

An example Nagios server template is included in the QWG distribution !A FAIRE! :

object template profile_node58;

include { 'rpms/kernelupdates' }; # this includes kernel updates, no matter the OS version
variable AII_KS_SRV = "192.54.208.182";
variable AII_ACK_SRV = AII_KS_SRV;
variable NFS_AUTOFS = true;
include { 'site/firewall/nagios_server' };

############
#Fonctionnalite UI utile pour nagios service grille
 variable VOS ?= list('grif','dteam');
include { 'machine-types/ui' };
############
 
#include Nagios server
##############################
##What resources are monitored
variable SITES = list('dapnia');
include { 'config/nodes_properties' };
##############################
###Configuration, setting variables
variable NAGIOS_NCG_CONFIG = true;
variable NAGIOS_NOTIFICATIONS_ENABLED = false;
variable NAGIOS_NODES_PROPERTIES   = NODES_PROPS;
variable NAGIOS_DEFAULT_ADMIN_NAME = "dapnia";
variable NAGIOS_IGNORED_NODES = list("node09.datagrid.cea.fr","node19.datagrid.cea.fr","node22.datagrid.cea.fr");
variable NAGIOS_MONITORED_HOSTGROUPS = 
list("WN","NFS","SEDPM","SE_DISK","SITE_BDII","MON","LFC","CE","CE-MPI","VOBOX","UI","WMS");
variable NAGIOS_ADMIN_CONTACTS= nlist(
       "tuto1"          ,"tuto1@org.fr",
       "tuto2"     ,"tuto2@org.fr",

        );
 variable NAGIOS_HTPASSWD_LOGIN ?= "grif";
variable NAGIOS_HTPASSWD_PASS  ?= 'xxxxxx';

##############################
###Functions used to configure services and hosts
include { 'monitoring/nagios3/server/functions' };

##############################
###Services configuration
variable TMP_SERVICE=nlist(
    "use","                             generic-service",
    "host_name","                       node07.datagrid.cea.fr",
    "service_description","             Workers ssh_known_hosts",
    "contact_groups","                  admins",
    "check_command","                   check_nrpe_long!check_ssh_known_hosts!60",
    "normal_check_interval","           60 ; check every hour",
    "max_check_attempts","              1",
);
variable NAGIOS_SERVICES=nagios_add_service(TMP_SERVICE);
variable NAGIOS_USER_DEFINED_HOST_DEPENDENCIES=nagios_add_host_service_dependency\
("node07.datagrid.cea.fr","nrpe  daemon","node07.datagrid.cea.fr","Workers ssh_known_hosts");
include { 'monitoring/nagios3/server/config' };

###
#
# software repositories (should be last)
#
include { 'rpms/siteupdates' };
include { PKG_REPOSITORY_CONFIG };


Who is Who

Installation des RPMs