lemonldap-ng/po-doc/fr/pages/documentation/current/status.html
2018-04-17 10:33:26 +02:00

212 lines
8.3 KiB
HTML

<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8" />
<title>documentation:2.0:status</title><!-- //if:usedebianlibs
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
//elsif:useexternallibs
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
//elsif:cssminified
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css" />
//else --><!-- //endif -->
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="index,follow"/>
<meta name="keywords" content="documentation,2.0,status"/>
<link rel="search" type="application/opensearchdescription+xml" href="lib/exe/opensearch.html" title="LemonLDAP::NG"/>
<link rel="start" href="status.html"/>
<link rel="contents" href="status.html" title="Sitemap"/>
<link rel="stylesheet" type="text/css" href="lib/exe/css.php.t.bootstrap3.css"/>
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.css" />
<script type="text/javascript">/*<![CDATA[*/var NS='documentation:2.0';var JSINFO = {"id":"documentation:2.0:status","namespace":"documentation:2.0"};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="lib/exe/js.php.t.bootstrap3.js"></script><!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.min.js"></script>
//else -->
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.js"></script><!-- //endif --><!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.min.js"></script>
//else -->
<script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.js"></script><!-- //endif -->
</head>
<body>
<div class="dokuwiki export container"><!-- TOC START -->
<div id="dw__toc">
<h3 class="toggle">Table of Contents</h3>
<div>
<ul class="toc">
<li class="level1"><div class="li"><a href="#portal_status_experimental">Portal Status (experimental)</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#configuration">Configuration</a></div></li>
</ul>
</li>
<li class="level1"><div class="li"><a href="#handler_status">Page de statut de l'agent</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#presentation">Présentation</a></div></li>
<li class="level2"><div class="li"><a href="#configuration1">Configuration</a></div>
<ul class="toc">
<li class="level3"><div class="li"><a href="#apache">Apache</a></div></li>
<li class="level3"><div class="li"><a href="#nginx">Nginx</a></div></li>
<li class="level3"><div class="li"><a href="#lemonldapng">LemonLDAP::NG</a></div></li>
</ul></li>
</ul></li>
</ul>
</div>
</div><!-- TOC END -->
<h1 class="sectionedit1" id="status_pages">Status pages</h1>
<div class="level1">
</div><!-- EDIT1 SECTION "Status pages" [1-28] -->
<h2 class="sectionedit2" id="portal_status_experimental">Portal Status (experimental)</h2>
<div class="level2">
<p>
The portal displays in JSON format its activity. Unlike handler, this is not the full activity of the server, but for now just the activity of 1 thread. This can give a view to all returned codes.
</p>
</div><!-- EDIT2 SECTION "Portal Status (experimental)" [29-268] -->
<h3 class="sectionedit3" id="configuration">Configuration</h3>
<div class="level3">
<p>
* Set <code>portalStatus = 1</code> in lemonldap-ng.ini file (section <code>[Portal]</code>)
* Protect <a href="http://portal/portalStatus" class="urlextern" title="http://portal/portalStatus" rel="nofollow">http://portal/portalStatus</a> using your webserver configuration
</p>
<p>
Status is displayed by calling this <abbr title="Uniform Resource Locator">URL</abbr>.
</p>
</div><!-- EDIT3 SECTION "Configuration" [269-485] -->
<h2 class="sectionedit4" id="handler_status">Page de statut de l'agent</h2>
<div class="level2">
<div class="noteimportant">Since 2.0, Handler status no more collects Portal returned codes.
</div>
</div><!-- EDIT4 SECTION "Handler Status" [486-603] -->
<h3 class="sectionedit5" id="presentation">Présentation</h3>
<div class="level3">
<p>
Lorsque la fonctionnalité "status" est activée, les agents et le portail collectent des statistiques et les sauvegardent dans le cache local Donc si plusieurs agents sont déployés, chacun gère ses propres statistiques.
</p>
<div class="notetip">Cette page peut être parcourue par exemple par <a href="http://oss.oetiker.ch/mrtg/" class="urlextern" title="http://oss.oetiker.ch/mrtg/" rel="nofollow">MRTG</a> en utilisant le <a href="mrtg.html" class="wikilink1" title="documentation:2.0:mrtg">script de surveillance MRTG</a>.
</div>
<p>
Ces statistiques sont collectées via un démon lancé par l'agent. Il peut être vu dans les processus du système, par exemple :
</p>
<pre class="code">perl -MLemonldap::NG::Handler::Status -I/etc/perl -I/usr/local/lib/perl/5.10.1 -I/usr/local/share/perl/5.10.1 -I/usr/lib/perl5 -I/usr/share/perl5 -I/usr/lib/perl/5.10 -I/usr/share/perl/5.10 -I/usr/local/lib/site_perl -I. -I/etc/apache2 -e &amp;Lemonldap::NG::Handler::Status::run(Cache::FileCache,{? 'cache_depth' =&gt; 5,? 'cache_root' =&gt; '/tmp',? 'directory_umask' =&gt; '007',? 'default_expires_in' =&gt; 600,? 'namespace' =&gt; 'MyNamespace'? }?);</pre>
<p>
Les statistiques sont affichées lors des appels au chemin du statut sur un agent (par exemple : <a href="http://test1.example.com/status" class="urlextern" title="http://test1.example.com/status" rel="nofollow">http://test1.example.com/status</a>).
</p>
<p>
Exemple de page de statut :
</p>
<p>
<a href="documentation/status_standard.png_documentation_2.0_status.html" class="media" title="documentation:status_standard.png"><img src="documentation/status_standard.png" class="mediacenter" alt="" /></a>
</p>
</div><!-- EDIT5 SECTION "Presentation" [604-1777] -->
<h3 class="sectionedit6" id="configuration1">Configuration</h3>
<div class="level3">
</div>
<h4 id="apache">Apache</h4>
<div class="level4">
<p>
Il faut autoriser l'accès au chemin du statut dans le configuration Apache de l'agent :
</p>
<pre class="code file apache"> <span class="co1"># Uncomment this to activate status module</span>
&lt;<span class="kw3">Location</span> /status&gt;
<span class="kw1">Order</span> <span class="kw1">deny</span>,<span class="kw1">allow</span>
<span class="kw1">Allow</span> from 127.0.0.0/<span class="nu0">8</span>
PerlHeaderParserHandler Lemonldap::NG::Handler-&gt;status
&lt;/<span class="kw3">Location</span>&gt;</pre>
<p>
Redémarrer Apache ensuite.
</p>
<div class="notetip">On peut changer la directive <code>Allow</code> pour réserver l'adresse <abbr title="Internet Protocol">IP</abbr> d'administration, ou utiliser une autre protection.
</div>
</div>
<h4 id="nginx">Nginx</h4>
<div class="level4">
<p>
You need to give access to status path in the Handler Nginx configuration:
</p>
<pre class="code file nginx">server {
listen __PORT__;
server_name reload.__DNSDOMAIN__;
root /var/www/html;
...
location = /status {
allow 127.0.0.1;
deny all;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:__FASTCGISOCKDIR__/llng-fastcgi.sock;
fastcgi_param LLTYPE status;
}
}</pre>
</div>
<h4 id="lemonldapng">LemonLDAP::NG</h4>
<div class="level4">
<p>
Éditer <code>lemonldap-ng.ini</code>, et activer le statut dans la section <code>handler</code> :
</p>
<pre class="code file ini"><span class="re0"><span class="br0">[</span>handler<span class="br0">]</span></span>
# Set status to <span class="nu0">1</span> if you want to have the report of activity <span class="br0">(</span>used for
# example to inform MRTG<span class="br0">)</span>
<span class="re1">status</span> <span class="sy0">=</span><span class="re2"> 1</span></pre>
<p>
Then restart webserver.
</p>
</div><!-- EDIT6 SECTION "Configuration" [1778-] -->
</div>
</body>
</html>