Войти

Показать полную графическую версию : мониторинг системы с помощью Nagios


~user~
28-06-2012, 11:21
Всем привет. Есть Nagios нужно добавить хосты виндовс для мониторинга. Установил на винду NSclient. Как добавить хосты windows в nagios??
Nagios стоит на FReeBSD 9.0
Линукс чуть чуть знаю, но с фриБСД дело никогда не имел.
Версия Nagios 3.4.1

leonty
28-06-2012, 14:24
nagios что в линуксе, что в фрибсд, что в солярке один и тот же.....

~user~
28-06-2012, 15:11
а как зайти в конфиг файл nagios по умолчанию? в лине sudo nano .................. .conf а здесь как?

leonty
28-06-2012, 16:07
sudo nano .................. .conf »
sudo ee .................. .conf
при условии, что судно установлено.

~user~
28-06-2012, 17:26
...

~user~
29-06-2012, 10:36
в /usr/local/etc/nagios/objects/ не нашел файла windows.cfg
Он там должен быть или мне самому нужно его создать и сконфигурировать?
строку cfg_file=/usr/local/nagios/etc/objects/windows.cfg
раскоментировал

exo
29-06-2012, 11:09
в /usr/local/etc/nagios/objects/ не нашел файла windows.cfg »
find / -name "windows.cfg"

мой виндовый.кфг для одного сервера:

###############################################################################
# WINDOWS.CFG - SAMPLE CONFIG FILE FOR MONITORING A WINDOWS MACHINE
#
# Last Modified: 06-13-2007
#
# NOTES: This config file assumes that you are using the sample configuration
# files that get installed with the Nagios quickstart guide.
#
###############################################################################




###############################################################################
###############################################################################
#
# HOST DEFINITIONS
#
###############################################################################
###############################################################################

# Define a host for the Windows machine we'll be monitoring
# Change the host_name, alias, and address to fit your situation

define host{
use windows-server ; Inherit default values from a template
host_name blinky ; The name we're giving to this host
alias BLINKY ; A longer name associated with the host
address 192.168.10.1 ; IP address of the host
}




###############################################################################
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
###############################################################################


# Define a hostgroup for Windows machines
# All hosts that use the windows-server template will automatically be a member of this group

define hostgroup{
hostgroup_name windows-servers ; The name of the hostgroup
alias Windows Servers ; Long name of the group
}




###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################


# Create a service for monitoring the version of NSCLient++ that is installed
# Change the host_name to match the name of the host you defined above

define service{
use generic-service
host_name blinky
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}



# Create a service for monitoring the uptime of the server
# Change the host_name to match the name of the host you defined above

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



# Create a service for monitoring CPU load
# Change the host_name to match the name of the host you defined above

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



# Create a service for monitoring memory usage
# Change the host_name to match the name of the host you defined above

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



# Create a service for monitoring C:\ disk usage
# Change the host_name to match the name of the host you defined above

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

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

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



# Create a service for monitoring the W3SVC service
# Change the host_name to match the name of the host you defined above

#define service{
# use generic-service
# host_name winserver
# service_description W3SVC
# check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
# }



# Create a service for monitoring the Explorer.exe process
# Change the host_name to match the name of the host you defined above

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

только диски не мониторит все, а один 3 раза... пока не разбирался с этим.

~user~
29-06-2012, 11:25
find / -name "windows.cfg"
пишет нет такого файла в директории

exo
29-06-2012, 11:39
пишет нет такого файла в директории »
значит он не создался во время установки. Создавайте вручную, пример я привёл.

~user~
31-07-2012, 21:00
там надо было вопрос с авторизацией решить. кстати во многих мануалах это нет.

exo
31-07-2012, 21:02
в смысле с авторизацией?

~user~
31-07-2012, 21:40
http://system-administrators.info/?p=2721
вот в этой статье в конце написано
только там не написано как отменить аутентификацию.

exo
31-07-2012, 21:59
это что ли?
AuthName "Nagios Access"

AuthType Basic

AuthUserFile /usr/local/nagios/etc/htpasswd.users

require valid-user

я делал по этой статье:
http://system-administrators.info/?p=2619

~user~
31-07-2012, 23:33
да оно самое.

exo
01-08-2012, 01:34
да оно самое. »
что-то фря по-проще не становится...

~user~
01-08-2012, 09:27
что-то фря по-проще не становится... »
Фря - это freebsd? а то я в "жаргоне" админском мало что понимаю.

exo
01-08-2012, 11:24
Фря - это freebsd? »
ага. Линь - это линукс.




© OSzone.net 2001-2012