Титла: Проблем с nagios
Публикувано от: Chiro в Mar 17, 2006, 00:39
Здравейте пуснах си един nagios на PC-то и всичко изглеждаше чудесно и прекрасно до момента в който реших да адна хост за следене (все пак за това се използва  ). Дава ми следната грешка Примерен код | root@spirit:/usr/local/nagios/etc# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios 2.0 Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org) Last Modified: 02-07-2006 License: GPL
Reading configuration data...
Error: Invalid hostgroup object directive 'contactgroups'. Error: Could not add object property in file '/usr/local/nagios/etc/hostgroups.cfg' on line 24.
***> One or more problems was encountered while processing the config files...
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.
root@spirit:/usr/local/nagios/etc# |
Предполагам че ще се чудите какво има на този ред 24 и за това реших да дам направо и линков към конфигурационните file-ове
http://85.187.216.75/hostgroups.cfg http://85.187.216.75/hosts.cfg http://85.187.216.75/services.cfg http://85.187.216.75/contactgroups.cfg
Титла: Проблем с nagios
Публикувано от: Chiro в Mar 17, 2006, 00:48
Отново забравих да нпиша: Slackware-current Linuix 2.4.32
въпреки че едва ли има отношение по този въпрос, но нека спазвме прваилата
Титла: Проблем с nagios
Публикувано от: alex_c в Mar 17, 2006, 09:08
Пропуснал си долната черта :-) пробвай така: ######################## # 'Local' host group definition define hostgroup{ hostgroup_name Local alias Local contact_groups admin members Gateway } ########################
То ти е било изписано черно на бяло, но не си обърнал внимание
Best wishes! Alex
Титла: Проблем с nagios
Публикувано от: Chiro в Mar 17, 2006, 11:05
Ами да бях я изпуснал, но след като я добавих отново получих същата грешка Примерен код | Nagios 2.0 Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org) Last Modified: 02-07-2006 License: GPL
Reading configuration data...
Error: Invalid hostgroup object directive 'contact_groups'. Error: Could not add object property in file '/usr/local/nagios/etc/hostgroups.cfg' on line 24.
***> One or more problems was encountered while processing the config files...
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.
|
Титла: Проблем с nagios
Публикувано от: в Mar 19, 2006, 11:02
Току-що погледнах цонфигурационните файлове на Нагиос версия 2. Явно има разлика между някои директиви във версии те 1.х и 2. Ето копи/пейст от hostgroup дефинициите на Нагиос вер. 2: # 'novell-servers' host group definition define hostgroup{ hostgroup_name novell-servers alias Novell Servers members novell1,novell2 } Вижда се, че тук никъде няма дефиниране на contact_groups. Във веб-сайта на Нагиос пише, че има някои разлики в конфигурационите файлове между версии 1.х и 2, но май не са изрично посочени. Явно това е една от тези разлики. Пробвай така да видим дали ще проработи.
Best wishes! Alex
Титла: Проблем с nagios
Публикувано от: Chiro в Mar 19, 2006, 22:23
Май и така не става ... Примерен код | root@spirit:/usr/local/nagios/etc# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios 2.0 Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org) Last Modified: 02-07-2006 License: GPL
Reading configuration data...
Running pre-flight check on configuration data...
Checking services... Error: Event handler command 'failover' specified in service 'SMB' for host 'Gateway' not defined anywhere Checked 6 services. Checking hosts... Error: Host 'Gateway' has no default contact group(s) defined! Checked 2 hosts. Checking host groups... Checked 2 host groups. Checking service groups... Checked 0 service groups. Checking contacts... Checked 2 contacts. Checking contact groups... Warning: Contact group 'admin' is not used in any host/service definitions or host/service escalations! 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 22 commands. Checking time periods... Checked 1 time periods. Checking extended host info definitions... Checked 0 extended host info definitions. Checking extended service info definitions... Checked 0 extended service info definitions. 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: 1 Total Errors: 2
***> 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.
|
Титла: Проблем с nagios
Публикувано от: alex_c в Mar 20, 2006, 12:06
Пак от конфигурационните файлове на Nagios 2.0: # 'novell1' host definition define host{ use generic-host ; Name of host template to use
host_name novell1 alias Novell Server #1 address 192.168.1.2 check_command check-host-alive max_check_attempts 10 notification_interval 120 notification_period 24x7 notification_options d,u,r contact_groups novell-admins } Видно е, че директивата contact_groups е преместена от hostgroups.cfg в hosts.cfg. Освен това, от изхода на командата, която си стартирал, се казва, че са възможни различия между конфигурационните файлове на версиите 1.х и 2.0: 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. Просто е трябвало да почетеш малко повече. Дано след тази корекция вече всичко да е в ред. Ако пак нещо се дъни, намери си някой готов пакет за nagios 2.0 и оттам разгледай синтаксиса на конфигурационните файлове.
Best wishes! Alex
Титла: Проблем с nagios
Публикувано от: Chiro в Mar 20, 2006, 14:51
Мерси Alex вече ми дава само няколко грешки които са за пермишаните и тях лесно ще изчистия.
Успех!
|