<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lcg.in2p3.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fschaer</id>
	<title>lcgwiki - Contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://lcg.in2p3.fr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fschaer"/>
	<link rel="alternate" type="text/html" href="https://lcg.in2p3.fr/Special:Contributions/Fschaer"/>
	<updated>2026-04-24T17:26:26Z</updated>
	<subtitle>Contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://lcg.in2p3.fr/index.php?title=LCG-FR_/_SA1-FR_Monitoring_NagiosWithQuattor&amp;diff=5064</id>
		<title>LCG-FR / SA1-FR Monitoring NagiosWithQuattor</title>
		<link rel="alternate" type="text/html" href="https://lcg.in2p3.fr/index.php?title=LCG-FR_/_SA1-FR_Monitoring_NagiosWithQuattor&amp;diff=5064"/>
		<updated>2009-03-13T15:31:37Z</updated>

		<summary type="html">&lt;p&gt;Fschaer: /* 2 conditions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Nagios with quattor =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You can contact &#039;&#039;&#039;frederic.schaer__arobase char__cea.fr&#039;&#039;&#039; in case of problem.&lt;br /&gt;
 &lt;br /&gt;
== Configuring the Nagios server ==&lt;br /&gt;
&lt;br /&gt;
The configuration of a Nagios server is done in a set of standard templates, in the &#039;monitoring/nagios3&#039; namespace. &lt;br /&gt;
&lt;br /&gt;
=== Repository Used ===&lt;br /&gt;
&lt;br /&gt;
*Sensors are provided for some of the grid plugins from the SA1 repository: http://www.sysadmin.hep.ac.uk/rpms/grid-services/RPMS.monitoring/&lt;br /&gt;
&lt;br /&gt;
*RPMs for nagios and nagios-plugins (+dépendances) are compiled for each supported OS, and are put in the repository « updates » on quattorsrv.lal.in2p3.fr.&lt;br /&gt;
Ex. : http://quattor.web.lal.in2p3.fr/packages/os/sl440-i386/updates/&lt;br /&gt;
&lt;br /&gt;
*Plugins « nagios-grid-plugins » are in noarch RPM in the repository « nagios »&lt;br /&gt;
Ex. : http://quattor.web.lal.in2p3.fr/packages/nagios/&lt;br /&gt;
&lt;br /&gt;
see template : &#039;&#039;&#039;nagios3/plugins/config.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Server Template ===&lt;br /&gt;
&lt;br /&gt;
An example Nagios server template is here :&lt;br /&gt;
&lt;br /&gt;
https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/clusters/example-3.1/profiles/nagios3-server.example.org.tpl&lt;br /&gt;
&lt;br /&gt;
This machine should be a UI to monitor grid services.&lt;br /&gt;
 &lt;br /&gt;
=== Who is monitored, Client configuration ===&lt;br /&gt;
&lt;br /&gt;
==== 2 conditions ====&lt;br /&gt;
&lt;br /&gt;
*Hosts from site (&#039;&#039;&#039;variable SITES&#039;&#039;&#039;) and present in &#039;&#039;&#039;config/’sitename’_nodes_properties.tpl&#039;&#039;&#039; will be monitored&lt;br /&gt;
&lt;br /&gt;
Template example for hosts declaration are in LCGQWG:&lt;br /&gt;
https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/sites/example/site/config&lt;br /&gt;
&lt;br /&gt;
*AND host that has NAGIOS_CLIENT_ENABLED set to &amp;quot;true&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 variable NAGIOS_CLIENT_ENABLED ?= true;&lt;br /&gt;
 include { if(NAGIOS_CLIENT_ENABLED) &#039;monitoring/nagios3/client/config&#039;};&lt;br /&gt;
&lt;br /&gt;
If you want to set this variable to &amp;quot;true&amp;quot; for all your hosts you can put it in the following template: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;template site/pro_site_common_config&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;note : &amp;lt;/u&amp;gt; Please consider disabling client installation (by setting NAGIOS_CLIENT_ENABLED=false in the profiles) on nodes with unsupported OSes... otherwise you&#039;ll encounter quattor compilation errors.&lt;br /&gt;
&lt;br /&gt;
==== You can tune this with ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NAGIOS_IGNORED_NODES&#039;&#039;&#039; ,  &#039;&#039;&#039;NAGIOS_MONITORED_HOSTGROUPS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
see the profile: https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/clusters/example-3.1/profiles/nagios3-server.example.org.tpl&lt;br /&gt;
&lt;br /&gt;
==== Autorisation to contact NRPE ====&lt;br /&gt;
&lt;br /&gt;
You need to declare your nagios server in the variable  &#039;&#039;&#039;NAGIOS_SERVER&#039; so it is able to contact NRPE daemon on the clients&lt;br /&gt;
&lt;br /&gt;
=== What is monitored ===&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
Services are added in the template &#039;&#039;&#039;« server/cfgfiles/services.tpl »&#039;&#039;&#039; , &lt;br /&gt;
adding a service can be done like this :&lt;br /&gt;
&lt;br /&gt;
 variable TMP_SERVICE=nlist( &lt;br /&gt;
        &amp;quot;use&amp;quot;,&amp;quot;                             generic-service&amp;quot;, &lt;br /&gt;
        &amp;quot;host_name&amp;quot;,&amp;quot;                       node07.org.fr&amp;quot;, &lt;br /&gt;
      &amp;quot;service_description&amp;quot;,&amp;quot;             Workers ssh_known_hosts&amp;quot;, &lt;br /&gt;
      &amp;quot;contact_groups&amp;quot;,&amp;quot;                  admins&amp;quot;, &lt;br /&gt;
      &amp;quot;check_command&amp;quot;,&amp;quot;                   check_nrpe_long!check_ssh_known_hosts!60&amp;quot;, &lt;br /&gt;
      &amp;quot;normal_check_interval&amp;quot;,&amp;quot;           60 ; check every hour&amp;quot;, &lt;br /&gt;
      &amp;quot;max_check_attempts&amp;quot;,&amp;quot;              1&amp;quot;, &lt;br /&gt;
  ); &lt;br /&gt;
 variable NAGIOS_SERVICES=nagios_add_service(TMP_SERVICE);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the second parameter of the function &#039;&#039;&#039;nagios_add_service&#039;&#039;&#039;  is « true » , a dependency will be added on the NRPE daemon for all the nodes  « &amp;quot;*,!NOQUATTOR » for the service defined .... need to improve on this...&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add dependency on a services for a host, with a service from another host well defined:&lt;br /&gt;
&lt;br /&gt;
 variable NAGIOS_USER_DEFINED_HOST_DEPENDENCIES =	nagios_add_host_service_dependency(&lt;br /&gt;
 	&amp;quot;node07.datagrid.cea.fr&amp;quot;,&amp;quot;nrpe daemon&amp;quot;, &amp;quot;node07.datagrid.cea.fr&amp;quot;,&amp;quot;Workers ssh_known_hosts&amp;quot; &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
It&#039;s not possible to add dependency between hostgroups (for the moment ?)&lt;br /&gt;
&lt;br /&gt;
==== commands and NRPE ====&lt;br /&gt;
&lt;br /&gt;
Some Nagios configuration files don&#039;t need complex quattor structure template and so are created with &#039;&#039;&#039;filecopy&#039;&#039;&#039; :&lt;br /&gt;
&lt;br /&gt;
*adding commands is done in:&lt;br /&gt;
&#039;&#039;&#039;monitoring/nagios3/server/cfgfiles/commands&#039;&#039;&#039;&lt;br /&gt;
*adding NRPE commands is done in:&lt;br /&gt;
&#039;&#039;&#039;monitoring/nagios3/client/cfgfiles/nrpe_commands&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add dependency on the NRPE daemon for services wich are not defined on all the hosts(template &#039;&#039;&#039;services.tpl&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 variable NRPE_HOSTGROUPS_SPECIFIC_DEPENDENT_SERVICES=nlist(&lt;br /&gt;
         escape(&amp;quot;CE,CE-MPI,!NOQUATTOR&amp;quot;)  ,&amp;quot;black hole workers&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;CE,CE-MPI,LFC,SE_DPM,SE_DISK,MON,VOBOX,WMS,!NOQUATTOR&amp;quot;),&amp;quot;host certificate&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;MON&amp;quot;)                   ,&amp;quot;apel publisher&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;CE,CE-MPI&amp;quot;)                             ,&amp;quot;apel parser&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;WN,CE-MPI,UI,VOBOX&amp;quot;)    ,&amp;quot;home partition freespace&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;WN&amp;quot;)    ,&amp;quot;pbs_mom transfers&amp;quot;,&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
=== Proxy management ===&lt;br /&gt;
Need to have a valid certificate for local grid probe.&lt;br /&gt;
2 mechanisms are possible: Renewal and Retrieval.&lt;br /&gt;
In cfg/standard/monitoring/nagios3/server/config.tpl&lt;br /&gt;
 include { if(NAGIOS_NCG_CONFIG &amp;amp;&amp;amp; NAGIOS_MODE_PROXY_RENEW) &#039;monitoring/nagios3/server/vobox&#039;};&lt;br /&gt;
 include { if(NAGIOS_NCG_CONFIG &amp;amp;&amp;amp; NAGIOS_MODE_PROXY_RETRIEVE) &#039;monitoring/nagios3/server/proxy_retrieval&#039;};&lt;br /&gt;
&lt;br /&gt;
Les variables associées:&lt;br /&gt;
 {| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
NAGIOS_MODE_PROXY_RENEW&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. true if you want to use renewal mechanism&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_MODE_PROXY_RETRIEVE&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. true if you want to use retrieval mechanism&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_RENEW_PROXY&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. file where the proxy is renewed by the vobox mechanism renewal&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_OUTPUT_PROXY&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. file where the proxy should be retrieved by the retrieval cron proxy&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_MYPROXY_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. name of your proxy for later retrieval&lt;br /&gt;
|----&lt;br /&gt;
| &lt;br /&gt;
MYPROXY_SERVER&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. name of your myproxy server host&lt;br /&gt;
|----&lt;br /&gt;
| &lt;br /&gt;
NAGIOS_VONAME_PROXY&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. VO Used for voms authentication&lt;br /&gt;
|----&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Les variables ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
NAGIOS_RPM_VERSION ?= &amp;quot;3.0.5-1&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Nagios Server RPM version&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_NODES_PROPERTIES ?= nlist()&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
nlist. The site nodes properties. For instance : nlist( escape(&amp;quot;mynode.mydomain&amp;quot;), nlist(&amp;quot;type&amp;quot;,&amp;quot;NFS&amp;quot;, &amp;quot;monitoring&amp;quot;,&amp;quot;yes&amp;quot;, &amp;quot;os&amp;quot;,&amp;quot;undef&amp;quot;, &amp;quot;ip&amp;quot;,&amp;quot;192.68.0.1&amp;quot; , &amp;quot;hardware&amp;quot;,&amp;quot;undef&amp;quot;))&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HTPASSWD_LOGIN ?= &amp;quot;nagios&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Defines the user name allowed to access the nagios interface.&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HTPASSWD_PASS  ?= &amp;quot;i88QUu1o8Jwq.&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Defines the password associated with the user name. This is a md5 hash generated using the &amp;quot;openssl passwd&amp;quot; command. Default password is &amp;quot;nagios&amp;quot;.&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_MONITORED_HOSTGROUPS ?= NAGIOS_KNOWN_HOSTGROUPS&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
list. Defines the list of hostgroups you want to define in Nagios. If different from NAGIOS_KNOWN_HOSTGROUPS, each node that is of a &amp;quot;type&amp;quot; not listed will be added to the hostgroup NAGIOS_DEFAULT_NODE_GROUP. Please not that KNOWN hostgrouops will still be defined, for compatibility reasons (for now).&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_DEFAULT_NODE_GROUP?=&amp;quot;Others&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Nodes which type is not known will be put in this hostgroup&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SERVER ?= FULL_HOSTNAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Defines the NAGIOS_SERVER variable, which tells the clients which nagios host is going to poll the NRPE daemon. This *REALLY* should be set for all nodes, not only the server&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_DEFAULT_ADMIN_NAME ?=&amp;quot;nagiosadmin&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Default user name to use if none specified.&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_ADMIN_CONTACTS ?= error(&amp;quot;you need to define NAGIOS_ADMIN_CONTACTS with a nlist, containing names, associated with emails&amp;quot;)&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
nlist. Contains the names of people to be notified, with emails. ex. : nlist(&amp;quot;toto&amp;quot;                ,&amp;quot;me@localhost&amp;quot;,)&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_NOTIFICATIONS_ENABLED ?= true&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. Nagios wide variable to disable/enable notifications&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SYSINFO_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_system_information&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_CONFINFO_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_configuration_information&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SYSCOMMAND_USERS ?= NAGIOS_DEFAULT_ADMIN_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_system_commands&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SERVVIEW_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_services&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HOSTVIEW_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_hosts&lt;br /&gt;
 |----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SERVCOMMANDS_USERS ?= NAGIOS_DEFAULT_ADMIN_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_service_commands&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HOSTCOMMANDS_USERS ?= NAGIOS_DEFAULT_ADMIN_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_host_commands&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_IGNORED_NODES ?= list()&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
list. Defines a list of nodes that will be IGNORED when defining nagios hosts. This is usefull if you have nodes in the NODES_PROPERTIES that you do *NOT* want to monitor&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_NCG_CONFIG ?= false&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. Do you want to define NCG services ? (experimental)&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Installation Exemple =&lt;br /&gt;
&lt;br /&gt;
== With Quattor ==&lt;br /&gt;
*server profile creation (look at the profile https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/clusters/example-3.1/profiles/nagios3-server.example.org.tpl):&lt;br /&gt;
 svn add cfg/clusters/your-3.1/profiles/profile_node58.tpl&lt;br /&gt;
&lt;br /&gt;
*Modify your list of machines:&lt;br /&gt;
 vi ./cfg/sites/your/site/config/your_nodes_properties.tpl&lt;br /&gt;
&lt;br /&gt;
*create your hardware template&lt;br /&gt;
 svn cp ./cfg/sites/your/hardware/virtual_machine_3.tpl ./cfg/sites/your/hardware/virtual_machine_13.tpl&lt;br /&gt;
&lt;br /&gt;
*Configure your clients adding:&lt;br /&gt;
 variable NAGIOS_CLIENT_ENABLED = true;&lt;br /&gt;
 include { if(NAGIOS_CLIENT_ENABLED) &#039;monitoring/nagios3/client/config&#039;};&lt;br /&gt;
in the template &#039;&#039;&#039;template site/pro_site_common_config&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Comit your change:&lt;br /&gt;
 svn ci -m &#039;adding serveur nagios&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== on the nagios server ==&lt;br /&gt;
*As root&lt;br /&gt;
 vi /var/log/spma.log&lt;br /&gt;
 vi /var/log/ncm-cdispd.log&lt;br /&gt;
 /etc/init.d/nagios status&lt;br /&gt;
 /etc/init.d/nagios start&lt;br /&gt;
 add your server certificate in /etc/grid-security&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*As nagios&lt;br /&gt;
 add your personnal certificate and create a local proxy (or you can do that from another UI):&lt;br /&gt;
&lt;br /&gt;
 voms-proxy-init --voms vo.grif.fr&lt;br /&gt;
 myproxy-init -c 336 -k xxxxx-s myproxy.grif.fr -l nagios -x  -Z &amp;quot;/O=GRID-FR/C=FR/O=xxx/OU=xxx/CN=xxxx.xxxx.fr&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*As root: check the proxy retrieval mechanism (see cron &#039;&#039;&#039;/etc/cron.d/nagios-proxy-refresh&#039;&#039;&#039; , installed by the rpm &#039;&#039;&#039;nagios-proxy-refresh-1.7-3.noarch&#039;&#039;&#039;)&lt;br /&gt;
 /usr/sbin/nagios-proxy-refresh&lt;br /&gt;
 MyProxy credential retrieved. VOMS credential retrieved.&lt;br /&gt;
 # voms-proxy-info --all -file /etc/nagios/globus/userproxy.pem&lt;br /&gt;
 subject   : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy/CN=proxy/CN=proxy/CN=proxy/CN=proxy&lt;br /&gt;
 issuer    : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy/CN=proxy/CN=proxy/CN=proxy&lt;br /&gt;
 identity  : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy/CN=proxy/CN=proxy/CN=proxy&lt;br /&gt;
 type      : proxy&lt;br /&gt;
 strength  : 1024 bits&lt;br /&gt;
 path      : /etc/nagios/globus/userproxy.pem&lt;br /&gt;
 timeleft  : 11:27:56&lt;br /&gt;
 === VO vo.grif.fr extension information ===&lt;br /&gt;
 VO        : vo.grif.fr&lt;br /&gt;
 subject   : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy&lt;br /&gt;
 issuer    : /O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=grid12.lal.in2p3.fr&lt;br /&gt;
 attribute : /vo.grif.fr/Role=NULL/Capability=NULL&lt;br /&gt;
 timeleft  : 11:27:56&lt;br /&gt;
 uri       : grid12.lal.in2p3.fr:20001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Interface == &lt;br /&gt;
Check your interface: http://nagioserver.xx.fr:/nagios&lt;br /&gt;
&lt;br /&gt;
Do you get the SAM test Back? &lt;br /&gt;
you can check by hand on your server, as root:&lt;br /&gt;
 /usr/libexec/grid-monitoring/plugins/nagios/gather_sam -t 3000 --site GRIF \&lt;br /&gt;
  --vos ops --sam-root-url  http://lcg-sam.cern.ch:8080/same-pi/ --sam-all&lt;br /&gt;
&lt;br /&gt;
== Adding a service ==&lt;br /&gt;
&lt;br /&gt;
You can add Personal services in the nagios server profile. &lt;br /&gt;
&lt;br /&gt;
You need to source the template with the nagios functions &#039;&#039;&#039;standard/monitoring/nagios3/server/functions.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need to define the service before including monitoring/nagios3/server/config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EXERCICE ===&lt;br /&gt;
&lt;br /&gt;
*1) Define What is needed to test remotely a http server&lt;br /&gt;
&lt;br /&gt;
*2) Define a hostgroup (for exemple &amp;quot;WEB&amp;quot;  in &#039;&#039;&#039;NAGIOS_MONITORED_HOSTGROUPS&#039;&#039;&#039;) and set this node type to WEB in your nodes_properties&lt;br /&gt;
&lt;br /&gt;
*3) add in your configuration the service to check the HTTP on those HOSTS&lt;br /&gt;
tuning the &amp;quot;time period&amp;quot;, if needed&lt;br /&gt;
&lt;br /&gt;
*4) comit your change and check your interface&lt;br /&gt;
&lt;br /&gt;
http://nagiosserver.xxx.fr/nagios&lt;/div&gt;</summary>
		<author><name>Fschaer</name></author>
	</entry>
	<entry>
		<id>https://lcg.in2p3.fr/index.php?title=LCG-FR_/_SA1-FR_Monitoring_NagiosWithQuattor&amp;diff=4814</id>
		<title>LCG-FR / SA1-FR Monitoring NagiosWithQuattor</title>
		<link rel="alternate" type="text/html" href="https://lcg.in2p3.fr/index.php?title=LCG-FR_/_SA1-FR_Monitoring_NagiosWithQuattor&amp;diff=4814"/>
		<updated>2009-01-21T19:47:15Z</updated>

		<summary type="html">&lt;p&gt;Fschaer: /* EXERCICE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Nagios with quattor =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You can contact &#039;&#039;&#039;frederic.schaer__arobase char__cea.fr&#039;&#039;&#039; in case of problem.&lt;br /&gt;
 &lt;br /&gt;
== Configuring the Nagios server ==&lt;br /&gt;
&lt;br /&gt;
The configuration of a Nagios server is done in a set of standard templates, in the &#039;monitoring/nagios3&#039; namespace. &lt;br /&gt;
&lt;br /&gt;
=== Repository Used ===&lt;br /&gt;
&lt;br /&gt;
*Sensors are provided for some of the grid plugins from the SA1 repository: http://www.sysadmin.hep.ac.uk/rpms/grid-services/RPMS.monitoring/&lt;br /&gt;
&lt;br /&gt;
*RPMs for nagios and nagios-plugins (+dépendances) are compiled for each supported OS, and are put in the repository « updates » on quattorsrv.lal.in2p3.fr.&lt;br /&gt;
Ex. : http://quattor.web.lal.in2p3.fr/packages/os/sl440-i386/updates/&lt;br /&gt;
&lt;br /&gt;
*Plugins « nagios-grid-plugins » are in noarch RPM in the repository « nagios »&lt;br /&gt;
Ex. : http://quattor.web.lal.in2p3.fr/packages/nagios/&lt;br /&gt;
&lt;br /&gt;
see template : &#039;&#039;&#039;nagios3/plugins/config.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Server Template ===&lt;br /&gt;
&lt;br /&gt;
An example Nagios server template is here :&lt;br /&gt;
&lt;br /&gt;
https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/clusters/example-3.1/profiles/nagios3-server.example.org.tpl&lt;br /&gt;
&lt;br /&gt;
This machine should be a UI to monitor grid services.&lt;br /&gt;
 &lt;br /&gt;
=== Who is monitored, Client configuration ===&lt;br /&gt;
&lt;br /&gt;
==== 2 conditions ====&lt;br /&gt;
&lt;br /&gt;
*Hosts from site (&#039;&#039;&#039;variable SITES&#039;&#039;&#039;) and present in &#039;&#039;&#039;config/’sitename’_nodes_properties.tpl&#039;&#039;&#039; will be monitored&lt;br /&gt;
&lt;br /&gt;
Template example for hosts declaration are in LCGQWG:&lt;br /&gt;
https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/sites/example/site/config&lt;br /&gt;
&lt;br /&gt;
*AND host that has NAGIOS_CLIENT_ENABLED set to &amp;quot;true&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 variable NAGIOS_CLIENT_ENABLED ?= true;&lt;br /&gt;
 include { if(NAGIOS_CLIENT_ENABLED) &#039;monitoring/nagios3/client/config&#039;};&lt;br /&gt;
&lt;br /&gt;
If you want to set this variable to &amp;quot;true&amp;quot; for all your hosts you can put it in the following template: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;template site/pro_site_common_config&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== You can tune this with ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NAGIOS_IGNORED_NODES&#039;&#039;&#039; ,  &#039;&#039;&#039;NAGIOS_MONITORED_HOSTGROUPS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
see the profile: https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/clusters/example-3.1/profiles/nagios3-server.example.org.tpl&lt;br /&gt;
&lt;br /&gt;
==== Autorisation to contact NRPE ====&lt;br /&gt;
&lt;br /&gt;
You need to declare your nagios server in the variable  &#039;&#039;&#039;NAGIOS_SERVER&#039; so it is able to contact NRPE daemon on the clients&lt;br /&gt;
&lt;br /&gt;
=== What is monitored ===&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
Services are added in the template &#039;&#039;&#039;« server/cfgfiles/services.tpl »&#039;&#039;&#039; , &lt;br /&gt;
adding a service can be done like this :&lt;br /&gt;
&lt;br /&gt;
 variable TMP_SERVICE=nlist( &lt;br /&gt;
        &amp;quot;use&amp;quot;,&amp;quot;                             generic-service&amp;quot;, &lt;br /&gt;
        &amp;quot;host_name&amp;quot;,&amp;quot;                       node07.org.fr&amp;quot;, &lt;br /&gt;
      &amp;quot;service_description&amp;quot;,&amp;quot;             Workers ssh_known_hosts&amp;quot;, &lt;br /&gt;
      &amp;quot;contact_groups&amp;quot;,&amp;quot;                  admins&amp;quot;, &lt;br /&gt;
      &amp;quot;check_command&amp;quot;,&amp;quot;                   check_nrpe_long!check_ssh_known_hosts!60&amp;quot;, &lt;br /&gt;
      &amp;quot;normal_check_interval&amp;quot;,&amp;quot;           60 ; check every hour&amp;quot;, &lt;br /&gt;
      &amp;quot;max_check_attempts&amp;quot;,&amp;quot;              1&amp;quot;, &lt;br /&gt;
  ); &lt;br /&gt;
 variable NAGIOS_SERVICES=nagios_add_service(TMP_SERVICE);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the second parameter of the function &#039;&#039;&#039;nagios_add_service&#039;&#039;&#039;  is « true » , a dependency will be added on the NRPE daemon for all the nodes  « &amp;quot;*,!NOQUATTOR » for the service defined .... need to improve on this...&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add dependency on a services for a host, with a service from another host well defined:&lt;br /&gt;
&lt;br /&gt;
 variable NAGIOS_USER_DEFINED_HOST_DEPENDENCIES =	nagios_add_host_service_dependency(&lt;br /&gt;
 	&amp;quot;node07.datagrid.cea.fr&amp;quot;,&amp;quot;nrpe daemon&amp;quot;, &amp;quot;node07.datagrid.cea.fr&amp;quot;,&amp;quot;Workers ssh_known_hosts&amp;quot; &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
It&#039;s not possible to add dependency between hostgroups (for the moment ?)&lt;br /&gt;
&lt;br /&gt;
==== commands and NRPE ====&lt;br /&gt;
&lt;br /&gt;
Some Nagios configuration files don&#039;t need complex quattor structure template and so are created with &#039;&#039;&#039;filecopy&#039;&#039;&#039; :&lt;br /&gt;
&lt;br /&gt;
*adding commands is done in:&lt;br /&gt;
&#039;&#039;&#039;monitoring/nagios3/server/cfgfiles/commands&#039;&#039;&#039;&lt;br /&gt;
*adding NRPE commands is done in:&lt;br /&gt;
&#039;&#039;&#039;monitoring/nagios3/client/cfgfiles/nrpe_commands&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add dependency on the NRPE daemon for services wich are not defined on all the hosts(template &#039;&#039;&#039;services.tpl&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 variable NRPE_HOSTGROUPS_SPECIFIC_DEPENDENT_SERVICES=nlist(&lt;br /&gt;
         escape(&amp;quot;CE,CE-MPI,!NOQUATTOR&amp;quot;)  ,&amp;quot;black hole workers&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;CE,CE-MPI,LFC,SE_DPM,SE_DISK,MON,VOBOX,WMS,!NOQUATTOR&amp;quot;),&amp;quot;host certificate&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;MON&amp;quot;)                   ,&amp;quot;apel publisher&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;CE,CE-MPI&amp;quot;)                             ,&amp;quot;apel parser&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;WN,CE-MPI,UI,VOBOX&amp;quot;)    ,&amp;quot;home partition freespace&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;WN&amp;quot;)    ,&amp;quot;pbs_mom transfers&amp;quot;,&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
=== Proxy management ===&lt;br /&gt;
Need to have a valid certificate for local grid probe.&lt;br /&gt;
2 mechanisms are possible: Renewal and Retrieval.&lt;br /&gt;
In cfg/standard/monitoring/nagios3/server/config.tpl&lt;br /&gt;
 include { if(NAGIOS_NCG_CONFIG &amp;amp;&amp;amp; NAGIOS_MODE_PROXY_RENEW) &#039;monitoring/nagios3/server/vobox&#039;};&lt;br /&gt;
 include { if(NAGIOS_NCG_CONFIG &amp;amp;&amp;amp; NAGIOS_MODE_PROXY_RETRIEVE) &#039;monitoring/nagios3/server/proxy_retrieval&#039;};&lt;br /&gt;
&lt;br /&gt;
Les variables associées:&lt;br /&gt;
 {| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
NAGIOS_MODE_PROXY_RENEW&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. true if you want to use renewal mechanism&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_MODE_PROXY_RETRIEVE&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. true if you want to use retrieval mechanism&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_RENEW_PROXY&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. file where the proxy is renewed by the vobox mechanism renewal&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_OUTPUT_PROXY&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. file where the proxy should be retrieved by the retrieval cron proxy&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_MYPROXY_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. name of your proxy for later retrieval&lt;br /&gt;
|----&lt;br /&gt;
| &lt;br /&gt;
MYPROXY_SERVER&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. name of your myproxy server host&lt;br /&gt;
|----&lt;br /&gt;
| &lt;br /&gt;
NAGIOS_VONAME_PROXY&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. VO Used for voms authentication&lt;br /&gt;
|----&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Les variables ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
NAGIOS_RPM_VERSION ?= &amp;quot;3.0.5-1&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Nagios Server RPM version&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_NODES_PROPERTIES ?= nlist()&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
nlist. The site nodes properties. For instance : nlist( escape(&amp;quot;mynode.mydomain&amp;quot;), nlist(&amp;quot;type&amp;quot;,&amp;quot;NFS&amp;quot;, &amp;quot;monitoring&amp;quot;,&amp;quot;yes&amp;quot;, &amp;quot;os&amp;quot;,&amp;quot;undef&amp;quot;, &amp;quot;ip&amp;quot;,&amp;quot;192.68.0.1&amp;quot; , &amp;quot;hardware&amp;quot;,&amp;quot;undef&amp;quot;))&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HTPASSWD_LOGIN ?= &amp;quot;nagios&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Defines the user name allowed to access the nagios interface.&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HTPASSWD_PASS  ?= &amp;quot;i88QUu1o8Jwq.&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Defines the password associated with the user name. This is a md5 hash generated using the &amp;quot;openssl passwd&amp;quot; command. Default password is &amp;quot;nagios&amp;quot;.&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_MONITORED_HOSTGROUPS ?= NAGIOS_KNOWN_HOSTGROUPS&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
list. Defines the list of hostgroups you want to define in Nagios. If different from NAGIOS_KNOWN_HOSTGROUPS, each node that is of a &amp;quot;type&amp;quot; not listed will be added to the hostgroup NAGIOS_DEFAULT_NODE_GROUP. Please not that KNOWN hostgrouops will still be defined, for compatibility reasons (for now).&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_DEFAULT_NODE_GROUP?=&amp;quot;Others&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Nodes which type is not known will be put in this hostgroup&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SERVER ?= FULL_HOSTNAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Defines the NAGIOS_SERVER variable, which tells the clients which nagios host is going to poll the NRPE daemon. This *REALLY* should be set for all nodes, not only the server&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_DEFAULT_ADMIN_NAME ?=&amp;quot;nagiosadmin&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Default user name to use if none specified.&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_ADMIN_CONTACTS ?= error(&amp;quot;you need to define NAGIOS_ADMIN_CONTACTS with a nlist, containing names, associated with emails&amp;quot;)&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
nlist. Contains the names of people to be notified, with emails. ex. : nlist(&amp;quot;toto&amp;quot;                ,&amp;quot;me@localhost&amp;quot;,)&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_NOTIFICATIONS_ENABLED ?= true&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. Nagios wide variable to disable/enable notifications&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SYSINFO_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_system_information&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_CONFINFO_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_configuration_information&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SYSCOMMAND_USERS ?= NAGIOS_DEFAULT_ADMIN_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_system_commands&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SERVVIEW_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_services&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HOSTVIEW_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_hosts&lt;br /&gt;
 |----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SERVCOMMANDS_USERS ?= NAGIOS_DEFAULT_ADMIN_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_service_commands&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HOSTCOMMANDS_USERS ?= NAGIOS_DEFAULT_ADMIN_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_host_commands&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_IGNORED_NODES ?= list()&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
list. Defines a list of nodes that will be IGNORED when defining nagios hosts. This is usefull if you have nodes in the NODES_PROPERTIES that you do *NOT* want to monitor&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_NCG_CONFIG ?= false&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. Do you want to define NCG services ? (experimental)&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Installation Exemple =&lt;br /&gt;
&lt;br /&gt;
== With Quattor ==&lt;br /&gt;
*server profile creation (look at the profile https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/clusters/example-3.1/profiles/nagios3-server.example.org.tpl):&lt;br /&gt;
 svn add cfg/clusters/your-3.1/profiles/profile_node58.tpl&lt;br /&gt;
&lt;br /&gt;
*Modify your list of machines:&lt;br /&gt;
 vi ./cfg/sites/your/site/config/your_nodes_properties.tpl&lt;br /&gt;
&lt;br /&gt;
*create your hardware template&lt;br /&gt;
 svn cp ./cfg/sites/your/hardware/virtual_machine_3.tpl ./cfg/sites/your/hardware/virtual_machine_13.tpl&lt;br /&gt;
&lt;br /&gt;
*Configure your clients adding:&lt;br /&gt;
 variable NAGIOS_CLIENT_ENABLED = true;&lt;br /&gt;
 include { if(NAGIOS_CLIENT_ENABLED) &#039;monitoring/nagios3/client/config&#039;};&lt;br /&gt;
in the template &#039;&#039;&#039;template site/pro_site_common_config&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Comit your change:&lt;br /&gt;
 svn ci -m &#039;adding serveur nagios&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== on the nagios server ==&lt;br /&gt;
*As root&lt;br /&gt;
 vi /var/log/spma.log&lt;br /&gt;
 vi /var/log/ncm-cdispd.log&lt;br /&gt;
 /etc/init.d/nagios status&lt;br /&gt;
 /etc/init.d/nagios start&lt;br /&gt;
 add your server certificate in /etc/grid-security&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*As nagios&lt;br /&gt;
 add your personnal certificate and create a local proxy (or you can do that from another UI):&lt;br /&gt;
&lt;br /&gt;
 voms-proxy-init --voms vo.grif.fr&lt;br /&gt;
 myproxy-init -c 336 -k xxxxx-s myproxy.grif.fr -l nagios -x  -Z &amp;quot;/O=GRID-FR/C=FR/O=xxx/OU=xxx/CN=xxxx.xxxx.fr&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*As root: check the proxy retrieval mechanism (see cron &#039;&#039;&#039;/etc/cron.d/nagios-proxy-refresh&#039;&#039;&#039; , installed by the rpm &#039;&#039;&#039;nagios-proxy-refresh-1.7-3.noarch&#039;&#039;&#039;)&lt;br /&gt;
 /usr/sbin/nagios-proxy-refresh&lt;br /&gt;
 MyProxy credential retrieved. VOMS credential retrieved.&lt;br /&gt;
 # voms-proxy-info --all -file /etc/nagios/globus/userproxy.pem&lt;br /&gt;
 subject   : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy/CN=proxy/CN=proxy/CN=proxy/CN=proxy&lt;br /&gt;
 issuer    : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy/CN=proxy/CN=proxy/CN=proxy&lt;br /&gt;
 identity  : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy/CN=proxy/CN=proxy/CN=proxy&lt;br /&gt;
 type      : proxy&lt;br /&gt;
 strength  : 1024 bits&lt;br /&gt;
 path      : /etc/nagios/globus/userproxy.pem&lt;br /&gt;
 timeleft  : 11:27:56&lt;br /&gt;
 === VO vo.grif.fr extension information ===&lt;br /&gt;
 VO        : vo.grif.fr&lt;br /&gt;
 subject   : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy&lt;br /&gt;
 issuer    : /O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=grid12.lal.in2p3.fr&lt;br /&gt;
 attribute : /vo.grif.fr/Role=NULL/Capability=NULL&lt;br /&gt;
 timeleft  : 11:27:56&lt;br /&gt;
 uri       : grid12.lal.in2p3.fr:20001&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Interface == &lt;br /&gt;
Check your interface: http://nagioserver.xx.fr:/nagios&lt;br /&gt;
&lt;br /&gt;
Do you get the SAM test Back? &lt;br /&gt;
you can check by hand on your server, as root:&lt;br /&gt;
 /usr/libexec/grid-monitoring/plugins/nagios/gather_sam -t 3000 --site GRIF \&lt;br /&gt;
  --vos ops --sam-root-url  http://lcg-sam.cern.ch:8080/same-pi/ --sam-all&lt;br /&gt;
&lt;br /&gt;
== Adding a service ==&lt;br /&gt;
&lt;br /&gt;
You can add Personal services in the nagios server profile. &lt;br /&gt;
&lt;br /&gt;
You need to source the template with the nagios functions &#039;&#039;&#039;standard/monitoring/nagios3/server/functions.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need to define the service before including monitoring/nagios3/server/config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EXERCICE ===&lt;br /&gt;
&lt;br /&gt;
*1) Define What is needed to test remotely a http server&lt;br /&gt;
&lt;br /&gt;
*2) Define a hostgroup (for exemple &amp;quot;WEB&amp;quot;  in &#039;&#039;&#039;NAGIOS_MONITORED_HOSTGROUPS&#039;&#039;&#039;) and set this node type to WEB in your nodes_properties&lt;br /&gt;
&lt;br /&gt;
*3) add in your configuration the service to check the HTTP on those HOSTS&lt;br /&gt;
tuning the &amp;quot;time period&amp;quot;, if needed&lt;br /&gt;
&lt;br /&gt;
*4) comit your change and check your interface&lt;br /&gt;
&lt;br /&gt;
http://nagiosserver.xxx.fr/nagios&lt;/div&gt;</summary>
		<author><name>Fschaer</name></author>
	</entry>
	<entry>
		<id>https://lcg.in2p3.fr/index.php?title=LCG-FR_/_SA1-FR_Monitoring_NagiosWithQuattor&amp;diff=4738</id>
		<title>LCG-FR / SA1-FR Monitoring NagiosWithQuattor</title>
		<link rel="alternate" type="text/html" href="https://lcg.in2p3.fr/index.php?title=LCG-FR_/_SA1-FR_Monitoring_NagiosWithQuattor&amp;diff=4738"/>
		<updated>2009-01-21T10:26:49Z</updated>

		<summary type="html">&lt;p&gt;Fschaer: /* commands and NRPE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Nagios with quattor =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuring the Nagios server ==&lt;br /&gt;
&lt;br /&gt;
The configuration of a Nagios server is done in a set of standard templates, in the &#039;monitoring/nagios3&#039; namespace. &lt;br /&gt;
&lt;br /&gt;
=== Repository Used ===&lt;br /&gt;
&lt;br /&gt;
*Sensors are provided for some of the grid plugins from the SA1 repository: http://www.sysadmin.hep.ac.uk/rpms/grid-services/RPMS.monitoring/&lt;br /&gt;
&lt;br /&gt;
*RPMs for nagios and nagios-plugins (+dépendances) are compiled for each supported OS, and are put in the repository « updates » on quattorsrv.lal.in2p3.fr.&lt;br /&gt;
Ex. : http://quattor.web.lal.in2p3.fr/packages/os/sl440-i386/updates/&lt;br /&gt;
&lt;br /&gt;
*Plugins « nagios-grid-plugins » are in noarch RPM in the repository « nagios »&lt;br /&gt;
Ex. : http://quattor.web.lal.in2p3.fr/packages/nagios/&lt;br /&gt;
&lt;br /&gt;
see template : &#039;&#039;&#039;nagios3/plugins/config.tpl&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Server Template ===&lt;br /&gt;
&lt;br /&gt;
An example Nagios server template is here :&lt;br /&gt;
&lt;br /&gt;
https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/clusters/example-3.1/profiles/nagios3-server.example.org.tpl&lt;br /&gt;
&lt;br /&gt;
This machine should be a UI to monitor grid services.&lt;br /&gt;
 &lt;br /&gt;
=== Who is monitored, Client configuration ===&lt;br /&gt;
&lt;br /&gt;
==== 2 conditions ====&lt;br /&gt;
&lt;br /&gt;
*Hosts from site (&#039;&#039;&#039;variable SITES&#039;&#039;&#039;) and present in &#039;&#039;&#039;config/’sitename’_nodes_properties.tpl&#039;&#039;&#039; will be monitored&lt;br /&gt;
&lt;br /&gt;
Template example for hosts declaration are in LCGQWG:&lt;br /&gt;
https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/sites/example/site/config&lt;br /&gt;
&lt;br /&gt;
*AND host that has NAGIOS_CLIENT_ENABLED set to &amp;quot;true&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 variable NAGIOS_CLIENT_ENABLED ?= true;&lt;br /&gt;
 include { if(NAGIOS_CLIENT_ENABLED) &#039;monitoring/nagios3/client/config&#039;};&lt;br /&gt;
&lt;br /&gt;
If you want to set this variable to &amp;quot;true&amp;quot; for all your hosts you can put it in the following template: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;template site/pro_site_common_config&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== You can tune this with ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NAGIOS_IGNORED_NODES&#039;&#039;&#039; ,  &#039;&#039;&#039;NAGIOS_MONITORED_HOSTGROUPS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
see the profile: https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/clusters/example-3.1/profiles/nagios3-server.example.org.tpl&lt;br /&gt;
&lt;br /&gt;
=== What is monitored ===&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
Services are added in the template &#039;&#039;&#039;« server/cfgfiles/services.tpl »&#039;&#039;&#039; , &lt;br /&gt;
adding a service can be done like this :&lt;br /&gt;
&lt;br /&gt;
 variable TMP_SERVICE=nlist( &lt;br /&gt;
        &amp;quot;use&amp;quot;,&amp;quot;                             generic-service&amp;quot;, &lt;br /&gt;
        &amp;quot;host_name&amp;quot;,&amp;quot;                       node07.org.fr&amp;quot;, &lt;br /&gt;
      &amp;quot;service_description&amp;quot;,&amp;quot;             Workers ssh_known_hosts&amp;quot;, &lt;br /&gt;
      &amp;quot;contact_groups&amp;quot;,&amp;quot;                  admins&amp;quot;, &lt;br /&gt;
      &amp;quot;check_command&amp;quot;,&amp;quot;                   check_nrpe_long!check_ssh_known_hosts!60&amp;quot;, &lt;br /&gt;
      &amp;quot;normal_check_interval&amp;quot;,&amp;quot;           60 ; check every hour&amp;quot;, &lt;br /&gt;
      &amp;quot;max_check_attempts&amp;quot;,&amp;quot;              1&amp;quot;, &lt;br /&gt;
  ); &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the second parameter of the function &#039;&#039;&#039;nagios_add_service&#039;&#039;&#039;  is « true » , a dependency will be added on the NRPE daemon for all the nodes  « &amp;quot;*,!NOQUATTOR » for the service defined .... need to improve on this...&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add dependency on a services for a host, with a service from another host well defined:&lt;br /&gt;
&lt;br /&gt;
 variable NAGIOS_USER_DEFINED_HOST_DEPENDENCIES =	nagios_add_host_service_dependency(&lt;br /&gt;
 	&amp;quot;node07.datagrid.cea.fr&amp;quot;,&amp;quot;nrpe daemon&amp;quot;, &amp;quot;node07.datagrid.cea.fr&amp;quot;,&amp;quot;Workers ssh_known_hosts&amp;quot; &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
It&#039;s not possible to add dependency between hostgroups (for the moment ?)&lt;br /&gt;
&lt;br /&gt;
==== commands and NRPE ====&lt;br /&gt;
&lt;br /&gt;
Some Nagios configuration files don&#039;t need complex quattor structure template and so are created with &#039;&#039;&#039;filecopy&#039;&#039;&#039; :&lt;br /&gt;
&lt;br /&gt;
*adding commands is done in:&lt;br /&gt;
&#039;&#039;&#039;monitoring/nagios3/server/cfgfiles/commands&#039;&#039;&#039;&lt;br /&gt;
*adding NRPE commands is done in:&lt;br /&gt;
&#039;&#039;&#039;monitoring/nagios3/client/cfgfiles/nrpe_commands&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to add dependency on the NRPE daemon for services wich are not defined on all the hosts(template &#039;&#039;&#039;services.tpl&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 variable NRPE_HOSTGROUPS_SPECIFIC_DEPENDENT_SERVICES=nlist(&lt;br /&gt;
         escape(&amp;quot;CE,CE-MPI,!NOQUATTOR&amp;quot;)  ,&amp;quot;black hole workers&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;CE,CE-MPI,LFC,SE_DPM,SE_DISK,MON,VOBOX,WMS,!NOQUATTOR&amp;quot;),&amp;quot;host certificate&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;MON&amp;quot;)                   ,&amp;quot;apel publisher&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;CE,CE-MPI&amp;quot;)                             ,&amp;quot;apel parser&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;WN,CE-MPI,UI,VOBOX&amp;quot;)    ,&amp;quot;home partition freespace&amp;quot;,&lt;br /&gt;
         escape(&amp;quot;WN&amp;quot;)    ,&amp;quot;pbs_mom transfers&amp;quot;,&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
=== Proxy management ===&lt;br /&gt;
Need to have a valid certificate for local grid probe.&lt;br /&gt;
2 mechanisms are possible: Renewal and Retrieval.&lt;br /&gt;
In cfg/standard/monitoring/nagios3/server/config.tpl&lt;br /&gt;
 include { if(NAGIOS_NCG_CONFIG &amp;amp;&amp;amp; NAGIOS_MODE_PROXY_RENEW) &#039;monitoring/nagios3/server/vobox&#039;};&lt;br /&gt;
 include { if(NAGIOS_NCG_CONFIG &amp;amp;&amp;amp; NAGIOS_MODE_PROXY_RETRIEVE) &#039;monitoring/nagios3/server/proxy_retrieval&#039;};&lt;br /&gt;
&lt;br /&gt;
Les variables associées:&lt;br /&gt;
 {| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
NAGIOS_MODE_PROXY_RENEW&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. true if you want to use renewal mechanism&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_MODE_PROXY_RETRIEVE&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. true if you want to use retrieval mechanism&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_RENEW_PROXY&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
file where the proxy is renewed by the vobox mechanism renewal&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_OUTPUT_PROXY&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
file where the proxy should be retrieved by the retrieval cron proxy&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
NAGIOS_MYPROXY_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
name of your proxy for later retrieval&lt;br /&gt;
|----&lt;br /&gt;
| &lt;br /&gt;
MYPROXY_SERVER&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
name of your myproxy server host&lt;br /&gt;
|----&lt;br /&gt;
| &lt;br /&gt;
NAGIOS_VONAME_PROXY&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
VO Used for voms authentication&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Les variables ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
NAGIOS_RPM_VERSION ?= &amp;quot;3.0.5-1&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Nagios Server RPM version&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_NODES_PROPERTIES ?= nlist()&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
nlist. The site nodes properties. For instance : nlist( escape(&amp;quot;mynode.mydomain&amp;quot;), nlist(&amp;quot;type&amp;quot;,&amp;quot;NFS&amp;quot;, &amp;quot;monitoring&amp;quot;,&amp;quot;yes&amp;quot;, &amp;quot;os&amp;quot;,&amp;quot;undef&amp;quot;, &amp;quot;ip&amp;quot;,&amp;quot;192.68.0.1&amp;quot; , &amp;quot;hardware&amp;quot;,&amp;quot;undef&amp;quot;))&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HTPASSWD_LOGIN ?= &amp;quot;nagios&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Defines the user name allowed to access the nagios interface.&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HTPASSWD_PASS  ?= &amp;quot;i88QUu1o8Jwq.&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Defines the password associated with the user name. This is a md5 hash generated using the &amp;quot;openssl passwd&amp;quot; command. Default password is &amp;quot;nagios&amp;quot;.&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_MONITORED_HOSTGROUPS ?= NAGIOS_KNOWN_HOSTGROUPS&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
list. Defines the list of hostgroups you want to define in Nagios. If different from NAGIOS_KNOWN_HOSTGROUPS, each node that is of a &amp;quot;type&amp;quot; not listed will be added to the hostgroup NAGIOS_DEFAULT_NODE_GROUP. Please not that KNOWN hostgrouops will still be defined, for compatibility reasons (for now).&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_DEFAULT_NODE_GROUP?=&amp;quot;Others&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Nodes which type is not known will be put in this hostgroup&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SERVER ?= FULL_HOSTNAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Defines the NAGIOS_SERVER variable, which tells the clients which nagios host is going to poll the NRPE daemon. This *REALLY* should be set for all nodes, not only the server&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_DEFAULT_ADMIN_NAME ?=&amp;quot;nagiosadmin&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. Default user name to use if none specified.&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_ADMIN_CONTACTS ?= error(&amp;quot;you need to define NAGIOS_ADMIN_CONTACTS with a nlist, containing names, associated with emails&amp;quot;)&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
nlist. Contains the names of people to be notified, with emails. ex. : nlist(&amp;quot;toto&amp;quot;                ,&amp;quot;me@localhost&amp;quot;,)&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_NOTIFICATIONS_ENABLED ?= true&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. Nagios wide variable to disable/enable notifications&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SYSINFO_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_system_information&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_CONFINFO_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_configuration_information&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SYSCOMMAND_USERS ?= NAGIOS_DEFAULT_ADMIN_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_system_commands&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SERVVIEW_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_services&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HOSTVIEW_USERS ?= &amp;quot;*&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_hosts&lt;br /&gt;
 |----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_SERVCOMMANDS_USERS ?= NAGIOS_DEFAULT_ADMIN_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_service_commands&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_HOSTCOMMANDS_USERS ?= NAGIOS_DEFAULT_ADMIN_NAME&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
string. part of CGI users authentication. Corresponds to nagios configuration variable authorized_for_all_host_commands&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_IGNORED_NODES ?= list()&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
list. Defines a list of nodes that will be IGNORED when defining nagios hosts. This is usefull if you have nodes in the NODES_PROPERTIES that you do *NOT* want to monitor&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
variable NAGIOS_NCG_CONFIG ?= false&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; |&lt;br /&gt;
boolean. Do you want to define NCG services ? (experimental)&lt;br /&gt;
|----&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Installation Exemple =&lt;br /&gt;
&lt;br /&gt;
== With Quattor ==&lt;br /&gt;
*server profile creation (look at the profile https://trac.lal.in2p3.fr/LCGQWG/browser/templates/trunk/clusters/example-3.1/profiles/nagios3-server.example.org.tpl):&lt;br /&gt;
 svn add cfg/clusters/your-3.1/profiles/profile_node58.tpl&lt;br /&gt;
&lt;br /&gt;
*Modify your list of machines:&lt;br /&gt;
 vi ./cfg/sites/your/site/config/your_nodes_properties.tpl&lt;br /&gt;
&lt;br /&gt;
*create your hardware template&lt;br /&gt;
 svn cp ./cfg/sites/your/hardware/virtual_machine_3.tpl ./cfg/sites/your/hardware/virtual_machine_13.tpl&lt;br /&gt;
&lt;br /&gt;
*Configure your clients adding:&lt;br /&gt;
 variable NAGIOS_CLIENT_ENABLED = true;&lt;br /&gt;
 include { if(NAGIOS_CLIENT_ENABLED) &#039;monitoring/nagios3/client/config&#039;};&lt;br /&gt;
in the template &#039;&#039;&#039;template site/pro_site_common_config&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Comit your change:&lt;br /&gt;
 svn ci -m &#039;adding serveur nagios&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== on the nagios server ==&lt;br /&gt;
*As root&lt;br /&gt;
 vi /var/log/spma.log&lt;br /&gt;
 vi /var/log/ncm-cdispd.log&lt;br /&gt;
 /etc/init.d/nagios status&lt;br /&gt;
 /etc/init.d/nagios start&lt;br /&gt;
 add your server certificate in /etc/grid-security&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*As nagios&lt;br /&gt;
 add your personnal certificate and create a local proxy (or you can do that from another UI):&lt;br /&gt;
&lt;br /&gt;
 voms-proxy-init --voms vo.grif.fr&lt;br /&gt;
 myproxy-init -c 336 -k xxxxx-s myproxy.grif.fr -l nagios -x  -Z &amp;quot;/O=GRID-FR/C=FR/O=xxx/OU=xxx/CN=xxxx.xxxx.fr&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*As root: check the proxy retrieval mechanism:&lt;br /&gt;
 /usr/sbin/nagios-proxy-refresh&lt;br /&gt;
 MyProxy credential retrieved. VOMS credential retrieved.&lt;br /&gt;
 # voms-proxy-info --all -file /etc/nagios/globus/userproxy.pem&lt;br /&gt;
 subject   : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy/CN=proxy/CN=proxy/CN=proxy/CN=proxy&lt;br /&gt;
 issuer    : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy/CN=proxy/CN=proxy/CN=proxy&lt;br /&gt;
 identity  : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy/CN=proxy/CN=proxy/CN=proxy&lt;br /&gt;
 type      : proxy&lt;br /&gt;
 strength  : 1024 bits&lt;br /&gt;
 path      : /etc/nagios/globus/userproxy.pem&lt;br /&gt;
 timeleft  : 11:27:56&lt;br /&gt;
 === VO vo.grif.fr extension information ===&lt;br /&gt;
 VO        : vo.grif.fr&lt;br /&gt;
 subject   : /O=GRID-FR/C=FR/O=CEA/OU=IRFU/CN=Christine Leroy&lt;br /&gt;
 issuer    : /O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=grid12.lal.in2p3.fr&lt;br /&gt;
 attribute : /vo.grif.fr/Role=NULL/Capability=NULL&lt;br /&gt;
 timeleft  : 11:27:56&lt;br /&gt;
 uri       : grid12.lal.in2p3.fr:20001&lt;/div&gt;</summary>
		<author><name>Fschaer</name></author>
	</entry>
	<entry>
		<id>https://lcg.in2p3.fr/index.php?title=LCG-FR_/_SA1-FR_Accounting_WG&amp;diff=4027</id>
		<title>LCG-FR / SA1-FR Accounting WG</title>
		<link rel="alternate" type="text/html" href="https://lcg.in2p3.fr/index.php?title=LCG-FR_/_SA1-FR_Accounting_WG&amp;diff=4027"/>
		<updated>2008-07-02T11:54:45Z</updated>

		<summary type="html">&lt;p&gt;Fschaer: /* Trucs et astuces */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Contacts (Mailing list) ==&lt;br /&gt;
