Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   Общий по FreeBSD (http://forum.oszone.net/forumdisplay.php?f=10)
-   -   мониторинг системы с помощью Nagios (http://forum.oszone.net/showthread.php?t=237450)

~user~ 28-06-2012 11:21 1941921

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

leonty 28-06-2012 14:24 1942065

nagios что в линуксе, что в фрибсд, что в солярке один и тот же.....

~user~ 28-06-2012 15:11 1942100

а как зайти в конфиг файл nagios по умолчанию? в лине sudo nano .................. .conf а здесь как?

leonty 28-06-2012 16:07 1942134

Цитата:

Цитата ~user~
sudo nano .................. .conf »

sudo ee .................. .conf
при условии, что судно установлено.

~user~ 28-06-2012 17:26 1942198

...

~user~ 29-06-2012 10:36 1942565

в /usr/local/etc/nagios/objects/ не нашел файла windows.cfg
Он там должен быть или мне самому нужно его создать и сконфигурировать?
строку cfg_file=/usr/local/nagios/etc/objects/windows.cfg
раскоментировал

exo 29-06-2012 11:09 1942587

Цитата:

Цитата ~user~
в /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 1942598

find / -name "windows.cfg"
пишет нет такого файла в директории

exo 29-06-2012 11:39 1942604

Цитата:

Цитата ~user~
пишет нет такого файла в директории »

значит он не создался во время установки. Создавайте вручную, пример я привёл.

~user~ 31-07-2012 21:00 1962328

там надо было вопрос с авторизацией решить. кстати во многих мануалах это нет.

exo 31-07-2012 21:02 1962330

в смысле с авторизацией?

~user~ 31-07-2012 21:40 1962357

http://system-administrators.info/?p=2721
вот в этой статье в конце написано
только там не написано как отменить аутентификацию.

exo 31-07-2012 21:59 1962368

это что ли?
Цитата:

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 1962407

да оно самое.

exo 01-08-2012 01:34 1962454

Цитата:

Цитата ~user~
да оно самое. »

что-то фря по-проще не становится...

~user~ 01-08-2012 09:27 1962562

Цитата:

Цитата exo
что-то фря по-проще не становится... »

Фря - это freebsd? а то я в "жаргоне" админском мало что понимаю.

exo 01-08-2012 11:24 1962624

Цитата:

Цитата ~user~
Фря - это freebsd? »

ага. Линь - это линукс.


Время: 20:44.

Время: 20:44.
© OSzone.net 2001-