Muff's website forum

FreeBSd => Soft => Тема начата: srdemon от Июня 04, 2011, 01:44:12 pm

Название: Nagios + Nconf
Отправлено: srdemon от Июня 04, 2011, 01:44:12 pm
Всем пиривэт, камрадэс!
Наткнулся вот на  эту  (http://muff.kiev.ua/content/nastroika-sistemy-monitoringa-nagios-3x-i-utility-konfigurirovaniya-nconf) статейку о настройке nagios и nconf. *Автору большущее спасибо за подробное изложение материала*
Решил воспользоваться руководством, но столкнулся с проблемой.
При исполнении скрипта выгрузки конфигов из nconf (выполняю скрипт /usr/local/www/nconf/ADD-ONS/deploy_local.sh вручную) ругается - /usr/local/www/nconf/ADD-ONS/deploy_local.sh: Permission denied.  :-\

понимаю, что что-то не так с правами. но где и как выяснить, на что именно нет прав?
какие логи посмотреть, например?

понимаю, что по фотографии не лечится и экстрасенсов тут нет. Подскажите, какие листинги выложить, охотно поделюсь.
Спасибо за внимание.
Название: Re:Nagios + Nconf
Отправлено: muff от Июня 05, 2011, 09:57:58 pm
От какого пользователя запускаешь скрипт? Если от рута - тогда не должно быть никаких проблем вообще. Если от своего аккаунта - дай права на запуск скрипта.
Проверить текущие разрешения можно командой:
# ls -la /usr/local/www/nconf/ADD-ONS/
Название: Re: Nagios + Nconf
Отправлено: master от Июля 02, 2011, 04:17:35 pm
Здравствуйте. Писал в комменты, но повторю тут:

Начал устанавливать по вашей статье.
Дошел до Generate Nagios config и получаю
 
Цитировать
Error accessing or executing Nagios / Icinga binary '/usr/local/www/nconf/bin/nagios'.
 Cannot run the mandatory syntax check.

Цитировать
/usr/local/www/nconf/bin/
nagios пустая.

 И при запуске nagios
Цитировать
# /usr/local/etc/rc.d/nagios start
 Performing sanity check of nagios configuration: FAILED

 Nagios Core 3.2.3
 Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
 Copyright (c) 1999-2009 Ethan Galstad
 Last Modified: 10-03-2010
 License: GPL

 Website: hттp:ww.nagios.org
 Reading configuration data...
 Read main config file okay...
 Processing object config directory '/usr/local/etc/nagios/global'...
 Processing object config directory '/usr/local/etc/nagios/Default_collector'...
 Read object config files okay...

 Running pre-flight check on configuration data...

 Checking services...
 Error: There are no services defined!
 Checked 0 services.
 Checking hosts...
 Error: There are no hosts defined!
 Checked 0 hosts.
 Checking host groups...
 Checked 0 host groups.
 Checking service groups...
 Checked 0 service groups.
 Checking contacts...
 Error: There are no contacts defined!
 Checked 0 contacts.
 Checking contact groups...
 Checked 0 contact groups.
 Checking service escalations...
 Checked 0 service escalations.
 Checking service dependencies...
 Checked 0 service dependencies.
 Checking host escalations...
 Checked 0 host escalations.
 Checking host dependencies...
 Checked 0 host dependencies.
 Checking commands...
 Checked 0 commands.
 Checking time periods...
 Checked 0 time periods.
 Checking for circular paths between hosts...
 Checking for circular host and service dependencies...
 Checking global event handlers...
 Checking obsessive compulsive processor commands...
 Checking misc settings...

 Total Warnings: 0
 Total Errors: 3

 ***> One or more problems was encountered while running the pre-flight check...

 Check your configuration file(s) to ensure that they contain valid
 directives and data defintions. If you are upgrading from a previous
 version of Nagios, you should be aware that some variables/definitions
 may have been removed or modified in this version. Make sure to read
 the HTML documentation regarding the config files, as well as the
 'Whats New' section to find out what has changed.

 /usr/local/etc/rc.d/nagios: WARNING: failed precmd routine for nagios

Прошу совета..
Название: Re: Nagios + Nconf
Отправлено: muff от Июля 02, 2011, 05:10:50 pm
Попробуйте удалить каталог nconf, закачать по новому архив и повторно распаковать его, выполнив дальнейшие инструкции.

В моем случае в каталоге /usr/local/www/nconf/bin находятся такие файлы:
# ls /usr/local/www/nconf/bin/
add_items_from_cfg.pl*         add_items_from_special_csv.pl* lib/                           parse_config_EXAMPLE.pl*
add_items_from_csv.pl*         generate_config.pl*            link_missing_items.pl*
А в каталоге /usr/local/www/nconf такие:
# ls /usr/local/www/nconf/
ADD-ONS/                       clone_host_write2db.php        design_templates/              modify_attr.php                overview.php
CHANGELOG                      clone_service.php              detail.php                     modify_attr_write2db.php       show_attr.php
COPYRIGHT                      clone_service_write2db.php     detail_attributes.php          modify_class.php               show_class.php
LICENSE                        config.orig/                   detail_class.php               modify_class_write2db.php      static_cfg/
README                         config/                        generate_config.php            modify_item.php                static_file_editor.php
add_item.php                   delete_attr.php                history.php                    modify_item_service.php        temp/
add_item_step2.php             delete_class.php               id_wrapper.php                 modify_item_write2db.php
bin/                           delete_item.php                img/                           multimodify_attr.php
call_ajax.php                  dependency.php                 include/                       multimodify_attr_write2db.php
clone_host.php                 deploy_config.php              index.php                      output/


Получается, проблема именно с Nconf. А Nagios не запускается потому, что корректные файлы конфигурации для него не созданы.
Название: Re: Nagios + Nconf
Отправлено: master от Июля 02, 2011, 07:57:22 pm
Сделал..
То же и осталось.
Жму "Generate Nagios config" и получаю:
Error accessing or executing Nagios / Icinga binary '/usr/local/www/nconf/bin/nagios'.
Cannot run the mandatory syntax check.

cd /usr/local/www/nconf/bin/
monitor# ls
add_items_from_cfg.pl           lib
add_items_from_csv.pl           link_missing_items.pl
add_items_from_special_csv.pl   parse_config_EXAMPLE.pl
generate_config.pl
Название: Re: Nagios + Nconf
Отправлено: muff от Июля 02, 2011, 10:47:57 pm
А что в логах Apache? Мне кажется, что банально не хватает прав...
Дополнительно предоставьте вывод команды ls -la /usr/local/www/nconf
Название: Re: Nagios + Nconf
Отправлено: master от Июля 03, 2011, 11:29:31 am
Было после того как перезалил nconf:
ls -la
total 420
drwxr-xr-x  12 www   www     1536 Jul  2 18:50 .
drwxr-xr-x   8 root  wheel    512 Jul  2 18:40 ..
drwxr-xr-x   2 www   wheel    512 Nov 25  2009 ADD-ONS
-rw-r--r--   1 www   wheel   8654 Nov 25  2009 CHANGELOG
-rw-r--r--   1 www   wheel    893 Sep 11  2009 COPYRIGHT
-rw-r--r--   1 www   wheel  18002 Feb 20  2009 LICENSE
-rw-r--r--   1 www   wheel   5459 Nov 24  2009 README
-rw-r--r--   1 www   wheel  24933 Nov 25  2009 add_item.php
-rw-r--r--   1 www   wheel   5662 Nov  6  2009 add_item_step2.php
drwxr-xr-x   3 www   wheel    512 Nov 25  2009 bin
-rw-r--r--   1 www   wheel    644 Oct  2  2009 call_ajax.php
-rw-r--r--   1 www   wheel   4336 Nov 24  2009 clone_host.php
-rw-r--r--   1 www   wheel  13793 Nov 25  2009 clone_host_write2db.php
-rw-r--r--   1 www   wheel   4083 Nov 25  2009 clone_service.php
-rw-r--r--   1 www   wheel   7563 Nov 25  2009 clone_service_write2db.php
drwxrwxr-x   2 www   48       512 Jul  2 18:49 config
drwxr-xr-x   2 www   wheel    512 Nov 25  2009 config.orig
-rw-r--r--   1 www   wheel   2704 Nov 24  2009 delete_attr.php
-rw-r--r--   1 www   wheel   3707 Nov 23  2009 delete_class.php
-rw-r--r--   1 www   wheel  10849 Nov 25  2009 delete_item.php
-rw-r--r--   1 www   wheel  12588 Nov 25  2009 dependency.php
-rw-r--r--   1 www   wheel   1299 Mar 18  2009 deploy_config.php
drwxr-xr-x   3 www   wheel    512 Nov 25  2009 design_templates
-rw-r--r--   1 www   wheel   9738 Nov 19  2009 detail.php
-rw-r--r--   1 www   wheel   3027 Mar 18  2009 detail_attributes.php
-rw-r--r--   1 www   wheel   2796 May 11  2009 detail_class.php
-rw-r--r--   1 www   wheel    639 Oct  2  2009 generate_config.php
-rw-r--r--   1 www   wheel   3994 Apr  6  2009 history.php
-rw-r--r--   1 www   wheel   1916 Nov 25  2009 id_wrapper.php
drwxr-xr-x   3 www   wheel   2048 Nov 25  2009 img
drwxr-xr-x   7 www   wheel    512 Nov 25  2009 include
-rw-r--r--   1 www   wheel   1101 Mar 18  2009 index.php
-rw-r--r--   1 www   wheel  17705 Nov 24  2009 modify_attr.php
-rw-r--r--   1 www   wheel  13089 Nov 11  2009 modify_attr_write2db.php
-rw-r--r--   1 www   wheel   7987 Nov 24  2009 modify_class.php
-rw-r--r--   1 www   wheel   5151 Nov 11  2009 modify_class_write2db.php
-rw-r--r--   1 www   wheel  36142 Nov 25  2009 modify_item.php
-rw-r--r--   1 www   wheel   8249 Nov  4  2009 modify_item_service.php
-rw-r--r--   1 www   wheel  23292 Nov 17  2009 modify_item_write2db.php
-rw-r--r--   1 www   wheel  25313 Nov 25  2009 multimodify_attr.php
-rw-r--r--   1 www   wheel  30913 Nov 11  2009 multimodify_attr_write2db.php
drwxrwxr-x   2 www   48       512 Nov 25  2009 output
-rw-r--r--   1 www   wheel  29425 Nov 25  2009 overview.php
-rw-r--r--   1 www   wheel   9093 Nov 24  2009 show_attr.php
-rw-r--r--   1 www   wheel   6359 Nov 24  2009 show_class.php
drwxrwxr-x   2 www   48       512 Nov 25  2009 static_cfg
-rw-r--r--   1 www   wheel   6269 Nov 24  2009 static_file_editor.php
drwxrwxr-x   2 www   48       512 Nov 25  2009 temp
Сделал:
monitor# chown www:www *
monitor# ls -la
total 420
drwxr-xr-x  12 www   www     1536 Jul  2 18:50 .
drwxr-xr-x   8 root  wheel    512 Jul  2 18:40 ..
drwxr-xr-x   2 www   www      512 Nov 25  2009 ADD-ONS
-rw-r--r--   1 www   www     8654 Nov 25  2009 CHANGELOG
-rw-r--r--   1 www   www      893 Sep 11  2009 COPYRIGHT
-rw-r--r--   1 www   www    18002 Feb 20  2009 LICENSE
-rw-r--r--   1 www   www     5459 Nov 24  2009 README
-rw-r--r--   1 www   www    24933 Nov 25  2009 add_item.php
-rw-r--r--   1 www   www     5662 Nov  6  2009 add_item_step2.php
drwxr-xr-x   3 www   www      512 Nov 25  2009 bin
-rw-r--r--   1 www   www      644 Oct  2  2009 call_ajax.php
-rw-r--r--   1 www   www     4336 Nov 24  2009 clone_host.php
-rw-r--r--   1 www   www    13793 Nov 25  2009 clone_host_write2db.php
-rw-r--r--   1 www   www     4083 Nov 25  2009 clone_service.php
-rw-r--r--   1 www   www     7563 Nov 25  2009 clone_service_write2db.php
drwxrwxr-x   2 www   www      512 Jul  2 18:49 config
drwxr-xr-x   2 www   www      512 Nov 25  2009 config.orig
-rw-r--r--   1 www   www     2704 Nov 24  2009 delete_attr.php
-rw-r--r--   1 www   www     3707 Nov 23  2009 delete_class.php
-rw-r--r--   1 www   www    10849 Nov 25  2009 delete_item.php
-rw-r--r--   1 www   www    12588 Nov 25  2009 dependency.php
-rw-r--r--   1 www   www     1299 Mar 18  2009 deploy_config.php
drwxr-xr-x   3 www   www      512 Nov 25  2009 design_templates
-rw-r--r--   1 www   www     9738 Nov 19  2009 detail.php
-rw-r--r--   1 www   www     3027 Mar 18  2009 detail_attributes.php
-rw-r--r--   1 www   www     2796 May 11  2009 detail_class.php
-rw-r--r--   1 www   www      639 Oct  2  2009 generate_config.php
-rw-r--r--   1 www   www     3994 Apr  6  2009 history.php
-rw-r--r--   1 www   www     1916 Nov 25  2009 id_wrapper.php
drwxr-xr-x   3 www   www     2048 Nov 25  2009 img
drwxr-xr-x   7 www   www      512 Nov 25  2009 include
-rw-r--r--   1 www   www     1101 Mar 18  2009 index.php
-rw-r--r--   1 www   www    17705 Nov 24  2009 modify_attr.php
-rw-r--r--   1 www   www    13089 Nov 11  2009 modify_attr_write2db.php
-rw-r--r--   1 www   www     7987 Nov 24  2009 modify_class.php
-rw-r--r--   1 www   www     5151 Nov 11  2009 modify_class_write2db.php
-rw-r--r--   1 www   www    36142 Nov 25  2009 modify_item.php
-rw-r--r--   1 www   www     8249 Nov  4  2009 modify_item_service.php
-rw-r--r--   1 www   www    23292 Nov 17  2009 modify_item_write2db.php
-rw-r--r--   1 www   www    25313 Nov 25  2009 multimodify_attr.php
-rw-r--r--   1 www   www    30913 Nov 11  2009 multimodify_attr_write2db.php
drwxrwxr-x   2 www   www      512 Nov 25  2009 output
-rw-r--r--   1 www   www    29425 Nov 25  2009 overview.php
-rw-r--r--   1 www   www     9093 Nov 24  2009 show_attr.php
-rw-r--r--   1 www   www     6359 Nov 24  2009 show_class.php
drwxrwxr-x   2 www   www      512 Nov 25  2009 static_cfg
-rw-r--r--   1 www   www     6269 Nov 24  2009 static_file_editor.php
drwxrwxr-x   2 www   www 

При генерации конфига то же.
Название: Re: Nagios + Nconf
Отправлено: muff от Июля 03, 2011, 11:45:31 am
А что в логах Apache?
Название: Re: Nagios + Nconf
Отправлено: master от Июля 04, 2011, 10:22:40 am
httpd-error.log
[Sat Jul 02 18:36:21 2011] [error] [client 192.168.100.90] File does not exist: /usr/local/www/apache22/data/favicon.ico, referer: http://192.168.100.10/ncon
[Sat Jul 02 18:37:18 2011] [error] [client 192.168.100.90] File does not exist: /usr/local/www/nconf/install
mysql: not found
mysql: not found
/usr/local/www/nconf/bin/nagios: not found
/usr/local/www/nconf/bin/nagios: not found
/usr/local/www/nconf/bin/nagios: not found

httpd-access.log
80.--2.2-4.--2 - user [03/Jul/2011:12:34:56 +0000] "GET /nconf/design_templates/nconf_fresh/nc-logo.gif HTTP/1.1" 304 - "http://3-.42.--.113:--5/nconf/design
80.--2.2-4.--2 - user [03/Jul/2011:12:34:56 +0000] "GET /nconf/design_templates/nconf_fresh/arrow.gif HTTP/1.1" 304 - "http://3-.42.--.113:--5/nconf/design_t
80.--2.2-4.--2 - user [03/Jul/2011:12:34:56 +0000] "GET /nconf/design_templates/nconf_fresh/title_gradient_sub.gif HTTP/1.1" 304 - "http://3-.42.--.113:--5/n
80.--2.2-4.--2 - user [03/Jul/2011:12:34:58 +0000] "GET /nconf/history.php HTTP/1.1" 200 13984 "http://3-.42.--.113:--5/nconf/generate_config.php" "Mozilla/5
127.0.0.1 - - [03/Jul/2011:12:35:03 +0000] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.19 (FreeBSD) mod_ssl/2.2.19 OpenSSL/0.9.8q DAV/2 PHP/5.2.17 with Suhosi
Название: Re: Nagios + Nconf
Отправлено: muff от Июля 04, 2011, 10:59:09 am
Возможно с конфигурацией напутали... Во время инсталяции Nconf (Шаг 2) правильно вводили путь к бинарнику Nagios? Должен быть /usr/local/bin/nagios.
Перепроверьте, пожалуйста. Текущее значение конфигурации можно узнать следующей командой:

# cat /usr/local/www/nconf/config/nconf.php | grep NAGIOS_BIN
define('NAGIOS_BIN', '/usr/local/bin/nagios');
Название: Re: Nagios + Nconf
Отправлено: master от Июля 04, 2011, 11:29:52 am
"От оно значит чё" (с) Наша Раша
Спасибо!!
Переставил nconf, вот:
Generating config:
[ Initializing NConf perl-API (library version 0.2, written by A. Gargiulo) ]
[ Copyright (c) 2006-2009 Sunrise Communications AG, Zurich, Switzerland    ]

[INFO]  Starting generate_config script
[INFO]  Generating global config files
[INFO]  Generating config for Nagios-monitor '10.0.250.75'
[WARN]  No SSH check was found for localhost
[INFO]  Generating config for Nagios-collector 'Default Nagios'
[INFO]  Ended generate_config script

Running syntax check:
  10.0.250.75: Total Warnings: 0  Total Errors: 0 
  Default_collector: Total Warnings: 0  Total Errors: 0 


Changes updated successfully.
Название: Re: Nagios + Nconf
Отправлено: muff от Июля 04, 2011, 11:36:51 am
Вот и чудненько.

На всякий случай в статье выделил необходимость изменения даного параметра.
Название: Re: Nagios + Nconf
Отправлено: master от Июля 04, 2011, 12:13:25 pm
После Generate Nagios config в nconf , должен стартовать nagios через /usr/local/etc/rc.d/nagios start , так? а то у меня:
# /usr/local/etc/rc.d/nagios start
Performing sanity check of nagios configuration: FAILED

Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config directory '/usr/local/etc/nagios/global'...
Processing object config directory '/usr/local/etc/nagios/Default_collector'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Error: There are no services defined!
        Checked 0 services.
Checking hosts...
Error: There are no hosts defined!
        Checked 0 hosts.
Checking host groups...
        Checked 0 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
Error: There are no contacts defined!
        Checked 0 contacts.
Checking contact groups...
        Checked 0 contact groups.
Checking service escalations...
        Checked 0 service escalations.
Checking service dependencies...
        Checked 0 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 0 host dependencies.
Checking commands...
        Checked 0 commands.
Checking time periods...
        Checked 0 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   3

***> One or more problems was encountered while running the pre-flight check...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

/usr/local/etc/rc.d/nagios: WARNING: failed precmd routine for nagios
Название: Re: Nagios + Nconf
Отправлено: muff от Июля 04, 2011, 12:27:40 pm
Создайте хотя бы один хост для мониторинга  ;)
Название: Re: Nagios + Nconf
Отправлено: riko от Августа 31, 2011, 10:51:07 pm
Hello, support!!!
У меня вот такая проблема..
после Generate Nagios config  nconf показывает что все "ОК"
Generating config:

