Установка и настройка Nagios

Проблемы с установкой, настройкой и работой системных и сетевых программ.

Модераторы: GRooVE, alexco

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Lion
рядовой
Сообщения: 16
Зарегистрирован: 2008-05-17 11:02:05

Установка и настройка Nagios

Непрочитанное сообщение Lion » 2008-05-17 11:29:32

Всем привет ! Прошу помощи в настройке НАГИОСА ...
1) Апатч22 установлен - работает
2) Мускул - работает
3) Нагиос установлен из портов, запускается
4) Создал даже юзеров
5) При входе в нагиос выдаётся окно с логином и паролем, ввожу , и тут You don't have permission to access /nagios/ on this server.
6) Что изначально меня смущает, так это то , что в дерриктории /usr/local/etc/nagios лежат не вс файлы какие должны быть, а это
cgi.cfg
commands.cfg
default.cfg
htpasswd.users
server.host
Дефолтных я вообще не вижу. Почему их нет ? В чём моя ошибка ? Что я не сделал ?

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

paix
лейтенант
Сообщения: 863
Зарегистрирован: 2007-09-24 12:41:05
Откуда: dn.ua
Контактная информация:

Re: Установка и настройка Nagios

Непрочитанное сообщение paix » 2008-05-17 13:23:24

там все в localhost.cfg кури его.

логин апачевской авторизации должен совпадать с именем контакта(логина) в contactgroups.cfg (см соотвеств. секцию в локалхост.кфг)

мускиль для второго нагиоса ненужен.
With best wishes, Sergej Kandyla

Lion
рядовой
Сообщения: 16
Зарегистрирован: 2008-05-17 11:02:05

Re: Установка и настройка Nagios

Непрочитанное сообщение Lion » 2008-05-17 13:34:46

Ещё одна запарка при make

Код: Выделить всё

Stop in /usr/ports/graphics/gd/work/gd-2.0.35.
*** Error code 1

Stop in /usr/ports/graphics/gd/work/gd-2.0.35.
*** Error code 1

Stop in /usr/ports/graphics/gd.
*** Error code 1

Stop in /usr/ports/net-mgmt/nagios.
*** Error code 1

Stop in /usr/ports/net-mgmt/nagios.
В том то и дело , что нет такого localhost.cfg
Последний раз редактировалось hizel 2008-05-17 16:22:23, всего редактировалось 1 раз.
Причина: [code][/code]

Аватара пользователя
hizel
дядя поня
Сообщения: 9032
Зарегистрирован: 2007-06-29 10:05:02
Откуда: Выборг

Re: Установка и настройка Nagios

Непрочитанное сообщение hizel » 2008-05-17 16:24:06

1.
вы из какого порта nagios ставили?
2.
VirtualHost как дока завещает в апаче прописан?
3.

Код: Выделить всё

ls -al /usr/local/etc/nagios
неплохо было бы посмотреть
4.
пользуйтесь кнопочкой code
5.
ваш лог ошибок неполный, что там выше было?

;)
В дурацкие игры он не играет. Он просто жуткий, чу-чу, паровозик, и зовут его Блейн. Блейн --- это Боль.

Lion
рядовой
Сообщения: 16
Зарегистрирован: 2008-05-17 11:02:05

Re: Установка и настройка Nagios

Непрочитанное сообщение Lion » 2008-05-18 9:14:29

to hizel
1. /usr/ports/net-mgmt/nagios (Nagios 2.11)
2. НАстройки Виртуал хоста не трогал в апатче, в httpd.conf добавлял только

Код: Выделить всё

<Directory />
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

ScriptAlias /nagios/cgi-bin /usr/local/www/nagios/cgi-bin/

<Directory "/usr/local/www/nagios">
    Options ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/etc/nagios/htpasswd.users
    Require valid-user
</Directory>

Alias /nagios /usr/local/www/nagios/

<Directory "/usr/local/www/nagios/cgi-bin">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/etc/nagios/htpasswd.users
    Require valid-user
</Directory>
Делалось по инструкции http://www.lissyara.su/?id=1523
Что необходимо сделать в этом случае ещё ?

3. Смотрите

Код: Выделить всё

-rwxrwxrwx  1 root  wheel   959 May  6 03:26 cgi.cfg
-rwxrwxrwx  1 root  wheel   156 May  6 03:27 commands.cfg
-rwxrwxrwx  1 root  wheel  5910 May  6 03:31 default.cfg
-rw-r--r--  1 root  wheel    19 May 16 17:57 htpasswd.users
-rwxrwxrwx  1 root  wheel  2682 May 16 17:54 server.host
4. Лог этот что ли ?

Код: Выделить всё

