开发者社区> 问答> 正文

Cacti有图无流量 - Cacti报错

"

运行环境:<span style=""font-size:13.3333px;"">Redhat上搭建Vmare里运行Centos安装cacti(已经启动)

<table style=""width:100%;"" cellpadding=""2"" cellspacing=""0"" border=""1"" bordercolor=""#000000"">

CentOS Vmware Redhat
已经正常运行一段时间,后来带宽升级了,需要修改/plugins/weathermap/editor.php参数。但是不知道虚拟机CentOS的密码,进入single模式重置了root密码。修改参数成功,突然发现topology里面流量都变为0。 Graphs里面也是这样: Weathermaps发现一个错误:

"

展开
收起
montos 2020-06-04 13:22:54 861 0
1 条回答
写回答
取消 提交回答
  • "

    开启Configuration-Settings-General-Poller Specific Logging-Poller Logging Level-DEBUG-Save

    查看Utilities-System Utilities-View Cacti Log File

    11:20:15 AM - SPINE: Poller[0] ERROR: SQL Failed! Error:'145', Message:'Table './cacti/poller_output' is marked as crashed and should be repaired', SQL Fragment:'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (2668,'cpu','2016-06-14 11:20:14','3 

    修复数据库

    ###### >今日Cacti不显示流量,有如下 告警信息:

    0/17/2012 10:26:38 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'145', SQL:"select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000" 
    10/17/2012 10:26:37 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'145', SQL:"select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000" 
    10/17/2012 10:26:36 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'145', SQL:"select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"  

    Mysql中数据表修复:
    #用REPAIR TABLE方式修复,语法:REPAIR TABLE 表名 [选项]
    #进入Mysql数据库:
    C:\AppServ\MySQL\bin>mysql -u root -p
    Enter password: **************
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 87
    Server version: 5.0.45-community-nt-log MySQL Community Edition (GPL)
     
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    #显示所有数据库:
    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | cacti              |
    | mysql              |
    | phpmyadmin         |
    | test               |
    +--------------------+
    5 rows in set (0.00 sec)
     
    mysql>
    #连接损坏表所在的数据库:
    mysql> use cacti;
    Database changed
    #查看当前连接的数据库:
    mysql> select database();
    +------------+
    | database() |
    +------------+
    | cacti      |
    +------------+
    1 row in set (0.00 sec)
    # REPAIR TABLE修复数据表
    mysql> REPAIR TABLE poller_item;
    +-------------------+--------+----------+----------+
    | Table             | Op     | Msg_type | Msg_text |
    +-------------------+--------+----------+----------+
    | cacti.poller_item | repair | status   | OK       |
    +-------------------+--------+----------+----------+
    1 row in set (0.02 sec)
     
    mysql>
    修复成功。
    如果修复失败,可以尝试用USE_FRM选项,例:
    mysql> REPAIR TABLE poller_item USE_FRM;

    "
    2020-06-04 13:31:18
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载