<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
		<id>http://www.minetti.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Linux%3AConfiguration_de_Nagios</id>
		<title>Linux:Configuration de Nagios - Historique des versions</title>
		<link rel="self" type="application/atom+xml" href="http://www.minetti.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Linux%3AConfiguration_de_Nagios"/>
		<link rel="alternate" type="text/html" href="http://www.minetti.org/mediawiki/index.php?title=Linux:Configuration_de_Nagios&amp;action=history"/>
		<updated>2026-05-04T13:01:57Z</updated>
		<subtitle>Historique pour cette page sur le wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://www.minetti.org/mediawiki/index.php?title=Linux:Configuration_de_Nagios&amp;diff=143&amp;oldid=prev</id>
		<title>Jp : Page créée avec « == But == [http://www.nagios.org/ Nagios] est un logiciel de supervision qui permet de faire de la surveillance réseau en temps réel.  == Étape préliminaire == Avant d... »</title>
		<link rel="alternate" type="text/html" href="http://www.minetti.org/mediawiki/index.php?title=Linux:Configuration_de_Nagios&amp;diff=143&amp;oldid=prev"/>
				<updated>2016-04-07T19:01:08Z</updated>
		
		<summary type="html">&lt;p&gt;Page créée avec « == But == [http://www.nagios.org/ Nagios] est un logiciel de supervision qui permet de faire de la surveillance réseau en temps réel.  == Étape préliminaire == Avant d... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== But ==&lt;br /&gt;
[http://www.nagios.org/ Nagios] est un logiciel de supervision qui permet de faire de la surveillance réseau en temps réel.&lt;br /&gt;
&lt;br /&gt;
== Étape préliminaire ==&lt;br /&gt;
Avant de commencer, il est impératif:&lt;br /&gt;
* de disposer d'un [[Linux:Configuration d'OpenLDAP|serveur LDAP]],&lt;br /&gt;
* d'avoir configuré et testé l'accès client vers le LDAP (voir [[Linux:Configuration du client LDAP|Configuration du client LDAP]]),&lt;br /&gt;
* et de disposer d'un serveur Apache HTTP correctement configuré (idéalement, avec un accès SSL) et [[Linux:Apache avec une authentification via un LDAP|paramétré pour faire de l'authentification LDAP]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
* Taper la commande suivante pour installer [http://www.nagios.org/ Nagios] sur une CentOS/RedHat/Fedora:&lt;br /&gt;
 yum install nagios nagios-plugins-*&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
* Editer le fichier '''/etc/httpd/conf.d/nagios.conf''' pour autoriser le accès à partir du LAN:&lt;br /&gt;
 ...&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 Allow from 192.168.0.0/24&lt;br /&gt;
 ...&lt;br /&gt;
* Toujours dans le même fichier, ajouter les directives permettant d'authentifier les utilisateurs à travers le LDAP (voir [[Linux:Apache avec une authentification via un LDAP|Apache avec une authentification via un LDAP]]):&lt;br /&gt;
 ...&lt;br /&gt;
 # Authentification LDAP&lt;br /&gt;
 AuthName &amp;quot;Nagios Access&amp;quot;&lt;br /&gt;
 AuthType Basic&lt;br /&gt;
 AuthBasicProvider ldap&lt;br /&gt;
 AuthzLDAPAuthoritative off&lt;br /&gt;
 AuthLDAPUrl ldap://ldap.srv.minetti.org/dc=minetti,dc=org?uid?sub?(&amp;amp;(objectClass=*)(!(loginShell=/bin/false))) STARTTLS&lt;br /&gt;
 AuthLDAPBindDN &amp;quot;cn=httpd,ou=sysaccount,ou=localnet,dc=minetti,dc=org&amp;quot;&lt;br /&gt;
 AuthLDAPBindPassword &amp;quot;.......&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Autorisation LDAP&lt;br /&gt;
 AuthLDAPGroupAttribute memberUid&lt;br /&gt;
 AuthLDAPGroupAttributeIsDN off&lt;br /&gt;
 require ldap-group cn=administrators,ou=group,ou=localnet,dc=minetti,dc=org&lt;br /&gt;
 ...&lt;br /&gt;
* Editer le fichier '''/etc/nagios/cgi.cfg''' et modifier les lignes suivantes:&lt;br /&gt;
 authorized_for_system_information=*&lt;br /&gt;
 authorized_for_configuration_information=*&lt;br /&gt;
 authorized_for_system_commands=*&lt;br /&gt;
 authorized_for_all_services=*&lt;br /&gt;
 authorized_for_all_hosts=*&lt;br /&gt;
 authorized_for_all_service_commands=*&lt;br /&gt;
 authorized_for_all_host_commands=*&lt;br /&gt;
* Paramétrer les différents contacts dans le fichier '''/etc/nagios/objects/contacts.cfg'''.&lt;br /&gt;
* Paramétrer les différents éléments du réseau en ajoutant le fichier '''/etc/nagios/objects/minetti.cfg''':&lt;br /&gt;
 TODO&lt;br /&gt;
* Modifier le fichier /etc/nagios/nagios.cfg pour:&lt;br /&gt;
** TODO&lt;br /&gt;
* Lancer le démon de Nagios:&lt;br /&gt;
 service nagios start&lt;br /&gt;
* Et faire en sorte qu'il démarre automatiquement:&lt;br /&gt;
 ntsysv&lt;br /&gt;
&lt;br /&gt;
== Plug-in nagios-plugins-ldap ==&lt;br /&gt;
Pour pouvoir utiliser le plug-ins '''nagios-plugins-ldap''', il est impératif:&lt;br /&gt;
* de mettre une copie du fichier '''.ldaprc''' dans '''/var/spool/nagios''' (répertoire HOME du démon nagios):&lt;br /&gt;
 cd /var/spool/nagios&lt;br /&gt;
 cp /root/.ldaprc .&lt;br /&gt;
 chown nagios.nagios .ldaprc&lt;br /&gt;
* ajouter le fichier '''/usr/lib/nagios/plugins/check_ldaps.sh''':&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 export HOME=/var/spool/nagios&lt;br /&gt;
 /usr/lib/nagios/plugins/check_ldaps $@&lt;br /&gt;
* le rendre exécutable (notamment par SELinux):&lt;br /&gt;
 chmod 755 /usr/lib/nagios/plugins/check_ldaps.sh&lt;br /&gt;
 chcon -R -u system_u /usr/lib/nagios/plugins/check_ldaps.sh&lt;br /&gt;
 semanage fcontext -a -t bin_t '/usr/lib/nagios/plugins/check_ldaps.sh'&lt;br /&gt;
 restorecon -R -v /usr/lib/nagios/plugins/check_ldaps.sh&lt;br /&gt;
* et donner les autorisations SELinux:&lt;br /&gt;
 grep check_ldap /var/log/audit/audit.log | audit2allow -M check_ldap&lt;br /&gt;
 semodule -i check_ldap.pp&lt;br /&gt;
&lt;br /&gt;
== Plug-in pour Samba ==&lt;br /&gt;
Pour pouvoir tester les services NetBIOS:&lt;br /&gt;
* commencer par récupérer le plug-in [http://exchange.nagios.org/directory/Plugins/System-Metrics/File-System/SMB/check_smb/details check_smb],&lt;br /&gt;
* adapter le script du plug-in (concernant notamment le nom de l'utilisateur invité lors de l'appel de la commande '''smbclient'''),&lt;br /&gt;
* le rendre exécutable:&lt;br /&gt;
 chmod 755 /usr/lib/nagios/plugins/check_smb&lt;br /&gt;
 chcon -R -u system_u /usr/lib/nagios/plugins/check_smb&lt;br /&gt;
* ajouter la commande dans le fichier '''/etc/nagios/objects/commands.cfg''': &lt;br /&gt;
 # 'check_smb' command definition&lt;br /&gt;
 define command{&lt;br /&gt;
         command_name    check_smb&lt;br /&gt;
         command_line    $USER1$/check_smb -H $HOSTADDRESS$ &lt;br /&gt;
         }&lt;/div&gt;</summary>
		<author><name>Jp</name></author>	</entry>

	</feed>