Instalam nagios3.
# apt-get install nagios3
Pasul 2
Decomentam cateva linii cod in fisierul cgi.cfg.
# nano /etc/nagios3/cgi.cfg
cgi.cfg
main_config_file=/etc/nagios3/nagios.cfg physical_html_path=/usr/share/nagios3/htdocs url_html_path=/nagios3 show_context_help=1 use_pending_states=1 nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/cache/nagios3/status.dat 5 '/usr/sbin/nagios3' use_authentication=1 use_ssl_authentication=0 default_user_name=guest authorized_for_system_information=* authorized_for_configuration_information=* authorized_for_system_commands=* authorized_for_all_services=* authorized_for_all_hosts=* authorized_for_all_service_commands=* authorized_for_all_host_commands=* statusmap_background_image=smbackground.gd2 color_transparency_index_r=255 color_transparency_index_g=255 color_transparency_index_b=255 default_statusmap_layout=5 default_statuswrl_layout=4 statuswrl_include=myworld.wrl ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$ refresh_rate=90 escape_html_tags=1 host_unreachable_sound=hostdown.wav host_down_sound=hostdown.wav service_critical_sound=critical.wav service_warning_sound=warning.wav service_unknown_sound=warning.wav normal_sound=noproblem.wav action_url_target=_blank notes_url_target=_blank lock_author_names=1
Pasul 3
Adaugam hosturile pe care vrem sa le monitorizam.
# nano /etc/nagios3/conf.d/host-gateway_nagios3.cfg
host-gateway_nagios3.cfg
# a host definition for the gateway of the default route
define host {
host_name tutorialelinux.info
alias tutorialelinux
address 192.168.1.1
use generic-host
}
define service {
use generic-service
host_name tutorialelinux.info
service_description SSH
check_command check_ssh_port!22!server
}
define service {
use generic-service
host_name tutorialelinux.info
service_description HTTP
check_command check_http
}
define host {
host_name slashlinux.info
alias serveru meu
address 192.168.1.2
use generic-host
}
define service {
use generic-service
host_name slashlinux.info
service_description SSH
check_command check_ssh_port!22!server
}
define service {
use generic-service
host_name slashlinux.info
service_description HTTP
check_command check_http
} Pasul 4
Trecem adresa de mail in fisierul /etc/nagios3/conf.d/contacts_nagios2.cfg pentru a primi informatii in legatura cu statusul echipamentelor.
# nano /etc/nagios3/conf.d/contacts_nagios2.cfg
contacts_nagios2.cfg
define contact{
contact_name root
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email [email protected]
}Pasul 5
Cream user si parola pentru monitorizarea nagios.
# htpasswd -c htpasswd.users nagios
Pasul 6
Ne conectam la interfata nagios http://domeniul.com/nagios3 sau in cazul meu http://slashlinux.info/nagios3.

Sign In
Create Account


Back to top
Report