Mudanças entre as edições de "NCPA"
(Uma revisão intermediária pelo mesmo usuário não estão sendo mostradas) | |||
Linha 5: | Linha 5: | ||
2 - Instalar o NCPA<br /> | 2 - Instalar o NCPA<br /> | ||
− | yum install ncpa -y<br /> | + | Baixar o o pacote em:<br /> |
+ | wget https://assets.nagios.com/downloads/ncpa/ncpa-2.1.6.el7.x86_64.rpm<br /> | ||
+ | yum install ncpa -y<br /><br /> | ||
3 - Para verificar o serviço<br /> | 3 - Para verificar o serviço<br /> | ||
Linha 14: | Linha 16: | ||
5 - Colocar as info de check passivo para o daemon<br /> | 5 - Colocar as info de check passivo para o daemon<br /> | ||
+ | [passive]<br /> | ||
+ | handlers = nrdp<br /> | ||
[nrdp]<br /> | [nrdp]<br /> | ||
parent = https://srvlupa.linea.gov.br/nrdp/<br /> | parent = https://srvlupa.linea.gov.br/nrdp/<br /> |
Edição atual tal como às 15h55min de 1 de março de 2019
Instalando o NCPA para Check Passivo do Nagios
1 - Instalar o epel-release
yum install epel-release -y
2 - Instalar o NCPA
Baixar o o pacote em:
wget https://assets.nagios.com/downloads/ncpa/ncpa-2.1.6.el7.x86_64.rpm
yum install ncpa -y
3 - Para verificar o serviço
systemctl status ncpa_passive
4 - Editar o arquivo de configuração:
vim /usr/local/ncpa/etc/ncpa.cfg
5 - Colocar as info de check passivo para o daemon
[passive]
handlers = nrdp
[nrdp]
parent = https://srvlupa.linea.gov.br/nrdp/
token = senhadeacesso
hostname = nomedoservidor
[plugin directives]
plugin_path = /usr/lib64/nagios/plugins/
6 - Configurar quais os checks serão feitos no host
vim /usr/local/ncpa/etc/ncpa.cfg.d/monitor.cfg
7 - Colocar as entradas:
[passive checks]
%HOSTNAME%|__HOST__ = system/agent_version
%HOSTNAME%|CPU Usage = cpu/percent --warning 60 --critical 80 --aggregate avg
%HOSTNAME%|Swap Usage = memory/swap --warning 60 --critical 80 --units Gi
%HOSTNAME%|Memory Usage = memory/virtual --warning 80 --critical 90 --units Gi
%HOSTNAME%|Process Count = processes --warning 300 --critical 400
%HOSTNAME%|Root Disk Usage = disk/logical/|/used_percent --warning 80 --critical 90
%HOSTNAME%|Uptime = plugins/check_uptime
%HOSTNAME%|Conected Users = plugins/check_users/-w/5/-c/10
8 - Configurar o serviço de NRDP no Servidor Nagios
define host {
use generic-host name passive_host active_checks_enabled 0 passive_checks_enabled 1 flap_detection_enabled 0 register 0 check_period 24x7 max_check_attempts 1 check_interval 5 retry_interval 1 check_freshness 1 freshness_threshold 300 check_command check_dummy!2
}
define service {
use generic-service name passive_service active_checks_enabled 0 passive_checks_enabled 1 flap_detection_enabled 1 register 0 check_period 24x7 max_check_attempts 1 check_interval 5 retry_interval 1 check_freshness 1 freshness_threshold 300 check_command check_dummy!2
}
9 - Modelo de configuração de Check de Host e Services
define host{
use passive_host host_name webbackpassive alias Servidor Teste Passive parents gwicx icon_image centos.gif vrml_image centos.png statusmap_image centos.gd2 contact_groups admins notification_period 24x7 }
define service {
use passive_service contact_groups admins service_description CPU Usage host_name webbackpassive
}
define service {
use passive_service contact_groups admins service_description Root Disk Usage host_name webbackpassive
}
define service {
use passive_service contact_groups admins service_description Swap Usage host_name webbackpassive
}