Страница 1 из 7
Nagios
Добавлено: 2007-12-07 8:31:05
Dets
Лис привет! Вопрос про nagios... В nagios.cfg стоит ротация логов ежедневно, путь к архивам /var/spool/nagios/archives Но самих архивов с ежедневными историями не вижу. Вот тут var/spool/nagios/ лежит nagios.log и как я понял вся история берется оттуда. Она из веб-интерфейса доступна. Глядя на nagios.log не вижу соответствия представленному на вебе. Но даже если всё хранится в нем, то почему не создаются ежедневные архивы? И еще один вопрос: есть ли у нагиоса возможность добавлять хосты и сервисы с помощью веб-интерфейса (внешними командами) и если да, то как реализовать? Ну... и тода еще один последний вопрос:) Можно ли с помощью нагиос проверить скорость канала до удаленного объекта, и если да, то как, а если нет, то может подскажешь чем можно?
Благодарю:)
Re: Nagios
Добавлено: 2007-12-07 20:59:36
hizel
хоть и не лис
но
4. скорость могешь iperf ом тестануть, надо на обоих концах их пускать одного клиентом второго сервером
1,2.
у меня в nagios.cfg
Код: Выделить всё
log_rotation_method=h
# LOG ARCHIVE PATH
# This is the directory where archived (rotated) log files should be
# placed (assuming you've chosen to do log rotation).
log_archive_path=/var/spool/nagios/archives
в archives все валится, это ротация каждый час
вывод: для начала проверить права доступа
3. хосты и сервисы можно крутить стороними приблудами, смотри в гугле, сам ничем таким не пользовался, обычно там вебморда на пых-пыхе и все данные дополнительно лежат в БД от туда генерируются конфиг для нагоса
надеюсь чемто помог :/
Re: Nagios
Добавлено: 2008-02-27 20:42:17
RusBiT
Настраивал по статья , которая на сайте, но там много ошибок.. Но три ошибки остались...
Код: Выделить всё
./nagios start
Performing sanity check of nagios configuration: FAILED
Nagios 2.5
Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)
Last Modified: 07-13-2006
License: GPL
Reading configuration data...
Warning: Duplicate definition found for host 'generic-host' (config file '/usr/local/etc/nagios/hosts/localhost.host', starting on line 2)
Running pre-flight check on configuration data...
Checking services...
[b]Error: There are no services defined![/b]
Checked 0 services.
Checking hosts...
Warning: Host 'localhost' has no services associated with it!
Checked 1 hosts.
Checking host groups...
Checked 2 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
[b]Error: Service notification command 'notify-by-email' specified for contact 'nagios' is not defined anywhere!
Error: Host notification command 'host-notify-by-email' specified for contact 'nagios' is not defined anywhere![/b]
Checked 1 contacts.
Checking contact groups...
Checked 1 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 4 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...
Warning: Nothing specified for illegal_macro_output_chars variable!
Total Warnings: 2
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.
Код: Выделить всё
# cat default.cfg
#Задаем периоды оповещения
define timeperiod{
timeperiod_name 24x7
alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}
define timeperiod{
timeperiod_name workhours
alias "Normal" Working Hours
monday 09:00-17:00
tuesday 09:00-17:00
wednesday 09:00-17:00
thursday 09:00-17:00
friday 09:00-17:00
}
define timeperiod{
timeperiod_name nonworkhours
alias Non-Work Hours
sunday 00:00-24:00
monday 00:00-09:00,17:00-24:00
tuesday 00:00-09:00,17:00-24:00
wednesday 00:00-09:00,17:00-24:00
thursday 00:00-09:00,17:00-24:00
friday 00:00-09:00,17:00-24:00
saturday 00:00-24:00
}
define timeperiod{
timeperiod_name none
alias No Time Is A Good Time
}
define contact{
contact_name nagios
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email your@email.ru
}
# Создаем группу контактов. Для каждого сервера можно оповещать
# Свою группу
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagios
}
define host{
name generic-host ; имя шаблона
notifications_enabled 1 ; включить уведомление
event_handler_enabled 1 ; влючить реакцию на событие
flap_detection_enabled 1 ; включить проверку на смену стостояния
process_perf_data 1 ; обрабатывать данные о производительности для хоста
retain_status_information 1 ; сохранять информацию о статусе
register 0 ; не регистрировать это определение, это все лишь шаблон
}
define host{
name freebsd-server
use generic-host
check_period 24x7
max_check_attempts 10
notifications_enabled 1
notification_period 24x7
notification_interval 30
notification_options d,u,r
contact_groups admins
register 0
}
# Группы хостов
define hostgroup{
hostgroup_name in_servers
alias Local Servers
members localhost
}
define hostgroup{
hostgroup_name out_servers
alias External Servers
members localhost
}
#Стандартные шаблоны сервисов
define service{
name generic-service
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
register 0
contact_groups nagios ; кому посылать уведомления
notification_interval 240 ; интервал уведомления
notification_period 24x7 ; уведомлять 24 часа в сутки 7 дней в неделю. см. timeperiods.cfg
notification_options w,u,c,r ; в каких слкчаях посылать уведомление*
check_command check_ping!100.0,20%!500.0,60% ; пингуем хост
}
define service{
name local-service
use generic-service
check_period 24x7
max_check_attempts 4
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 60
notification_period 24x7
register 0
}
Re: Nagios
Добавлено: 2008-02-27 20:48:35
hizel
Error: Service notification command 'notify-by-email' specified for contact 'nagios' is not defined anywhere!
Error: Host notification command 'host-notify-by-email' specified for contact 'nagios' is not defined anywhere!
<translate mode>
нету в конфигах определения команд notify-by-email и host-notify-by-email
</translate mode>
так оно вам надо, оповещение по емылу?
если нада, то вводим в конфиг
если нинада, срываем все упаминания
Re: Nagios
Добавлено: 2008-02-28 5:40:52
RusBiT
В том и дело что я вроде определил эти данные в конфиге, хотя может не верно.. Если вам не трудно, скиньте пример конфига.
Если удалить, то пишет Error: Contact name, alias, or email address and pager number are NULL
Спустя минут 20, посмотрел стандартные примеры, разобрался. Осталось только Error: There are no services defined!
Ближе к вечеру. Вроде начинаю разбираться, только почему то 3-D Status Map не работает.
Re: Nagios
Добавлено: 2008-04-07 13:24:58
hizel
для 3d нужен спец плюгин к инет-еэксплореру
на остальных не знаю, да и не нужен он вобщемто )
Re: Nagios
Добавлено: 2008-05-23 15:35:36
Lycane
А кто нитЬ может подсказатЬ может ли Нагиос проверятЬ состояние свитчей, у которыхЪ нет IP, какими нибудЬ ARP-запросами?
Re: Nagios
Добавлено: 2008-05-23 16:34:44
hizel
пардон если нет ip значит и нет mac, какие arp запросы?
Re: Nagios
Добавлено: 2008-05-23 16:39:39
Lycane
mac, как ни странно, естЬ
управляются они WinSmart'ом... это так, к слову
Re: Nagios
Добавлено: 2008-05-23 16:54:17
hizel
мдя, вот изврат
посомотреть tcpdump-ом что там этот винсмарт делает на уровне пакетов
и сваять свой плгенчег
так к слову
Re: Nagios
Добавлено: 2008-05-23 17:03:17
Lycane
к слову - я не умею
естЬ такая тулза как arping, но я что то так и не разобраласЬ как она может пинговатЬ по маку..
кстати сами свитчи управляются по протоколу rrсp
Re: Nagios
Добавлено: 2008-05-23 21:28:11
hizel
_http://openrrcp.org.ru/ эту штуку да небольшой обвязкой и в нагиос
Re: Nagios
Добавлено: 2008-05-23 22:51:44
Lycane
а не могли бы вы чутЬ более подробно обЪяснить что там надо сделатЬ? а то как то не оченЬ понятно...
Re: Nagios
Добавлено: 2008-05-26 16:10:54
Lycane
Код: Выделить всё
#make
gcc -O2 -fno-strict-aliasing -pipe -march=athlon-mp rtl83xx.c rrcp_io.c rrcp_switches.c rrcp_config.c -o ../bin/rtl83xx
rrcp_io.c:68: error: syntax error before '*' token
rrcp_io.c:68: warning: data definition has no type or storage class
rrcp_io.c: In function `rtl83xx_prepare':
rrcp_io.c:180: error: invalid use of undefined type `struct addr'
rrcp_io.c:180: error: `ADDR_TYPE_ETH' undeclared (first use in this function)
rrcp_io.c:180: error: (Each undeclared identifier is reported only once
rrcp_io.c:180: error: for each function it appears in.)
rrcp_io.c:181: error: invalid use of undefined type `struct addr'
rrcp_io.c:181: error: `ETH_ADDR_BITS' undeclared (first use in this function)
rrcp_io.c:182: warning: assignment makes pointer from integer without a cast
rrcp_io.c:186: error: invalid use of undefined type `struct addr'
rrcp_io.c:190: error: invalid use of undefined type `struct addr'
rrcp_io.c:190: error: `ETH_ADDR_LEN' undeclared (first use in this function)
rrcp_io.c: At top level:
rrcp_io.c:71: error: storage size of `intf_mac' isn't known
*** Error code 1
кто нитЬ знает что ему нужно?
Re: Nagios
Добавлено: 2008-05-26 16:35:46
hizel
libdnet у вас стоит?
Re: Nagios
Добавлено: 2008-05-26 16:52:51
Lycane
Код: Выделить всё
# pkg_info | grep libnet
libnet11-1.1.2.1_1,1 A C library for creating IP packets
это оно?
Re: Nagios
Добавлено: 2008-05-27 15:09:52
hizel
похожь...
вы из svn брали?
Re: Nagios
Добавлено: 2008-05-28 9:34:20
Lycane
Честно говоря не помню уже, оно мне нужно было чтоб у меня плагин check_arping заработал
Re: Nagios
Добавлено: 2008-07-17 15:32:19
serpet
Можно подробнее про rrcp в nagios ?
Nagios только поставил, а вся сеть на свичах собрана что openrrcp обслуживаются.
оч хотелось-бы на мониторинг их поставить и к карте прикрутить...
Re: Nagios
Добавлено: 2008-07-29 13:08:02
Lycane
Мне бы этого тоже оченЬ дико хотелосЬ
прикрутитЬ то не сложно, openrrcp я себе установила, несколЬко повыпендривацца пришлосЬ, правда не разбираласЬ с ним ещО, не в курсе как он работает. Но я думаю на неделе время выкрою покопатЬся... РазберёшЬся ранЬше - напиши
Кстати по поводу карт, не NagVis'ом случайно полЬзуешЬся? Не могу понятЬ почему automap то ли не работает, то ли я не понимаю как оно должно работатЬ. Graphiz, который для этого необходим, естЬ.
Re: Nagios
Добавлено: 2008-07-29 15:31:23
hizel
если разберетесь как пускать эту штуку из командной строки и какой вывод
то накатать плагн не проблема
Re: Nagios
Добавлено: 2008-08-04 13:30:42
Lycane
Ну допустим как пускатЬ эту штуку из командной строки мы разобралисЬ
помогите теперЬ разобратЬся как её прикрутитЬ к Нагиосу
Re: Nagios
Добавлено: 2008-08-04 13:54:48
hizel
покажите как это выглядит
типа
Re: Nagios
Добавлено: 2008-08-04 14:21:20
Lycane
Ну вот как то так оно выглядит
Код: Выделить всё
lycane# ./rtl8316b authkey-00:80:48:52:6D:FA@re0 ping
! rtl83xx: trying to reach 16-port "generic rtl8316b" switch at authkey-00:80:48:52:6D:FA@re0
00:80:48:52:6d:fa responded
Re: Nagios
Добавлено: 2008-08-05 14:44:18
netbug
а не подскажите, реально сделать руссификацию нагиоса?
P.S. Собирал из портов, про статью с opennet в курсе.