Nagios3

Fra SemarkIT
Skift til: Navigation, Søgning
apt-get install nagios3
htpasswd -c /etc/nagios3/htpasswd.users XXuserXX
vi /etc/nagios3/cgi.cfg
   # authorized_for_system_information=nagiosadmin
   authorized_for_system_information=*
   authorized_for_all_services=*
   authorized_for_all_hosts=*
   ... osv ...

i nagios.cfg tilføjes mapper med konfigurationsfiler

cfg_dir=/etc/nagios3/udstyr

check_external_commands=1


f.eks. i udstyrsmappen tilføjes følgende for hvert udstyr der skal checkes i en fil med et "sigende navn"

define host{
       host_name                       laeseligtNavn 
       address                         dnsnavn.doaene.dk
       check_command                   check_http
       max_check_attempts              5
       contact_groups                  admins
       notification_interval           1440
       }
# 'check_imaps' command definition
define command{
       command_name    check_imaps
       command_line    /usr/lib/nagios/plugins/check_tcp -H '$HOSTADDRESS$' -p 993
       }


/etc/init.d/nagios3 stop
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start


/etc/nagios-plugins/config/disk.cfg:

# 'smart_disk' command definition
define command {
       command_name   smart_disk
       command_line   /bin/bash -c "/usr/lib/nagios/plugins/check_ide_smart -n -d '$ARG1$'"
}



define service {
       use                             generic-service
       host_name                       localhost
       service_description             SMART sda
       check_command                   smart_disk!/dev/sda
	notification_interval           1440
}
sudo vi /etc/sudoers:

nagios ALL=NOPASSWD: /bin/bash -c /usr/lib/nagios/plugins/check_ide_smart *
Personlige værktøjer
Navnerum

Varianter
Handlinger
Navigation
Værktøjer