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