make
===>   nagios-2.11 depends on file: /usr/local/bin/perl5.8.8 - found
===>   nagios-2.11 depends on file: /usr/local/bin/autoconf-2.61 - found
===>   nagios-2.11 depends on shared library: gd.4 - not found
===>    Verifying install for gd.4 in /usr/ports/graphics/gd
===>  Building for gd-2.0.35,1
make PROG=pngtogd NO_MAN=1 NOMAN=1 LDADD="-L/usr/ports/graphics/gd/work/gd-2.0.35 -lgd"  CFLAGS="-O2 -fno-strict-aliasing -pipe   -I/usr/ports/graphics/gd/work/gd-2.0.35 -I/usr/local/include/freetype2/freetype  -I/usr/local/include/freetype2 -I/usr/local/include  -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -DHAVE_LIBZ  -DHAVE_ERRNO_H -DHAVE_FT2BUILD_H -DHAVE_LIBFREETYPE -DHAVE_LIBJPEG -DHAVE_LIBPNG  -DHAVE_LIBZ -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDLIB_H -I/usr/local/include/X11 -I/usr/local/include -DHAVE_LIBXPM -I/usr/local/include -DHAVE_LIBFONTCONFIG -DHAVE_PTHREAD  -DHAVE_ICONV -DHAVE_ICONV_H -DHAVE_ICONV_T_DEF" -ECFLAGS -f /usr/share/mk/bsd.prog.mk
Warning: Object directory not changed from original /usr/ports/graphics/gd/work/gd-2.0.35
cc -O2 -fno-strict-aliasing -pipe   -I/usr/ports/graphics/gd/work/gd-2.0.35 -I/usr/local/include/freetype2/freetype  -I/usr/local/include/freetype2 -I/usr/local/include  -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -DHAVE_LIBZ  -DHAVE_ERRNO_H -DHAVE_FT2BUILD_H -DHAVE_LIBFREETYPE -DHAVE_LIBJPEG -DHAVE_LIBPNG  -DHAVE_LIBZ -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDLIB_H -I/usr/local/include/X11 -I/usr/local/include -DHAVE_LIBXPM -I/usr/local/include -DHAVE_LIBFONTCONFIG -DHAVE_PTHREAD  -DHAVE_ICONV -DHAVE_ICONV_H -DHAVE_ICONV_T_DEF  -L/usr/local/lib -lXpm -lX11 -pthread -L/usr/local/lib -lfontconfig -L/usr/local/lib -liconv -o pngtogd pngtogd.o -L/usr/ports/graphics/gd/work/gd-2.0.35 -lgd
/usr/local/lib/libgd.a(gd_png.o)(.text+0x73): In function `gdImagePngCtxEx':
: undefined reference to `png_create_write_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x86): In function `gdImagePngCtxEx':
: undefined reference to `png_create_info_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xd8): In function `gdImagePngCtxEx':
: undefined reference to `png_destroy_write_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x105): In function `gdImagePngCtxEx':
: undefined reference to `png_set_write_fn'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x117): In function `gdImagePngCtxEx':
: undefined reference to `png_set_compression_level'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x194): In function `gdImagePngCtxEx':
: undefined reference to `png_set_IHDR'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x200): In function `gdImagePngCtxEx':
: undefined reference to `png_set_tRNS'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x223): In function `gdImagePngCtxEx':
: undefined reference to `png_write_info'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x22e): In function `gdImagePngCtxEx':
: undefined reference to `png_set_packing'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x39d): In function `gdImagePngCtxEx':
: undefined reference to `png_write_image'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x3af): In function `gdImagePngCtxEx':
: undefined reference to `png_write_end'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x5b9): In function `gdImagePngCtxEx':
: undefined reference to `png_set_tRNS'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x64e): In function `gdImagePngCtxEx':
: undefined reference to `png_set_PLTE'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x785): In function `gdImagePngCtxEx':
: undefined reference to `png_write_image'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x797): In function `gdImagePngCtxEx':
: undefined reference to `png_write_end'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x7f8): In function `gdImagePngCtxEx':
: undefined reference to `png_destroy_write_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x89a): In function `gdImagePngCtxEx':
: undefined reference to `png_write_image'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x8ac): In function `gdImagePngCtxEx':
: undefined reference to `png_write_end'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x9ca): In function `gdImagePngCtxEx':
: undefined reference to `png_write_image'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x9dc): In function `gdImagePngCtxEx':
: undefined reference to `png_write_end'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x9f6): In function `gdImagePngCtxEx':
: undefined reference to `png_write_image'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xa08): In function `gdImagePngCtxEx':
: undefined reference to `png_write_end'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xa69): In function `gdPngWriteData':
: undefined reference to `png_get_io_ptr'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xac6): In function `gdPngErrorHandler':
: undefined reference to `png_get_error_ptr'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xcf0): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_check_sig'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xd18): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_create_read_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xd2b): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_create_info_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xd85): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_destroy_read_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xda4): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_set_sig_bytes'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xdbe): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_set_read_fn'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xdd0): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_read_info'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xe15): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_get_IHDR'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xe9e): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_set_packing'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xf53): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_get_valid'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xf80): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_get_tRNS'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xfa6): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_read_update_info'
/usr/local/lib/libgd.a(gd_png.o)(.text+0xfb8): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_get_rowbytes'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x1051): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_read_image'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x1064): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_read_end'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x112b): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_destroy_read_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x11e1): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_get_PLTE'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x11fb): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_get_valid'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x122b): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_get_tRNS'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x128e): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_get_valid'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x12bf): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_get_tRNS'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x132c): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_destroy_read_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x151d): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_destroy_read_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x1554): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_set_strip_16'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x15b9): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_destroy_read_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x15f5): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_destroy_read_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x1656): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_destroy_read_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x16ac): In function `gdImageCreateFromPngCtx':
: undefined reference to `png_destroy_read_struct'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x173c): In function `gdPngReadData':
: undefined reference to `png_get_io_ptr'
/usr/local/lib/libgd.a(gd_png.o)(.text+0x176b): In function `gdPngReadData':
: undefined reference to `png_error'
/usr/local/lib/libgd.a(gd.o)(.text+0x35ad): In function `lsqrt':
: undefined reference to `sqrt'
/usr/local/lib/libgd.a(gd.o)(.text+0x360c): In function `gdImageCopyRotated':
: undefined reference to `sqrt'
/usr/local/lib/libgd.a(gd.o)(.text+0x3629): In function `gdImageCopyRotated':
: undefined reference to `cos'
/usr/local/lib/libgd.a(gd.o)(.text+0x363d): In function `gdImageCopyRotated':
: undefined reference to `sin'
/usr/local/lib/libgd.a(gd.o)(.text+0x4372): In function `gdImageDashedLine':
: undefined reference to `atan2'
/usr/local/lib/libgd.a(gd.o)(.text+0x437a): In function `gdImageDashedLine':
: undefined reference to `sin'
/usr/local/lib/libgd.a(gd.o)(.text+0x4474): In function `gdImageDashedLine':
: undefined reference to `atan2'
/usr/local/lib/libgd.a(gd.o)(.text+0x447c): In function `gdImageDashedLine':
: undefined reference to `sin'
/usr/local/lib/libgd.a(gd.o)(.text+0x4a23): In function `gdImageLine':
: undefined reference to `atan2'
/usr/local/lib/libgd.a(gd.o)(.text+0x4a2b): In function `gdImageLine':
: undefined reference to `cos'
/usr/local/lib/libgd.a(gd.o)(.text+0x4b2b): In function `gdImageLine':
: undefined reference to `atan2'
/usr/local/lib/libgd.a(gd.o)(.text+0x4b33): In function `gdImageLine':
: undefined reference to `sin'
*** Error code 1

Stop in /usr/ports/graphics/gd/work/gd-2.0.35.
*** Error code 1

Stop in /usr/ports/graphics/gd/work/gd-2.0.35.
*** Error code 1

Stop in /usr/ports/graphics/gd.
*** Error code 1

Stop in /usr/ports/net-mgmt/nagios.
*** Error code 1

Stop in /usr/ports/net-mgmt/nagios.


Аватара пользователя
hizel
дядя поня
Сообщения: 9032
Зарегистрирован: 2007-06-29 10:05:02
Откуда: Выборг

Re: Установка и настройка Nagios

Непрочитанное сообщение hizel » 2008-05-19 8:46:57

попробуйте пересобрать gd с поддержкой png
В дурацкие игры он не играет. Он просто жуткий, чу-чу, паровозик, и зовут его Блейн. Блейн --- это Боль.

Lion
рядовой
Сообщения: 16
Зарегистрирован: 2008-05-17 11:02:05

Re: Установка и настройка Nagios

Непрочитанное сообщение Lion » 2008-05-19 16:45:02

ок. Подскажите как правильно пересобрать :(

Аватара пользователя
hizel
дядя поня
Сообщения: 9032
Зарегистрирован: 2007-06-29 10:05:02
Откуда: Выборг

Re: Установка и настройка Nagios

Непрочитанное сообщение hizel » 2008-05-19 16:55:30

да просто portinstall gd
гм, если у вас конечно portupgrade стоит ;)
В дурацкие игры он не играет. Он просто жуткий, чу-чу, паровозик, и зовут его Блейн. Блейн --- это Боль.

hellion
рядовой
Сообщения: 15
Зарегистрирован: 2009-10-20 21:43:13

Re: Установка и настройка Nagios

Непрочитанное сообщение hellion » 2009-10-20 21:51:43

установил нагиос, стартует без ошибок. Но в статусе пишет
- Notifications are disabled
- Service checks are disabled
в конфиге нагиоса смотрел, всё это включено "1" стоит, но почему то не работает и в статусе всех действий пишет PENDING. Что делать не знаю. Версия нагиоса 3.0.6. Прикол в том что сначала все работало, и он сам себя мониторил, но когда начал добавлять сервера то оно всё пропало, переставил нагиос и ставил всё как было и нечего не помогло!