&amp;lt;b&amp;gt;LCG-SA1FR-ACCOUNTING-L@IN2P3.FR mailing list&amp;lt;/b&amp;gt; : &lt;br /&gt;
List managers : Cécile Barbier (CNRS/IN2P3/LAPP) / Frédéric Schaer (CEA/IRFU)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mandat du Groupe ==&lt;br /&gt;
Document consultable:&lt;br /&gt;
https://edms.in2p3.fr/file/I-013702/1/LCG-France-SA1-FR_WGAccounting.pdf&lt;br /&gt;
&lt;br /&gt;
== Journées, Réunions... ==&lt;br /&gt;
&lt;br /&gt;
* Visio/téléconférence du 25 juin 2008 : [http://indico.in2p3.fr/conferenceDisplay.py?confId=989 Minutes]&lt;br /&gt;
&lt;br /&gt;
== Accounting ==&lt;br /&gt;
* [http://www.ukiroc.eu/content/view/95/249/ EGEE Accounting Service]&lt;br /&gt;
* [http://www3.egee.cesga.es/gridsite/accounting/CESGA/egee_view.php EGEE Accounting Charts]&lt;br /&gt;
* [http://goc.grid.sinica.edu.tw/gocwiki/ApelFaq Apel FAQ]&lt;br /&gt;
&lt;br /&gt;
== Policies ==&lt;br /&gt;
&#039;&#039;&#039;[http://proj-lcg-security.web.cern.ch/ LCG/EGEE Joint Security Policy Group]&#039;&#039;&#039; from &#039;&#039;&#039;EGEE Security activity : http://www.eu-egee.org/security&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Réunions JSPG :http://indico.cern.ch/categoryDisplay.py?categId=68&lt;br /&gt;
Last meeting held at CERN, May 29 2008 &lt;br /&gt;
No time to discuss User-level Job Accounting Policy.&lt;br /&gt;
No time to discuss Grid Portal Policy.&lt;br /&gt;
* Documents de référence JSPG (versions validées): http://proj-lcg-security.web.cern.ch/proj-lcg-security/documents.html&lt;br /&gt;
* Updates not yet approved / Documents en cours de révision (versions non encore validées)&lt;br /&gt;
&#039;&#039;&#039;Grid Security Traceability and Logging policy : https://edms.cern.ch/document/428037&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Grid Acceptable Use policy : https://edms.cern.ch/document/428036&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;VO Operations policy : https://edms.cern.ch/document/853968&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Approval of CA (within IGTF) : https://edms.cern.ch/document/428038&#039;&#039;&#039;&amp;lt;br&amp;gt;  &#039;&#039;&#039;[http://www.eugridpma.org/members/worldmap/ EU Grid Policy Management Authority] as part of [http://www.gridpma.org/ the International Grid Trust federation]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Trucs et astuces ==&lt;br /&gt;
&lt;br /&gt;
Vous avez l&#039;impression que les données d&#039;accounting ne sont pas à jour sur le portail de CESGA .&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1) Vérifier la présence de vos données dans R-GMA&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
rgma&amp;gt;select max(EventDate), ExecutingSite from LcgRecords where ExecutingSite like &#039;nom de votre site&#039; group by ExecutingSite; &lt;br /&gt;
&lt;br /&gt;
Vous aurez la date de vos dernières données d&#039;accounting insérées.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2) Vérifier le nombre de sites publiant .&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://www3.egee.cesga.es/acctenfor/&lt;br /&gt;
&lt;br /&gt;
Si le nombre de sites est inférieur à la moitié des sites ( 150 sites au total environ donc 75 pour la moitié !!), c&#039;est qu&#039;il y a certainement un problème central&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3) Vérifier l&#039;état du registre principal&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
https://rgma19.pp.rl.ac.uk:8443/Inspector/Main.do/getSiteStatus?serviceType=registry&amp;amp;siteName=lcgic01.gridpp.rl.ac.uk&amp;amp;portNumber=8443&amp;amp;lookupType=statusDetails&lt;br /&gt;
&lt;br /&gt;
Si il n&#039;y a pas de connections sur celui-ci , c&#039;est qu&#039;il y a certainement aussi un problème .&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4) Faire un dump d&#039;un mois de base de donnée d&#039;accounting, en supprimant les DNs utilisateurs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Faire un dump entier de la base de données est inutile : on peut se commenter de la table LcgRecords. en supposant que la base s&#039;appelle &#039;accounting&#039;, on peut effectuer un dump sélectif en fonction de la date de l&#039;enregistrement par exemple, reste à filtrer les DNs des utilisateurs :&lt;br /&gt;
&lt;br /&gt;
 mysqldump -u root -p --where &amp;quot;EventDate like &#039;2008-06%&#039;&amp;quot; --insert-ignore -e --skip-opt accounting LcgRecords | gawk -F &#039;,&#039; \&lt;br /&gt;
 &#039;/INSERT/{for(i=1 ; i&amp;lt;NF ; i++) { if(i!=6) {printf &amp;quot;%s,&amp;quot;, $i } else { printf &amp;quot;%s,&amp;quot;, &amp;quot;&#039;&amp;quot;&#039;&#039;&amp;quot;&#039;&amp;quot;} } ; print $NF } \&lt;br /&gt;
 !/INSERT/{print $0}&#039; | gzip - &amp;gt; 200806_GRIF_dump2.sql.gz&lt;br /&gt;
&lt;br /&gt;
Le gawk se charge de remplacer le 6e champ (DN) par un champ vide. Notez qu&#039;il ne semble pas possible d&#039;échapper un simple quote (&#039;) à l&#039;intérieur d&#039;une commande gawk en utilisant bash, on a donc recours à une astuce : &lt;br /&gt;
&lt;br /&gt;
&amp;quot;&#039;&amp;quot;&#039;&#039;&amp;quot;&#039;&amp;quot; correspond à :&lt;br /&gt;
 &amp;quot;&#039;             : caractère &amp;quot;, puis fermeture du simplquote gawk&lt;br /&gt;
 &amp;quot;&#039; suivi de &#039;&amp;quot; : 2 caractères simple quote qui doivent être encadrés de double quotes dans bash&lt;br /&gt;
 &#039;&amp;quot;             : ouverture de la fin de chaine pour la commande gawk, et fermeture de l&#039;argument à printf via un &amp;quot;&lt;/div&gt;</summary>
		<author><name>Fschaer</name></author>
	</entry>
</feed>