[ Initializing NConf perl-API (library version 0.2, written by A. Gargiulo) ]
[ Copyright (c) 2006-2009 Sunrise Communications AG, Zurich, Switzerland    ]

[INFO]  Starting generate_config script
[INFO]  Generating global config files
[INFO]  Generating config for Nagios-monitor 'Riko Network'
[INFO]  Generating config for Nagios-collector 'Default Nagios'
[INFO]  Ended generate_config script


Running syntax check:

     Default_collector:    Total Warnings: 0  Total Errors: 0 



Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...

Processing object config file '/usr/local/www/nconf/temp/global/host_templates.cfg'...
Processing object config file '/usr/local/www/nconf/temp/global/timeperiods.cfg'...
Processing object config file '/usr/local/www/nconf/temp/global/contacts.cfg'...
Processing object config file '/usr/local/www/nconf/temp/global/service_templates.cfg'...
Processing object config file '/usr/local/www/nconf/temp/global/misccommands.cfg'...
Processing object config file '/usr/local/www/nconf/temp/global/contactgroups.cfg'...
Processing object config file '/usr/local/www/nconf/temp/global/checkcommands.cfg'...
Processing object config file '/usr/local/www/nconf/temp/Default_collector/hosts.cfg'...
Processing object config file '/usr/local/www/nconf/temp/Default_collector/hostgroups.cfg'...
Processing object config file '/usr/local/www/nconf/temp/Default_collector/services.cfg'...
Processing object config file '/usr/local/www/nconf/temp/Default_collector/servicegroups.cfg'...
 Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
   Checked 6 services.
