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
doc:appunti:linux:sa:cacti_122 [2022/10/10 16:20] – [VirtualHost con SSL] niccolodoc:appunti:linux:sa:cacti_122 [2022/10/10 16:27] (current) – [Monitoraggio servizio CLAMD] niccolo
Line 772: Line 772:
 </file> </file>
  
 +Sul server Icinga2 si deve definire il **servizio** aggiungendo in **/etc/icinga2/conf.d/local/services.conf** la seguente sezione:
 +
 +<file>
 +apply Service "CLAMD Service" {
 +    import "generic-service"
 +    check_command = "mail_check_nrpe_clamd"
 +    assign where host.vars.nrpe_clamd
 +}
 +</file>
 +
 +Quindi si aggiunge il comando aggiungendo in **/etc/icinga2/conf.d/local/commands.conf** la seguente sezione:
 +
 +<file>
 +object CheckCommand "mail_check_nrpe_clamd" {
 +    command = [ PluginDir + "/check_nrpe", "--timeout=60:UNKNOWN" ]
 +    arguments = {
 +        "-H" = "$address$"
 +        "-c" = "check_clamd"
 +        "-n" = { set_if = "$nrpe_no_ssl$" }
 +    }
 +}
 +</file>
 +
 +Infine nella sezione **host** relativa all'host da monitorare (potrebbe essere nel file **/etc/icinga2/conf.d/hosts.conf**), si aggiunge la riga:
 +
 +<file>
 +object Host "clamav-hostname" {
 +  ...
 +  vars.nrpe_clamd = true
 +  ...
 +}
 +</file>
 ===== Riferimenti Web ===== ===== Riferimenti Web =====
  
doc/appunti/linux/sa/cacti_122.txt · Last modified: 2022/10/10 16:27 by niccolo