在 Observium 上添加端口

Add ports on Observium

我已经安装了 Observium,它运行良好,除了一件事:没有显示任何端口。 我添加了 3 个安装了 snmpd 的设备(Debian 7),显示了所有图表(cpu,内存),除了网络流量图表,在首页上,它显示:

 Ports  0   0 up    0 down  0 ignored   0 disabled

我还在一台设备上安装了代理,它没有任何改变。

使用的配置在这里(所有隐私信息都注明xx):

$config['db_host'] = 'localhost';
$config['db_user'] = 'xx';
$config['db_pass'] = 'xx';
$config['db_name'] = 'xx';

// Base directory
$config['install_dir'] = "/opt/observium";

// Default community list to use when adding/discovering
$config['snmp']['community'] = array("xx");

// Authentication Model
$config['auth_mechanism'] = "mysql";    // default, other options: ldap, http-auth, please see documentation for config he$

// Enable alerter (not available in CE)
#$config['poller-wrapper']['alerter'] = TRUE;

// Set up a default alerter (email to a single address)
$config['alerts']['alerter']['default']['descr']   = "Observium - Alert";
$config['alerts']['alerter']['default']['type']    = "email";
$config['alerts']['alerter']['default']['contact'] = "xx@xx.com";
$config['alerts']['alerter']['default']['enable']  = TRUE;

$config['poller_modules']['unix-agent'] = 1;
$config['collectd_dir'] = '/var/lib/collectd/rrd';
$config['int_customers']           = 1;  # Enable Customer Port Parsing
$config['int_transit']             = 1;  # Enable Transit Types
$config['int_peering']             = 1;  # Enable Peering Types
$config['int_core']                = 1;  # Enable Core Port Types
$config['int_l2tp']                = 0;  # Enable L2TP Port Types
$config['show_locations']          = 1;  # Enable Locations on menu
$config['show_locations_dropdown'] = 1;  # Enable Locations dropdown on menu
$config['show_services']           = 0;  # Enable Services on menu (Disabled by default as this option is deprecated)
$config['ports_page_default']      = "details/"; ## eg "details/" "graphs/bits/"
$config['show_overview_tab'] = true;
$config['overview_show_sysDescr'] = true;
$config['frontpage']['device_status']['ports'] = true;
$config['device_traffic_iftype']  = array('/loopback/','/tunnel/','/virtual/','/mpls/');
$config['device_traffic_descr']   = array('/loopback/','/vlan/','/tunnel/','/:\d+/');
// End config.php

是配置问题吗?是否仅来自专业版? 谢谢你的帮助,我是 Observium 的新手,我真的觉得它很棒(除了这个小问题......)

问题解决了! 轻松修复我的 MySQL Observium 数据库:

ALTER TABLE  `ports` CHANGE  `port_label_short`  `port_label_short` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ; 

说明:

我有 运行 ./discovery.php -d -m ports -h 4(4 是我的主机 ID),当 运行 查询时它显示了很多错误:

ERROR[Error in query: (1364) Field 'port_label_short' doesn't have a default value]

这个错误是关键,因为我只需要在此列上设置一个默认值。