Bu Blogda Ara

23 Ağustos 2010 Pazartesi

Windows client Nagios' a nasıl eklenir.

Aşağıdaki linkten windows makinenizin mimarisine uygun en stabil NSClient yazılımını indirin.

http://nsclient.org/nscp/downloads

Yazılımı windows' a kurulum esnasında prosedürleri geçtikten sonra size nagios un kurulu olduğu ip numarasını soracak. Bu güvenlik için gerekli. Kutucuğa a nagios ip numarasını girelim. Bu kutucuğum hemen altında bulunan NSClient Password kısmını doldurmak isteğe bağlıdır. Ben password vermeden geçiyorum. Bir altta bulunan yüklenmesi gereken modüllerden "check_nt" işaretleyin. Ve NSClient servisini başlatarak kurulumu tamamlayın.

Şimdi Nagios tarafına geçelim;
vi /usr/local/nagios/etc/nagios.cfg

bu conf file' a şu satırı ekleyin,

cfg_dir=/usr/local/nagios/etc/objects/win

:wq ile kayıt edin.
şimdi bu dizine geçelim;

cd /usr/local/nagios/etc/objects/win

bu dizinde bir config file oluşturalım,

vi windows_hostname.cfg

içerik olarak şu satırları kopyalayabilirsiniz.

________________________________________
define host{
use generic-host
host_name windows_hostname
alias ofisteki file server vs ...
address 192.168.1.10
}

define service{
use generic-service
host_name windows_hostname
service_description Version
check_command check_nt!CLIENTVERSION
contact_groups sistem_windows
}

define service{
use generic-service
host_name windows_hostname
service_description Uptime
check_command check_nt!UPTIME
}

define service{
use generic-service
host_name windows_hostname
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}

define service{
use generic-service
host_name windows_hostname
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}

define service{
use generic-service
host_name windows_hostname
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}

define service{
use generic-service
host_name windows_hostname
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
}
____________________________________________________________________



:wq ile yaptıklarınızı kaydedin.
Bu haliyle nagios config test yapın ;

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg


ve nagios' u restart edin;

Contact bilgisini sunucu config file de her servise ekleyebilirsiniz.
örnek:

define service{
use generic-service
host_name windows_hostname
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
contact_groups sistem_windows
}

NFS mount sorunu

Nfs mount etmeye çalışırken aşağıdaki hatayı alabilirsiniz.

mount: wrong fs type, bad option, bad superblock on xxxx:/vol/yyy
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

çözüm :

yum install portmap
/etc/init.d/portmap start
chkconfig portmap on

yum install nfs-utils

kurulumun ardından tekrar deneyin.

17 Ağustos 2010 Salı