doc:appunti:linux:sa:pnp4nagios
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:linux:sa:pnp4nagios [2025/05/23 10:15] – niccolo | doc:appunti:linux:sa:pnp4nagios [2025/05/23 11:07] (current) – [Compiling and installing pnp4nagios] niccolo | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== pnp4nagios con Icinga2 ====== | ====== pnp4nagios con Icinga2 ====== | ||
| + | |||
| + | Il sistema di riferimento è una **Debian 12 Bullseye**, dove è installato **Icinga2** versione **2.13.6** e **Icingaweb2** versione **2.11.4**. Le componenti software da installare non disponibili come pacchetto Debian sono: | ||
| + | |||
| + | * **pnp4nagios** | ||
| + | * **Icingaweb2 PNP module** | ||
| ===== Abilitare i performance data in Icinga 2 ===== | ===== Abilitare i performance data in Icinga 2 ===== | ||
| Line 17: | Line 22: | ||
| * I collector di questi dati devono provvedere ad eliminarli. | * I collector di questi dati devono provvedere ad eliminarli. | ||
| * Il collector di pnp4nagios è **/ | * Il collector di pnp4nagios è **/ | ||
| - | * Vedere più avanti come attivare NPCD che esegue il collector. | + | * Vedere più avanti come attivare NPCD, il demone |
| * I dati processati da NPCD vengono messi in **/ | * I dati processati da NPCD vengono messi in **/ | ||
| + | ===== Installing Icingaweb2 PNP module ===== | ||
| + | |||
| + | < | ||
| + | wget -O icingaweb2-module-pnp-1.1.0.zip \ | ||
| + | https:// | ||
| + | unzip icingaweb2-module-pnp-1.1.0.zip | ||
| + | mkdir -p / | ||
| + | mv icingaweb2-module-pnp-1.1.0 / | ||
| + | ln -s / | ||
| + | icingacli module enable pnp | ||
| + | </ | ||
| + | |||
| + | ===== Compiling and installing pnp4nagios ===== | ||
| + | |||
| + | |||
| + | < | ||
| + | apt-get install build-essential | ||
| + | apt-get install librrds-perl | ||
| + | cd / | ||
| + | wget -O pnp4nagios-0.6.27-5.zip \ | ||
| + | https:// | ||
| + | unzip pnp4nagios-0.6.27-5.zip | ||
| + | cd pnp4nagios-0.6.27-5/ | ||
| + | ./configure | ||
| + | </ | ||
| + | |||
| + | Verificare che la configurazione vada a buon fine, in particolare: | ||
| + | |||
| + | < | ||
| + | General Options: | ||
| + | ------------------------- | ||
| + | Nagios user/ | ||
| + | Install ${prefix}: | ||
| + | PNP HTML dir: / | ||
| + | Config dir: / | ||
| + | rrdtool binary: | ||
| + | RRDs Perl Modules: | ||
| + | RRD Files stored in: / | ||
| + | process_perfdata Logfile: | ||
| + | NPCD perfdata stored in: / | ||
| + | fontconfig cache dir: / | ||
| + | |||
| + | Web Interface Options: | ||
| + | ------------------------- | ||
| + | HTML URL: | ||
| + | http user/ | ||
| + | put pnp http config File: / | ||
| + | </ | ||
| + | |||
| + | Effettuare la compilazione: | ||
| + | |||
| + | < | ||
| + | make all | ||
| + | </ | ||
| + | |||
| + | Ci sono questi due install target: | ||
| + | |||
| + | ^ make install | ||
| + | ^ make fullinstall | ||
| + | |||
| + | < | ||
| + | # Installare tutto quanto in / | ||
| + | cd / | ||
| + | make install | ||
| + | |||
| + | # Creare un link per la configurazione in /etc/. | ||
| + | ln -s / | ||
| + | |||
| + | # Creare la configurazione per Apache. | ||
| + | cp -p sample-config/ | ||
| + | |||
| + | # Creare file di autenticazione e aggiustare il percorso del AuthUserFile. | ||
| + | htpasswd -c / | ||
| + | vi / | ||
| + | |||
| + | # Abilitare la configurazione di Apache. | ||
| + | a2enconf pnp4nagios | ||
| + | systemctl reload apache2 | ||
| + | </ | ||
| + | |||
| + | ==== Verifica requisiti ==== | ||
| + | |||
| + | Verificare che esista il file **/ | ||
| + | |||
| + | Visitare l'URL **%%http:< | ||
| + | |||
| + | Se tutto va bene rinominare il file: | ||
| + | |||
| + | < | ||
| + | mv / | ||
| + | </ | ||
| + | |||
| + | ==== Demone NPCD ==== | ||
| + | |||
| + | Creare la configurazione per il demone NPCD: | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | cp -p sample-config/ | ||
| + | chown nagios: | ||
| + | </ | ||
| + | |||
| + | Modificare il file **/ | ||
| + | |||
| + | < | ||
| + | # | ||
| + | perfdata_spool_dir = / | ||
| + | </ | ||
| + | |||
| + | Il '' | ||
| + | |||
| + | < | ||
| + | systemctl enable --now npcd.service | ||
| + | </ | ||
| + | |||
| + | ===== Web Resources ===== | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
doc/appunti/linux/sa/pnp4nagios.1747988123.txt.gz · Last modified: by niccolo
