Erinevus lehekülje "Nagios" redaktsioonide vahel

Allikas: Kuutõrvaja
12. rida: 12. rida:
 
hosts.cfg
 
hosts.cfg
  
define host{
+
define host{
 
       use                    linux-server            ; Name of host template to usedefinition.
 
       use                    linux-server            ; Name of host template to usedefinition.
 
       host_name              ISP
 
       host_name              ISP
19. rida: 19. rida:
 
       parents                localhost
 
       parents                localhost
 
       }
 
       }
 
+
define host{
+
define host{
 
       use                    linux-server            ; Name of host template$
 
       use                    linux-server            ; Name of host template$
 
       host_name              www.tartu.ee
 
       host_name              www.tartu.ee
27. rida: 27. rida:
 
       parents                ISP
 
       parents                ISP
 
       }
 
       }
 
+
define host{
+
define host{
 
       use                    linux-server            ; Name of host template to usedefinition.
 
       use                    linux-server            ; Name of host template to usedefinition.
 
       host_name              mail.tartu.ee
 
       host_name              mail.tartu.ee
34. rida: 34. rida:
 
       address                ip
 
       address                ip
 
       parents                ISP
 
       parents                ISP
}
+
}
  
  
40. rida: 40. rida:
 
services.cfg
 
services.cfg
  
define service{
+
define service{
 
       use                            local-service        ; Name of service template to use
 
       use                            local-service        ; Name of service template to use
 
       host_name                      isp, www.tartu.ee, mail.tartu.ee
 
       host_name                      isp, www.tartu.ee, mail.tartu.ee
 
       service_description            PING
 
       service_description            PING
 
       check_command                  check_ping!100.0,20%!500.0,60%
 
       check_command                  check_ping!100.0,20%!500.0,60%
;       contact_groups  Helpdesk_c
+
       contact_groups  Helpdesk_c
 
       }
 
       }
  
53. rida: 53. rida:
  
  
 
+
define contact{
define contact{
 
 
       contact_name                    helpdesk_c
 
       contact_name                    helpdesk_c
 
       alias                          IT Helpdesk
 
       alias                          IT Helpdesk
65. rida: 64. rida:
 
       email                          helpdesk@tartu.ee
 
       email                          helpdesk@tartu.ee
 
       }
 
       }
 
+
define contact{
+
define contact{
 
       contact_name                    helpdesk_a
 
       contact_name                    helpdesk_a
 
       alias                          IT Helpdesk
 
       alias                          IT Helpdesk
77. rida: 76. rida:
 
       email                          helpdesk2@artu.ee
 
       email                          helpdesk2@artu.ee
 
       }
 
       }
 
+
define contactgroup{
+
define contactgroup{
 
       contactgroup_name      Helpdesk_c
 
       contactgroup_name      Helpdesk_c
 
       alias                  IT Helpdesk
 
       alias                  IT Helpdesk
 
       members                helpdesk_c
 
       members                helpdesk_c
 
       }
 
       }
 
+
define contactgroup{
+
define contactgroup{
 
       contactgroup_name      Helpdesk_a
 
       contactgroup_name      Helpdesk_a
 
       alias                  IT Helpdesk
 
       alias                  IT Helpdesk

Redaktsioon: 13. aprill 2007, kell 01:33

Sissejuhatus

Install

cd /usr/ports/net-mgmt/nagios && make install clean
cd /usr/ports/net-mgmt/nagios-plugins && make install clean


Konfime nagiose

hosts.cfg

define host{
      use                     linux-server            ; Name of host template to usedefinition.
      host_name               ISP
      alias                   ISP Ruuter
      address                 ip aadress
      parents                 localhost
      }

define host{
      use                     linux-server            ; Name of host template$
      host_name               www.tartu.ee
      alias                   veebiserver
      address                 ip
      parents                 ISP
      }

define host{
      use                     linux-server            ; Name of host template to usedefinition.
      host_name               mail.tartu.ee
      alias                   mailiserver
      address                 ip
      parents                 ISP
}


services.cfg

define service{
      use                             local-service         ; Name of service template to use
      host_name                       isp, www.tartu.ee, mail.tartu.ee
      service_description             PING
      check_command                   check_ping!100.0,20%!500.0,60%
      contact_groups  Helpdesk_c
      }

contacts.cfg

(siin pead defineerima kontaktid ja kontaktigrupi mis hõlab kontakte siis)


define contact{
      contact_name                    helpdesk_c
      alias                           IT Helpdesk
      service_notification_period     24x7
      host_notification_period        24x7
      service_notification_options    u,c,r
      host_notification_options       d,r
      service_notification_commands   notify-by-email
      host_notification_commands      host-notify-by-email
      email                           helpdesk@tartu.ee
      }

define contact{
      contact_name                    helpdesk_a
      alias                           IT Helpdesk
      service_notification_period     24x7
      host_notification_period        24x7
      service_notification_options    w,u,c,r
      host_notification_options       d,r
      service_notification_commands   notify-by-email
      host_notification_commands      host-notify-by-email
      email                           helpdesk2@artu.ee
      }

define contactgroup{
      contactgroup_name       Helpdesk_c
      alias                   IT Helpdesk
      members                 helpdesk_c
      }

define contactgroup{
      contactgroup_name       Helpdesk_a
      alias                   IT Helpdesk
      members                 helpdesk_a
      }



Konfime graafikud

Kasutame Nagios Grapherit tööks. Koduleht http://www.nagiosexchange.org/NagiosGrapher.84.0.html

Esimesena tõmbame selle alla.

http://www.nagiosexchange.org/42;195

tar -xf NagiosGrapher-1.6.1-rc2.tar.bz2
cd NagiosGrapher-1.6.1-rc2

lisame faili config.layout read

# default FreeBSD
<Layout freebsd>
 prefix:                               /usr/local/nagios
 nagios_config:                /usr/local/etc/nagios.cfg
 nagios_config_cgi:    /usr/local/etc/cgi.cfg
 nagios_images:                /usr/local/www/nagios/images
 nagios_images_logos:  /usr/local/www/nagios/images/logos
 nagios_folder_cgi: /usr/local/www/nagios/cgi-bin
 perl_inc:                             /usr/local/lib/perl5/5.8.8/
 nagios_contribution:  /usr/local/nagios_grapher/contrib
 ng_config:                    /usr/local/etc/nagios_ng
 ng_config_sub:                /usr/local/etc/nagios_ng/ngraph.d
 ng_daemon:                    /usr/local/nagios_grapher
 ng_srvext_file:               /usr/local/etc/nagios_ng/serviceextinfo.cfg
 ng_srvext_dir:                /usr/local/etc/nagios_ng/serviceext
 ng_interface_pipe:    /var/spool/nagios/rw/ngraph.pipe
 ng_logfile:                   /var/log/ngraph.log
 ng_rrd:                       /var/spool/nagios/rrd
</Layout>

ja kirjutame

autoconf
 ./configure --with-layout=freebsd
make testdeps

arvatavasti teatatakse puuduvast tarkusest niisiis kirjutame

make fixdeps
make install

ImageMagick ei installita vaid ainult cpanel asjad make fixdeps'iga nii peame

cd /usr/ports/graphics/ImageMagick
make install clean

ja rrdtool graafikuteks

cd /usr/ports/net/rrdtool
make install clean


Lingid