增加cacti监控对象时导致数据库出问题

生产环境:

数据库:mysql 5.5.49-cll-lve

问题:在众多Cacti监控的对象中,由于增加了监控对象nginx,导致cacti在监控所有对象中仅有1个对象出图出数据。

分析:

1.systemutilities –>Rebuild poller cache #需要重建cache吗?
2.系统时间不准确,重新设置时间  #需要更新服务器时间吗?
3.图像没有生成,运行

# /usr/bin/php /var/www/html/cacti/poller.php --force #出现数据了吗?
4.权限问题,修改权限#chmod 777 -R /var/www/html/cacti/rra #没有权限吗?
5.crontab -e  #定时任务的问题吗?

6.数据库表有损坏。#需要修复数据库吗?

  出现问题之后,我们要通过检查错误日志来分析问题所在,请查看附件。

通过查看cacti日志文件,发现没有加载有效数据,通过修复cacti数据库解决了出图出数据的问题。

[[email protected] sky]# mysqlcheck--auto-repair --databases cacti  -p

Enter password:

cacti.cdef                                         OK

cacti.cdef_items                                   OK

cacti.colors                                       OK

cacti.data_input                                   OK

cacti.data_input_data

warning : 2 clients are using or haven‘t closed the table properly

status  : OK

cacti.data_input_fields                            OK

cacti.data_local

warning : 3 clients are using or haven‘t closed the table properly

status  : OK

cacti.data_template                                OK

cacti.data_template_data

warning : 3 clients are using or haven‘t closed the table properly

status  : OK

cacti.data_template_data_rra

warning : 2 clients are using or haven‘t closed the table properly

status  : OK

cacti.data_template_rrd

warning : 2 clients are using or haven‘t closed the table properly

status  : OK

cacti.graph_local

warning : 3 clients are using or haven‘t closed the table properly

status  : OK

cacti.graph_template_input                         OK

cacti.graph_template_input_defs                    OK

cacti.graph_templates                              OK

cacti.graph_templates_gprint                       OK

cacti.graph_templates_graph

warning : 3 clients are using or haven‘t closed the table properly

status  : OK

cacti.graph_templates_item

warning : 2 clients are using or haven‘t closed the table properly

status  : OK

cacti.graph_tree

warning : 1 client is using or hasn‘t closed the table properly

status  : OK

cacti.graph_tree_items

warning : 1 client is using or hasn‘t closed the table properly

status  : OK

cacti.host

warning : 9 clients are using or haven‘t closed the table properly

status  : OK

cacti.host_graph                                   OK

cacti.host_snmp_cache

warning : 9 clients are using or haven‘t closed the table properly

status  : OK

cacti.host_snmp_query                              OK

cacti.host_template                                OK

cacti.host_template_graph                          OK

cacti.host_template_snmp_query                     OK

cacti.plugin_config

warning : 1 client is using or hasn‘t closed the table properly

status  : OK

cacti.plugin_db_changes

warning : 1 client is using or hasn‘t closed the table properly

status  : OK

cacti.plugin_discover_hosts

warning : 5 clients are using or haven‘t closed the table properly

status  : OK

cacti.plugin_discover_template                     OK

cacti.plugin_hooks

warning : 1 client is using or hasn‘t closed the table properly

status  : OK

cacti.plugin_notification_lists                    OK

cacti.plugin_realms

warning : 1 client is using or hasn‘t closed the table properly

status  : OK

cacti.plugin_thold_contacts                        OK

cacti.plugin_thold_host_failed                     OK

cacti.plugin_thold_log

warning : 7 clients are using or haven‘t closed the table properly

status  : OK

cacti.plugin_thold_template_contact                OK

cacti.plugin_thold_threshold_contact               OK

cacti.poller                                       OK

cacti.poller_command

warning : 9 clients are using or haven‘t closed the table properly

status  : OK

cacti.poller_item

warning : 9 clients are using or haven‘t closed the table properly

status  : OK

cacti.poller_output                                OK

cacti.poller_output_rt

warning : 1 client is using or hasn‘t closed the table properly

status  : OK

cacti.poller_reindex

warning : 9 clients are using or haven‘t closed the table properly

status   : OK

cacti.poller_time                                  OK

cacti.rra                                          OK

cacti.rra_cf                                       OK

cacti.settings

warning : 9 clients are using or haven‘t closed the table properly

status  : OK

cacti.settings_graphs                              OK

cacti.settings_tree                                OK

cacti.snmp_query                                   OK

cacti.snmp_query_graph                             OK

cacti.snmp_query_graph_rrd                         OK

cacti.snmp_query_graph_rrd_sv                      OK

cacti.snmp_query_graph_sv                          OK

cacti.syslog                                       OK

cacti.syslog_alert                                 OK

cacti.syslog_facilities                            OK

cacti.syslog_host_facilities                       OK

cacti.syslog_hosts                                 OK

cacti.syslog_incoming                              OK

cacti.syslog_logs                                  OK

cacti.syslog_priorities                            OK

cacti.syslog_remove                                OK

