User Tools

Site Tools


doc:appunti:linux:sa:cacti_122

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:appunti:linux:sa:cacti_122 [2022/03/25 17:37] – [Check passivo] niccolodoc:appunti:linux:sa:cacti_122 [2022/10/10 16:20] – [VirtualHost con SSL] niccolo
Line 361: Line 361:
         return "No check results received. Last result time: " + lastCheck         return "No check results received. Last result time: " + lastCheck
     }}     }}
-    check_interval = 1d  /* This determines the freshness of the check. */ +    check_interval = 1d +1h  /* This determines the freshness of the check. */ 
-    retry_interval = 1h  /* Execute the active check if freshness is due. */ +    retry_interval = 1h      /* Execute the active check if freshness is due. */ 
-    max_check_attempts = 3  /* Retry the active check some times, before notification. */+    max_check_attempts = 3   /* Retry the active check some times, before notification. */
     vars.notification_interval = 1d       vars.notification_interval = 1d  
 } }
Line 753: Line 753:
 check_http -H "www.first_domain.tld" -I "servername.rigacci.org" -S --sni -C "24,14" check_http -H "www.first_domain.tld" -I "servername.rigacci.org" -S --sni -C "24,14"
 </code> </code>
 +
 +===== Monitoraggio servizio CLAMD =====
 +
 +Il programma antivirus **[[http://www.clamav.net/|ClamAV]]** generalmente viene configurato in Debian come servizio **clamav-daemon.service**, l'eseguibile **clamd** è in esecuzione con i parametri configurati in **/etc/clamav/clamd.conf**. Per attivare il monitoraggio del servizio (si vuole sapere se il demone è in esecuzione) conviene usare il plugin **/usr/lib/nagios/plugins/check_clamd** fornito dal pacchetto **monitoring-plugins-basic**, che fa una semplice interrogazione su TCP/IP.
 +
 +Per impostazione predefinita clamd **non** si mette in ascolto sulla porta **TCP 3310**, è necessario aggiungere queste righe alla configurazione:
 +
 +<file>
 +# Listen also on TCP localhost, to allow running status check.
 +TCPSocket 3310
 +TCPAddr 127.0.0.1
 +</file>
 +
 +Il binding viene fatto solo su //localhost// in modo da non esporre il servizio antivirus all'esterno; pertanto il plugin Icinga deve essere eseguito in locale e il check da parte di un host remoto avvien tramite NRPE. Per ottenere questo si aggiunge in **/etc/nagios/nrpe_local.cfg**:
 +
 +<file>
 +command[check_clamd]=/usr/lib/nagios/plugins/check_clamd -H localhost
 +</file>
  
 ===== Riferimenti Web ===== ===== Riferimenti Web =====
doc/appunti/linux/sa/cacti_122.txt · Last modified: 2022/10/10 16:27 by niccolo