NRPE » Historique » Version 1
Patrice Nadeau, 2017-04-29 11:18
| 1 | 1 | Patrice Nadeau | h1. NRPE |
|---|---|---|---|
| 2 | |||
| 3 | h2. Nagios Remote Plugin Executor |
||
| 4 | |||
| 5 | > https://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details |
||
| 6 | |||
| 7 | Ce « add-on » se divise en deux parties |
||
| 8 | * Le « plugin » _check_nrpe_ qui roule sur le serveur Nagios pour exécuter les vérifications sur des machines distantes. |
||
| 9 | * Le deamon _nrpe_ qui roule comme agent sur la machine sous surveillance |
||
| 10 | |||
| 11 | h3. Téléchargement |
||
| 12 | |||
| 13 | <pre><code class="bash"> |
||
| 14 | mkdir ~/tmp |
||
| 15 | cd ~/tmp |
||
| 16 | wget https://github.com/NagiosEnterprises/nrpe/archive/nrpe-3.1.0.tar.gz |
||
| 17 | # Décompresse le fichier |
||
| 18 | tar xvf nrpe-3.1.0.tar.gz |
||
| 19 | cd nrpe-nrpe-3.1.0 |
||
| 20 | </code></pre> |
||
| 21 | |||
| 22 | h3. check_nrpe |
||
| 23 | |||
| 24 | <pre><code class="bash"> |
||
| 25 | # openSUSE |
||
| 26 | ./configure |
||
| 27 | # Debian |
||
| 28 | ./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/arm-linux-gnueabihf |
||
| 29 | # All Linux |
||
| 30 | make clean |
||
| 31 | make check_nrpe |
||
| 32 | make install-plugin |
||
| 33 | </code></pre> |
||
| 34 | |||
| 35 | Un fois compilés, les exécutables ne sont pas copiés au bons endroits. On doit donc le faire manuellement. |
||
| 36 | |||
| 37 | openSUSE: |
||
| 38 | <pre><code class="bash"> |
||
| 39 | mkdir -p /usr/local/nagios/libexec |
||
| 40 | cp src/check_nrpe /usr/local/nagios/libexec |
||
| 41 | cp sample-config/nrpe.cfg /etc |
||
| 42 | </code></pre> |
||
| 43 | |||
| 44 | Debian/Ubuntu : |
||
| 45 | <pre><code class="bash"> |
||
| 46 | sudo cp src/check_nrpe /usr/local/nagios/libexec |
||
| 47 | cp sample-config/nrpe.cfg /etc |
||
| 48 | </code></pre> |
||
| 49 | |||
| 50 | h5. nrpe |
||
| 51 | |||
| 52 | <pre><code class="bash"> |
||
| 53 | # openSUSE |
||
| 54 | ./configure |
||
| 55 | # All Linux |
||
| 56 | make clean |
||
| 57 | make nrpe |
||
| 58 | make install-daemon |
||
| 59 | make install-config |
||
| 60 | make install-init |
||
| 61 | systemctl enable nrpe.service |
||
| 62 | systemctl start nrpe.service |
||
| 63 | </code></pre> |