Checking hosts...
   Checked 2 hosts.
Checking host groups...
   Checked 1 host groups.
Checking service groups...
   Checked 1 service groups.
Checking contacts...
   Checked 1 contacts.
Checking contact groups...
   Checked 2 contact groups.
Checking service escalations...
   Checked 0 service escalations.
Checking service dependencies...
   Checked 0 service dependencies.
Checking host escalations...
   Checked 0 host escalations.
Checking host dependencies...
   Checked 0 host dependencies.
Checking commands...
   Checked 24 commands.
Checking time periods...
   Checked 3 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check

а вот при старте NAGIOS-a  ошибки и не видет ни одного сервиса..

Performing sanity check of nagios configuration: FAILED

Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config directory '/usr/local/etc/nagios/global'...
Processing object config directory '/usr/local/etc/nagios/Default_collector'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Error: There are no services defined!
        Checked 0 services.
Checking hosts...
Error: There are no hosts defined!
        Checked 0 hosts.
Checking host groups...
        Checked 0 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
Error: There are no contacts defined!
        Checked 0 contacts.
Checking contact groups...
        Checked 0 contact groups.
Checking service escalations...
        Checked 0 service escalations.
Checking service dependencies...
        Checked 0 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 0 host dependencies.
Checking commands...
        Checked 0 commands.
