alex Posted June 30, 2012 Report Posted June 30, 2012 Pasul 1Instalam nagios3.# apt-get install nagios3 Pasul 2Decomentam cateva linii cod in fisierul cgi.cfg.# nano /etc/nagios3/cgi.cfg cgi.cfgmain_config_file=/etc/nagios3/nagios.cfgphysical_html_path=/usr/share/nagios3/htdocsurl_html_path=/nagios3show_context_help=1use_pending_states=1nagios_check_command=/usr/lib/nagios/plugins/check_nagios/var/cache/nagios3/status.dat5 '/usr/sbin/nagios3'use_authentication=1use_ssl_authentication=0default_user_name=guestauthorized_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.gd2color_transparency_index_r=255color_transparency_index_g=255color_transparency_index_b=255default_statusmap_layout=5default_statuswrl_layout=4statuswrl_include=myworld.wrlping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$refresh_rate=90escape_html_tags=1host_unreachable_sound=hostdown.wavhost_down_sound=hostdown.wavservice_critical_sound=critical.wavservice_warning_sound=warning.wavservice_unknown_sound=warning.wavnormal_sound=noproblem.wavaction_url_target=_blanknotes_url_target=_blanklock_author_names=1 Pasul 3Adaugam 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 routedefine 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 4Trecem 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.cfgdefine 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 petrisor.ciocoiu@yahoo.com } Pasul 5Cream user si parola pentru monitorizarea nagios.# htpasswd -c htpasswd.users nagios Pasul 6Ne conectam la interfata nagios http://domeniul.com/nagios3 sau in cazul meu http://slashlinux.info/nagios3. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.