{"id":81,"date":"2009-02-09T14:53:09","date_gmt":"2009-02-09T13:53:09","guid":{"rendered":"http:\/\/luca.lovalvo.net\/1_luca_lo_valvo\/archive\/1938_installation_de_nagios_3_sous_debian.html"},"modified":"2022-11-04T15:57:43","modified_gmt":"2022-11-04T14:57:43","slug":"installation-de-nagios-3-sous-debian","status":"publish","type":"post","link":"https:\/\/luca.lovalvo.ch\/blog\/installation-de-nagios-3-sous-debian\/","title":{"rendered":"Installation de Nagios 3 sous Debian"},"content":{"rendered":"<p>Petite tutoriel expliquant bri&egrave;vement l&#39;installation de l&#39;outils de monitoring OpenSource <a href=\"http:\/\/www.nagios.org\/\" target=\"_blank\" rel=\"noopener\">Nagios<\/a><\/p>\n<p>Je parts du principe qu&#39;apache est install&eacute; et configur&eacute;.<br \/>On qu&#39;on utilise l&#39;outil APT pour obtenir les packages.<br \/>Et qu&#39;on est log&eacute; en SSH sur le serveur \ud83d\ude42 <\/p>\n<p><em>=&gt; Si apache n&#39;est pas install&eacute; : apt-get install apache2, et configurer son apache.<\/em> <\/p>\n<p><strong>1) Installation&nbsp; de nagios 3.x<\/strong><\/p>\n<p>On commence par mettre &agrave; jour les d&eacute;finitions de parquets APT :<br \/><font color=\"#0000ff\">APT-GET UPDATE<\/font><\/p>\n<p>Puis on install Nagios : <font color=\"#0000ff\">APT-GET nagios-text<\/font> <\/p>\n<p>Puis un panneau de configuration SAMBA : <font color=\"#0000ff\">groupe\/nom_de_domain.tld<\/font><\/p>\n<p>Puis demande si l&#39;on dispose d&#39;une adresse IP via DHCP : <font color=\"#0000ff\">Non <\/font><\/p>\n<p>=&gt; la config de Nagios Common commence, il faudra s&eacute;lectionner le serveur web apache, et saisir le mot de passe administrateur (pour l&#39;utilisateur : <font color=\"#800080\">nagiosadmin<\/font>). <font color=\"#ff0000\">(attention &agrave; ne pas faire de faute de frappe, aucune confirmation ne sera demand&eacute;e) <\/font><\/p>\n<p>=&gt; Le coeur de Nagios est install&eacute;.<\/p>\n<p><strong>2) Configuration d&#39;apache <\/strong><\/p>\n<p>Il se peut comme dans mon cas, qu&#39;apache n&#39;ait pas &eacute;t&eacute; configur&eacute; automatiquement.<\/p>\n<p>Il faut donc ouvrir le fichier <font color=\"#99cc00\">httpd.conf<\/font> et l&#39;&eacute;diter.(via VI, ou Webmin, ou t&eacute;l&eacute;charger le fichier via winscp par exemple).<\/p>\n<p>Dans : <font color=\"#808080\">\/etc\/nagios\/<\/font> il y aun fichier : <font color=\"#99cc00\">apache.conf.<\/font><\/p>\n<p><font color=\"#0000ff\">Copier\/coller<\/font> le contenu du fichier, dans &agrave; la fin du fichier <font color=\"#99cc00\">httpd.conf <\/font>.<\/p>\n<p><u>Voici le contenu du fichier <\/u><font color=\"#99cc00\"><u>apache.conf<\/u> :<br \/><font color=\"#800080\"># BEGIN FOR NAGIOS<\/p>\n<p># nagios is ScriptAlias&#39;d to answer both as \/cgi-bin\/nagios and<br \/># \/nagios\/cgi-bin, which should make things work in both standard<br \/># and &quot;virtualhost&quot; style installs.<br \/>ScriptAlias \/cgi-bin\/nagios \/usr\/lib\/cgi-bin\/nagios<br \/>ScriptAlias \/nagios\/cgi-bin \/usr\/lib\/cgi-bin\/nagios<br \/># the following are from the heady days of netsaint.&nbsp; if you have<br \/># users who refuse to update their bookmarks, uncomment the next two<br \/># lines.<br \/>#ScriptAlias \/cgi-bin\/netsaint \/usr\/lib\/cgi-bin\/nagios<br \/>#ScriptAlias \/netsaint\/cgi-bin \/usr\/lib\/cgi-bin\/nagios<\/p>\n<p>&lt;DirectoryMatch \/usr\/lib\/cgi-bin\/nagios&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Options ExecCGI<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AllowOverride AuthConfig<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Order Allow,Deny<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Allow From All<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AuthName &quot;Nagios Access&quot;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AuthType Basic<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AuthUserFile \/etc\/nagios\/htpasswd.users<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; require valid-user<br \/>&lt;\/DirectoryMatch&gt;<\/p>\n<p># Where the stylesheets (config files) reside<br \/>Alias \/nagios\/stylesheets \/etc\/nagios\/stylesheets<\/p>\n<p># Enable this ScriptAlias if you want to enable the grouplist patch.<br \/># See http:\/\/apan.sourceforge.net\/download.html for more info<br \/># It allows you to see a clickable list of all hostgroups in the<br \/># left pane of the Nagios web interface<br \/>#ScriptAlias \/nagios\/side.html \/usr\/lib\/cgi-bin\/nagios\/grouplist.cgi<\/p>\n<p># Where the HTML pages live<br \/>Alias \/nagios \/usr\/share\/nagios\/htdocs<br \/>&lt;DirectoryMatch \/usr\/share\/nagios\/htdocs&gt;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Options FollowSymLinks<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AllowOverride AuthConfig<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Order Allow,Deny<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Allow From All<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AuthName &quot;Nagios Access&quot;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AuthType Basic<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AuthUserFile \/etc\/nagios\/htpasswd.users<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; require valid-user<br \/>&lt;\/DirectoryMatch&gt;<br \/># END FOR NAGIOS<\/font><\/font><\/p>\n<p><font color=\"#000000\">=&gt; Sauver le fichier, puis relancer Apache. <\/font><\/p>\n<p>Normalement, l&#39;interface web de nagios devrait r&eacute;pondre via l&#39;adresse :<br \/><font color=\"#0000ff\">http:\/\/votre_serveur.tld\/nagios<\/font><\/p>\n<p><u>User<\/u> : nagiosadmin<br \/><u>Pass<\/u> : votre mot de passe d&eacute;finit.<\/p>\n<p><strong>3) Installation des plugins <\/strong><\/p>\n<p>T&eacute;l&eacute;charger la derni&egrave;re version des plugins depuis :<br \/><font color=\"#0000ff\"><u>http:\/\/www.nagiosplugins.org\/<\/u><\/font><\/p>\n<p>version du tutos :<font color=\"#000080\">1.4.13:<\/font> <a href=\"http:\/\/freefr.dl.sourceforge.net\/sourceforge\/nagiosplug\/nagios-plugins-1.4.13.tar.gz\" target=\"_blank\" rel=\"noopener\">http:\/\/freefr.dl.sourceforge.net\/sourceforge\/nagiosplug\/nagios-plugins-1.4.13.tar.gz<\/a><\/p>\n<p>Mirror : <a href=\"http:\/\/luca.lovalvo.net\/download\/nagios-plugins-1.4.13.tar.gz\" target=\"_blank\" rel=\"noopener\">http:\/\/luca.lovalvo.net\/download\/nagios-plugins-1.4.13.tar.gz<\/a><\/p>\n<p>=&gt;<br \/><font color=\"#0000ff\">Wget : <a href=\"http:\/\/freefr.dl.sourceforge.net\/sourceforge\/nagiosplug\/nagios-plugins-1.4.13.tar.gz\" target=\"_blank\" rel=\"noopener\">http:\/\/freefr.dl.sourceforge.net\/sourceforge\/nagiosplug\/nagios-plugins-1.4.13.tar.gz<\/a><\/font><\/p>\n<p>=&gt;<font color=\"#0000ff\"> tar &ndash;xzf nagios-plugins-1.4.13.tar.gz<\/font><\/p>\n<p>=&gt; cd <font color=\"#0000ff\">nagios-plugins-1.4.13.tar.gz<\/font><\/p>\n<p>=&gt; <font color=\"#0000ff\">.\/configure<\/font> <\/p>\n<p>=&gt; On compile les fichiers : <font color=\"#0000ff\">Make<\/font> <\/p>\n<p>=&gt; On install : <font color=\"#0000ff\">Make install <\/font><\/p>\n<p>Il faudra ensuite configurer les groupes d&rsquo;h&ocirc;tes, les h&ocirc;tes et les services dans les fichiers de configuration de Nagios&#8230; et le tour est jou&eacute; \ud83d\ude42<\/p>\n<p><font color=\"#ff0000\">=&gt; Fini la grasse mat et les nuits tranquille \ud83d\ude42<\/font><\/p>\n<p><u>PS : Quelques emplacements clefs <\/u>:&nbsp;<\/p>\n<ul>\n<li>Fichiers de configuration de Nagios : \/etc\/nagios<\/li>\n<li>Fichiers de configuration des plugins : \/etc\/nagios-plugins\/config<\/li>\n<li>Ex&eacute;cutables des plugins : \/usr\/lib\/nagios\/plugins<\/li>\n<li>Pages HTML de l&rsquo;interface web : \/usr\/share\/nagios\/htdocs<\/li>\n<li>Emplacement des CGI de Nagios : \/usr\/lib\/cgi-bin\/nagios<\/li>\n<\/ul>\n<p>Voir aussi : <a href=\"http:\/\/luca.lovalvo.net\/1_luca_lo_valvo\/archive\/1939_installation_de_nagios_3_sans_passer_par_apt-get.html\">Installation de nagios sans passer par APT-GET<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Petite tutoriel expliquant bri&egrave;vement l&#39;installation de l&#39;outils de monitoring OpenSource Nagios Je parts du principe qu&#39;apache est install&eacute; et configur&eacute;.On qu&#39;on utilise l&#39;outil APT pour obtenir les packages.Et qu&#39;on est log&eacute; en SSH sur le serveur \ud83d\ude42 =&gt; Si apache n&#39;est pas install&eacute; : apt-get install apache2, et configurer son apache. 1) Installation&nbsp; de nagios [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,3],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-linux","category-serveur"],"_links":{"self":[{"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":1,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":289,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions\/289"}],"wp:attachment":[{"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}