Checking time periods...
        Checked 0 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   3

***> One or more problems was encountered while running the pre-flight check...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

Название: Re: Nagios + Nconf
Отправлено: muff от Сентября 01, 2011, 01:53:57 pm
Какие права на каталог /usr/local/etc/nagios/global ?
Название: Re: Nagios + Nconf
Отправлено: riko от Сентября 01, 2011, 06:40:19 pm
chmod 766
chown nagios:www
Название: Re: Nagios + Nconf
Отправлено: muff от Сентября 01, 2011, 07:17:46 pm
Владельцем должен быть пользователь, от имени которого работает веб-сервер. В данном случае - www.
Название: Re: Nagios + Nconf
Отправлено: riko от Сентября 02, 2011, 02:42:53 pm
у меня в каталогах globa и Default_collector  было пусто.. так я сделал вот так

www/nconf/output>tar -xf NagiosConfig.tgz

cp -iprv /usr/local/www/nconf/output/Default_collector/ /usr/local/etc/nagios/Default_collector/

cp -iprv /usr/local/www/nconf/output/global/ /usr/local/etc/nagios/global/

и нагиос стартанул.. теперь столкнулся с следующей ошибкой

http://localhost/nagios/
It appears as though you do not have permission to view information for any of the services you requested...
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
Название: Re: Nagios + Nconf
Отправлено: muff от Сентября 02, 2011, 02:56:19 pm
В том то и дело, что скрипт deploy_local.sh должен это делать в автоматическом режиме.

