首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Observium - Graphs显示无数据(nan)或空图

Observium - Graphs显示无数据(nan)或空图
EN

Stack Overflow用户
提问于 2018-03-08 19:35:33
回答 2查看 1.5K关注 0票数 1

我对Observium有问题。我在CentOS 7上安装了Observium。在这台服务器上,我还安装了DirectAdmin和Wordpress。当我登录webpanel Observium时,Graphs没有显示任何数据(nan)。Graphs no data

代码语言:javascript
复制
<?php

## Check http://www.observium.org/docs/config_options/ for documentation of possible settings

## It's recommended that settings are edited in the web interface at /settings/ on your observium installation.
## Authentication and Database settings must be hardcoded here because they need to work before you can reach the web-based configuration interface

// Database config ---  This MUST be configured
$config['db_extension'] = 'mysqli';
$config['db_host']      = 'localhost';
$config['db_user']      = 'root';
$config['db_pass']      = '[MyPassword]';
$config['db_name']      = 'observium';

$config['ping'] = "/usr/sbin/ping";
$config['fping'] = "/usr/sbin/fping";

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

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

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

// Enable alerter
// $config['poller-wrapper']['alerter'] = TRUE;

//$config['web_show_disabled'] = FALSE;    // Show or not disabled devices on major pages.

// Set up a default alerter (email to a single address)
//$config['email']['default']        = "user@your-domain";
//$config['email']['from']           = "Observium <observium@your-domain>";
//$config['email']['default_only']   = TRUE;

$config['enable_syslog']                = 1; // Enable Syslog

// End config.php

当我手动执行时,我看不到任何错误:

代码语言:javascript
复制
cd /opt/observium && ./discovery.php -h all && ./poller.php -h all

我的/etc/cron.d/observium文件

代码语言:javascript
复制
33 */6 * * *   root    cd /opt/observium/ && ./discovery.php -h all >> /dev/null 2>&1
*/15 * * * *   root    cd /opt/observium/ && ./discovery.php -h new >> /dev/null 2>&1
*/15 * * * *   root    cd /opt/observium/ && ./poller.php -h all >> /dev/null 2>&1
EN

回答 2

Stack Overflow用户

发布于 2019-10-11 06:02:43

您使用了错误的轮询时间(15分钟)。正确的轮询时间是5分钟。使用官方安装指南CentOS Cron中描述的cron条目

代码语言:javascript
复制
# Run a complete discovery of all devices once every 6 hours
33  */6   * * *   root    /opt/observium/discovery.php -h all >> /dev/null 2>&1

# Run automated discovery of newly added devices every 5 minutes
*/5 *     * * *   root    /opt/observium/discovery.php -h new >> /dev/null 2>&1

# Run multithreaded poller wrapper every 5 minutes
*/5 *     * * *   root    /opt/observium/poller-wrapper.py >> /dev/null 2>&1
票数 0
EN

Stack Overflow用户

发布于 2020-07-02 18:13:13

这可能是安装的问题,因为它在我的情况下。Observium在这里Observium bugreport有bug,解释为“完全按照手册重新安装”。这个observium installation guide是一个很好的安装信息页面。

在我的例子中,问题是我有一个observium文件夹,所有脚本都在Documents文件夹中,并将html子文件夹符号链接到/opt/observium/html。我修复了这一问题,将整个observium文件夹符号转换为/opt/observium/,这是根据/etc/apache2/sites-available/000-default.conf中的observium手动DocumentRoot设置的

代码语言:javascript
复制
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /opt/observium/html
    <FilesMatch \.php$>
      SetHandler application/x-httpd-php
    </FilesMatch>
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /opt/observium/html/>
            DirectoryIndex index.php
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Require all granted
    </Directory>
    ErrorLog  ${APACHE_LOG_DIR}/error.log
    LogLevel warn
    CustomLog  ${APACHE_LOG_DIR}/access.log combined
    ServerSignature On
</VirtualHost>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49172122

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档