Страница 1 из 1

Не запускается SNMP

Добавлено: 2011-04-12 13:42:08
Daywalker
Здравствуйте.

Установил из портов Net-SNMP (net-snmp-5.5_4)

Создал файл

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

less /usr/local/etc/snmp/snmpd.conf
rocommunity  Ka5tu3e7!gh 192.168.95.99
Внес записи в /etc/rc.conf

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

#################### SNMP ################
snmpd_enable="YES"
snmpd_conffile=/usr/local/etc/snmp/snmpd.conf
NET_SNMP_LOGFILE=/var/log/snmpd.log
Запускаю

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

/usr/local/etc/rc.d/snmpd start
Starting snmpd.
/usr/local/etc/rc.d/snmpd: WARNING: failed to start snmpd
Смотрю лог:

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

tail -f /var/log/snmpd.log
mibII/mta_sendmail.c:open_sendmailst: could not guess version of statistics file "/var/log/sendmail.st"
Error opening specified endpoint ""
Server Exiting with code 1

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

ls -la /var/log/sendmail.st
-rw-r--r--  1 root  wheel  0 12 апр 03:00 /var/log/sendmail.st
Файл /var/log/sendmail.st пустой, на этой машине стоит postfix (это к сведению, если надо).

Подскажите пожалуйста, что сделать, чтобы запустить?

Re: Не запускается SNMP

Добавлено: 2011-04-14 16:05:36
Alex Keda
странно.
поставьте тока

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

snmpd_enable="YES"
а остальное уберите

Re: Не запускается SNMP

Добавлено: 2011-04-14 16:48:05
Daywalker
Alex Keda писал(а):странно.
поставьте тока

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

snmpd_enable="YES"
а остальное уберите
Сделал, результат тот же

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

/usr/local/etc/rc.d/snmpd start
Starting snmpd.
/usr/local/etc/rc.d/snmpd: WARNING: failed to start snmpd
tail -f /var/log/snmpd.log
mibII/mta_sendmail.c:open_sendmailst: could not guess version of statistics file "/var/log/sendmail.st"
Error opening specified endpoint ""
Server Exiting with code 1

Re: Не запускается SNMP

Добавлено: 2011-10-13 13:58:25
Gegrby
Перенеси конфиг в /usr/local/etc/snmpd.conf

И сообщение о ошибке (Error opening specified endpoint "") уйдёт

в конфиге можно будет задать

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

###########################################################################
# SECTION: Agent Operating Mode
#
#   This section defines how the agent will operate when it
#   is running.

# agentaddress: The IP address and port number that the agent will listen on.
#   By default the agent listens to any and all traffic from any
#   interface on the default SNMP port (161).  This allows you to
#   specify which address, interface, transport type and port(s) that you
#   want the agent to listen on.  Multiple definitions of this token
#   are concatenated together (using ':'s).
#   arguments: [transport:]port[@interface/address],...

#  Listen for connections from the local system only
#agentAddress  udp:127.0.0.1:161

#  Listen for connections on all interfaces (both IPv4 *and* IPv6)
#agentAddress udp:161,udp6:[::1]:161

#agentAddress udp:161@fxp0/10.20.0.1

agentAddress  udp:10.10.0.1:161



Re: Не запускается SNMP

Добавлено: 2011-10-14 11:26:01
Daywalker
спасибо. Попробую.