На счет ошибки - четко описано, что недостаточно прав. Проверьте права на файлы и каталоги.Также ознакомьтесь с пунктом 3 примечаний.
Название: Re: Nagios + Nconf
Отправлено: Miraf от Июля 24, 2012, 07:52:23 pm
кто будет так любезен и покажет как в httpd-vhosts.conf правильно прописать nagios ?
Название: Re: Nagios + Nconf
Отправлено: muff от Июля 24, 2012, 08:55:48 pm
Как виртуалхост он не прописывается, необходимо прописывать его как алиас:

Alias /nagios/ "/usr/local/www/nagios/"
<Directory /usr/local/www/nagios/>
        Order deny,allow
        Allow from all
        AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /usr/local/etc/nagios/.htpasswd-nagios
        Require valid-user
</Directory>
<Directory /usr/local/www/nagios/cgi-bin/>
        Options ExecCGI
        AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /usr/local/etc/nagios/.htpasswd-nagios
        Require valid-user
</Directory>
Название: Re: Nagios + Nconf
Отправлено: Sargas от Июля 26, 2012, 09:38:11 pm
<VirtualHost ip:80>
        ServerName nagios.example.com
        ErrorLog /home/LOGS/ERRORS/311072786.apache2
        <IfModule mod_log_config.c>
                CustomLog /home/LOGS/ACCESS/311072786.apache2 combined
        </IfModule>
        ServerAlias  www.nagios.example.com

        DocumentRoot /home/nagios/nagios.example.com
        <IfModule mod_alias.c>
                ScriptAlias /cgi-bin/ /home/nagios/nagios.example.com/cgi-bin/
        </IfModule>
        <IfModule mod_php4.c>
                php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f nagios@example.com"
        </IfModule>
        <IfModule mod_php5.c>
                php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f nagios@example.com"
        </IfModule>
</VirtualHost>
Название: Re: Nagios + Nconf
Отправлено: Miraf от Августа 11, 2012, 12:46:11 pm
Гугл помог
<VirtualHost *:80>

ServerAdmin test@xxxx
DocumentRoot "/usr/local/www/nagios/"
ServerName nagios.xx.xx.ua

ScriptAlias /cgi-bin/  "/usr/local/www/nagios/cgi-bin/"
ServerAlias www.nagios.xx.xx.ua

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

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

<Directory /usr/local/www/nagios/cgi-bin/>
        Options ExecCGI
        AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /usr/local/etc/nagios/.htpasswd.nagios
        Require valid-user
</Directory>

</VirtualHost>

Вот еще такой вопрос.
При падении хоста, выставив его в  acknowledgement необходимо отдельно делать acknowledgement сервисам.
Возможно ли при подтверждении(acknowledgement) для хоста, чтоб автоматически применялось и к сервисам?
Название: Re: Nagios + Nconf
Отправлено: muff от Августа 13, 2012, 12:02:45 pm
Выбираем хост, для которого необходимо отключить уведомления и в "Host Commands" (справа) выбираем опцию "Disable notifications for all services on this host". В окне подтверждения есть возможность поставить чекбокс "Disable For Host Too".