cacti.syslog_removed                               OK

cacti.syslog_reports                               OK

cacti.syslog_statistics                            OK

cacti.thold_data

warning : 9 clients are using or haven‘t closed the table properly

status  : OK

cacti.thold_template                               OK

cacti.user_auth                                    OK

cacti.user_auth_perms                              OK

cacti.user_auth_realm

warning : 1 client is using or hasn‘t closed the table properly

status  : OK

cacti.user_log

warning : 8 clients are using or haven‘t closed the table properly

status  : OK

cacti.version                                      OK

UtilitiesUtilities

时间: 2024-07-28 23:13:56

增加cacti监控对象时导致数据库出问题的相关文章

增加cacti监控对象时导致无数据无图形出现

生产环境: 操作系统:CentOS release 6.8 (Final) 数据库:mysql 5.5.49-cll-lve 问题:在众多Cacti监控的对象中,由于增加一台服务器增加了一个了监控对象Windows系统,导致cacti在监控所有对象中仅有1个对象出图出数据. 分析: 1.图像没有生成,运行# /usr/bin/php /var/www/html/cacti/poller.php --force #出现数据了吗?2.权限问题,修改权限#chmod 777 -R /var/www/h

Mysql5.7.11 安装 cacti0.8.8f ,在导入cacti.sql数据库时出现下记错误,导致数据库导入终止: ERROR 1067 (42000) at line 1847: Invalid default value for 'status_fail_date'

解决方法:vim /etc/my.cnf 文件,加入 : sql-mode="NO_ENGINE_SUBSTITUTION" , Systemctl restart mysqld 进入mysql的之后可执行: select @@sql_mode 查询当前使用的sql_mode是什么 Mysql5.7.11 安装 cacti0.8.8f ,在导入cacti.sql数据库时出现下记错误,导致数据库导入终止: ERROR 1067 (42000) at line 1847: Invalid

Cacti监控mysql数据库服务器实现过程

Cacti监控mysql数据库服务器实现过程 2014-05-29      0个评论    来源:Cacti监控mysql数据库服务器实现过程   收藏    我要投稿 1 先在cacti服务器端安装mysql模板 wget https://mysql-cacti-templates.googlecode.com/files/better-cacti-templates-1.1.8.tar.gz tar –xvf better-cacti-templates-1.1.8.tar.gz cd b

Cacti 监控 SQL Server 数据库图文详解

模板下载: (1)可以直接下载本站发布的 Cnyunwei-Cacti+Nagios 集成全自动安装ISO进行安装,已集成此模板及更多的使用插件模板(2)可以直接去官方论坛下载最新的模板 http://forums.cacti.net/viewtopic.php?f=12&t=38135 php-mssql配置: cacti的机器上必须有php-mssql驱动php -m | grep mssql 查看是否有mssql,如没有安装的话,直接yum安装即可 yum install php-mssq

Cacti监控图像增加对redis多实例监控的支持

1.下载percona模板,解压 wget http://www.percona.com/redir/downloads/percona-monitoring-plugins/1.0.1/percona-monitoring-plugins-1.0.1.tar.gz 2.在redis的默认模板配置文件的基础上增加选项port2,用户在新建redis监控图像时要求填写redis端口号,不填的话就是默认的6379,ss_get_by_ssh.php脚本通过port2选项连接指定端口的redis实例:

验证当多个类之间有继承关系时,创建子类对象会导致父类初始化块的执行。

结果:当多个类之间有继承关系时,创建子类对象会导致父类初始化块的执行.

利用yum 安装 lamp环境搭载 cacti监控和memcached数据库

今天测试了一下yum安装lamp和cacti监/控已经memcached数据库 首先介绍下我的系统环境 centos6.7 x86-64 1安装cacti yum install cacti 安装cacti 会自动安装lamp环境, 2接下来是memcached的安装步骤 yum install -y epel-release  --安装epel扩展源 里面有提供memcached libmemcached包 yum install -y libevent  memcached libmemca

实战2 Cacti监控Localhost和Remote Host

上篇博文主要讲解了cacti监控host主机,由于上篇博文cacti的版本也不是最新的!所以在实战2更新了cacti的版本,并添加了监控远程服务器和优化轮询 实战2 重点 一.新版cacti监控host 二.新版cacti监控Remote Host 三.新版cacti优化spine轮询 附加 四.网卡流量和存储挂在盘 一.新版cacti监控host 1.安装lamp平台 [[email protected] ~]# yum install -y httpd php php-mysql php-s

Cacti监控服务器配置教程(基于CentOS+Nginx+MySQL+PHP环境搭建)

具体案例:局域网内有两台主机,一台Linux.一台Windows,现在需要配置一台Cacti监控服务器对这两台主机进行监控环境说明:1.Linux主机操作系统:CentOS 6.2IP地址:192.168.21.164子网掩码:255.255.255.0网关:192.168.21.2DNS:8.8.8.8 8.8.4.42.Windows主机操作系统:Windows Server 2003IP地址:192.168.21.130子网掩码:255.255.255.0网关:192.168.21.2DN