Cacti.И снова я ...

Операционки на базе Unix
blackdog
Злой чайник
Злой чайник
Сообщения: 111
Зарегистрирован: 07 мар 2014, 18:23
ОС: MSDOS

Re: Cacti.И снова я ...

Сообщение blackdog » 21 июн 2015, 13:08

Новая заморочка-нет мониторинга загрузки проца и сети.
По процу попробовал запустить

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

snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.10.1.3.2
snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.10.1.3.2

в ответ

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

inux-suse:/srv/www/cacti/rra # snmpwalk -Os -c public -v 1 localhost .1.3.6.1.2.1.25.3.3.1.2
hrProcessorLoad.196608 = INTEGER: 5
hrProcessorLoad.196609 = INTEGER: 4
hrProcessorLoad.196610 = INTEGER: 5
hrProcessorLoad.196611 = INTEGER: 4
linux-suse:/srv/www/cacti/rra # snmpwalk -c public -v 1 localhost .1.3.6.1.2.1.25.3.3.1.2
HOST-RESOURCES-MIB::hrProcessorLoad.196608 = INTEGER: 5
HOST-RESOURCES-MIB::hrProcessorLoad.196609 = INTEGER: 5
HOST-RESOURCES-MIB::hrProcessorLoad.196610 = INTEGER: 5
HOST-RESOURCES-MIB::hrProcessorLoad.196611 = INTEGER: 5
linux-suse:/srv/www/cacti/rra # snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.10.1.3.1
UCD-SNMP-MIB::laLoad.1 = STRING: 0.30
linux-suse:/srv/www/cacti/rra # snmpwalk -c public -v 1 localhost .1.3.6.1.2.1.25.3.3.1.1
HOST-RESOURCES-MIB::hrProcessorFrwID.196608 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.196609 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.196610 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.196611 = OID: SNMPv2-SMI::zeroDotZero
l
Кто имеет опыт в корректировке скриптов для кактуса-помогите исправить
ситуацию.
В самом кактусе вывод Data query debug проца

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

+ Running data query [9].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at '/srv/www/cacti/resource/script_server/host_cpu.xml'
+ XML file parsed ok.
+ Executing script for num of indexes '"/usr/bin/php" -q /srv/www/cacti/scripts/ss_host_cpu.php 127.0.0.1 1 0:161:500:1:10:public:::::: num_indexes'
+ Found number of indexes: 0
+ Executing script for list of indexes '"/usr/bin/php" -q /srv/www/cacti/scripts/ss_host_cpu.php 127.0.0.1 1 0:161:500:1:10:public:::::: index' Index Count: 0
+ Executing script query '"/usr/bin/php" -q /srv/www/cacti/scripts/ss_host_cpu.php 127.0.0.1 1 0:161:500:1:10:public:::::: query index'

и сети

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

+ Running data query [1].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/srv/www/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP get for num of indexes @ '.1.3.6.1.2.1.2.1.0' Index Count: U
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1' Index Count: 0
+ No SNMP data returned
Но если пустить команду с OID то что то показывает

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

linux-suse:/srv/www/cacti/rra # snmpwalk -c public -v 1 localhost .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2

по сети могут быть заморочки из за мамки-довольно эксклюзивная железка
досталась,возможно mibы не подходят,но проц должен вроде работать


вот еще нашел методы для проверки-то есть SNMP видит проц.

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

linux-suse:/srv/www/cacti/rra # snmpwalk -c public -v 1 localhost | grep ProcessorLoad
HOST-RESOURCES-MIB::hrProcessorLoad.196608 = INTEGER: 5
HOST-RESOURCES-MIB::hrProcessorLoad.196609 = INTEGER: 4
HOST-RESOURCES-MIB::hrProcessorLoad.196610 = INTEGER: 4
HOST-RESOURCES-MIB::hrProcessorLoad.196611 = INTEGER: 3
HOST-RESOURCES-MIB::hrSWRunParameters.24902 = STRING: "--color=auto ProcessorLoad"
linux-suse:/srv/www/cacti/rra # snmptranslate -On HOST-RESOURCES-MIB::hrProcessorLoad
.1.3.6.1.2.1.25.3.3.1.2
linux-suse:/srv/www/cacti/rra #
blackdog
Злой чайник
Злой чайник
Сообщения: 111
Зарегистрирован: 07 мар 2014, 18:23
ОС: MSDOS

Re: Cacti.И снова я ...

Сообщение blackdog » 23 июн 2015, 12:03

Вопрос решился пересозданием хоста-появился и проц и сеть
blackdog
Злой чайник
Злой чайник
Сообщения: 111
Зарегистрирован: 07 мар 2014, 18:23
ОС: MSDOS

Re: Cacti.И снова я ...

Сообщение blackdog » 17 авг 2015, 19:54

Снова странности.
Переустановил систему после крах файловой.
Настраиваю кактуса.Все проходит штатно до момента отработки полера.
Какая то засада засела в бд(МариаДБ)

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

linux-suse:/ # service mysql status
mysql.service - MySQL server
   Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled)
   Active: active (running) since Sun 2015-08-16 18:14:40 KGT; 10min ago
  Process: 29481 ExecStartPost=/usr/lib/mysql/mysql-systemd-helper wait default (code=exited, status=0/SUCCESS)
  Process: 29472 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade default (code=exited, status=0/SUCCESS)
  Process: 29464 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install default (code=exited, status=0/SUCCESS)
Main PID: 29480 (mysql-systemd-h)
   CGroup: /system.slice/mysql.service
           |-29480 /bin/bash /usr/lib/mysql/mysql-systemd-helper start default
           `-29494 /usr/sbin/mysqld --user=mysql --group=mysql --innodb_file_format=Barracuda --innodb_file_per_table=ON --server-id=1 --sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [ERROR] mysqld: Table './cacti/rra_cf' is marked as crashed and should be repaired
Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [Warning] Checking table:   './cacti/rra_cf'
Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [ERROR] mysqld: Table './cacti/snmp_query_graph' is marked as crashed and should be repaired
Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [Warning] Checking table:   './cacti/snmp_query_graph'
Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [ERROR] mysqld: Table './cacti/snmp_query_graph_rrd' is marked as crashed and should be repaired
Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [Warning] Checking table:   './cacti/snmp_query_graph_rrd'
Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [ERROR] mysqld: Table './cacti/snmp_query_graph_rrd_sv' is marked as crashed and should be repaired
Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [Warning] Checking table:   './cacti/snmp_query_graph_rrd_sv'
Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [ERROR] mysqld: Table './cacti/snmp_query_graph_sv' is marked as crashed and should be repaired
Aug 16 18:17:36 linux-suse mysql-systemd-helper[29480]: 150816 18:17:36 [Warning] Checking table:   './cacti/snmp_query_graph_sv'
Делаю следующее

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

linux-suse:/ # mysqlcheck -u cactiuser -p --auto-repair  --database cacti
Enter password:
cacti.cdef                                         OK
cacti.cdef_items                                   OK
cacti.colors                                       OK
cacti.data_input                                   OK
cacti.data_input_data                              OK
cacti.data_input_fields                            OK
cacti.data_local                                   OK
cacti.data_template                                OK
cacti.data_template_data                           OK
cacti.data_template_data_rra                       OK
cacti.data_template_rrd                            OK
cacti.graph_local                                  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                        OK
cacti.graph_templates_item                         OK
cacti.graph_tree                                   OK
cacti.graph_tree_items                             OK
cacti.host                                         OK
cacti.host_graph                                   OK
cacti.host_snmp_cache                              OK
cacti.host_snmp_query                              OK
cacti.host_template                                OK
cacti.host_template_graph                          OK
cacti.host_template_snmp_query                     OK
cacti.plugin_config                                OK
cacti.plugin_db_changes                            OK
cacti.plugin_hooks                                 OK
cacti.plugin_realms                                OK
cacti.poller                                       OK
cacti.poller_command                               OK
cacti.poller_item                                  OK
cacti.poller_output                                OK
cacti.poller_reindex                               OK
cacti.poller_time                                  OK
cacti.rra                                          OK
cacti.rra_cf                                       OK
cacti.settings                                     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.user_auth                                    OK
cacti.user_auth_perms                              OK
cacti.user_auth_realm                              OK
cacti.user_log                                     OK
cacti.version                                      OK
После этого

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

linux-suse:/ # service mysql restart
linux-suse:/ # service mysql status
mysql.service - MySQL server
   Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled)
   Active: active (running) since Sun 2015-08-16 18:29:23 KGT; 1s ago
  Process: 31259 ExecStartPost=/usr/lib/mysql/mysql-systemd-helper wait default (code=exited, status=0/SUCCESS)
  Process: 31250 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade default (code=exited, status=0/SUCCESS)
  Process: 31242 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install default (code=exited, status=0/SUCCESS)
Main PID: 31258 (mysql-systemd-h)
   CGroup: /system.slice/mysql.service
           |-31258 /bin/bash /usr/lib/mysql/mysql-systemd-helper start default
           `-31272 /usr/sbin/mysqld --user=mysql --group=mysql --innodb_file_format=Barracuda --innodb_file_per_table=ON --server-id=1 --sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] InnoDB: Restoring possible half-written data pages
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] InnoDB: from the doublewrite buffer...
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] InnoDB: 128 rollback segment(s) are active.
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] InnoDB: Waiting for purge to start
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.24-72.2 started; log sequence number 1656312
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] Server socket created on IP: '::'.
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] Event Scheduler: Loaded 0 events
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] /usr/sbin/mysqld: ready for connections.
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: Version: '10.0.20-MariaDB'  socket: '/var/run/mysql/mysql.sock'  port: 3306  openSUSE package
Aug 16 18:29:23 linux-suse mysql-systemd-helper[31259]: MySQL is alive
linux-suse:/ #
Но вот в логе кактуса наблюдаю

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

08/16/2015 12:29:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
08/16/2015 12:29:59 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
08/16/2015 12:29:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
08/16/2015 12:29:59 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
08/16/2015 12:29:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
08/16/2015 12:29:59 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
08/16/2015 12:29:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
08/16/2015 12:29:59 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
Пересоздвал базу,всяко разно извращался с утилитами
repair_database.php
repair_templates.php

Но проблема одна и таже.
Откатился на версию МариаДБ ниже-не помогло,проблема та же самая
Чего это за печаль?
Через некоторое время снова то же самое

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

linux-suse:/ # service mysql status
mysql.service - MySQL server
   Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled)
   Active: active (running) since Sun 2015-08-16 18:29:23 KGT; 11min ago
  Process: 31259 ExecStartPost=/usr/lib/mysql/mysql-systemd-helper wait default (code=exited, status=0/SUCCESS)
  Process: 31250 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade default (code=exited, status=0/SUCCESS)
  Process: 31242 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install default (code=exited, status=0/SUCCESS)
Main PID: 31258 (mysql-systemd-h)
   CGroup: /system.slice/mysql.service
           |-31258 /bin/bash /usr/lib/mysql/mysql-systemd-helper start default
           `-31272 /usr/sbin/mysqld --user=mysql --group=mysql --innodb_file_format=Barracuda --innodb_file_per_table=ON --server-id=1 --sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] InnoDB: 128 rollback segment(s) are active.
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] InnoDB: Waiting for purge to start
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.24-72.2 started; log sequence number 1656312
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] Server socket created on IP: '::'.
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] Event Scheduler: Loaded 0 events
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: 150816 18:29:22 [Note] /usr/sbin/mysqld: ready for connections.
Aug 16 18:29:22 linux-suse mysql-systemd-helper[31258]: Version: '10.0.20-MariaDB'  socket: '/var/run/mysql/mysql.sock'  port: 3306  openSUSE package
Aug 16 18:29:23 linux-suse mysql-systemd-helper[31259]: MySQL is alive
Aug 16 18:30:01 linux-suse mysql-systemd-helper[31258]: 150816 18:30:01 [ERROR] mysqld: Table './cacti/settings' is marked as crashed and should be repaired
Aug 16 18:30:01 linux-suse mysql-systemd-helper[31258]: 150816 18:30:01 [Warning] Checking table:   './cacti/settings'
Лог кактуса чуть меняется но spine так же не работает

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

08/16/2015 12:40:00 PM - SYSTEM STATS: Time:298.6500 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0
08/16/2015 12:40:00 PM - POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting.
Еще данные

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

linux-suse:/srv/www/cacti/cli # php repair_database.php
Repairing All Cacti Database Tables
Repairing Table -> \'cdef\' Successful
Repairing Table -> \'cdef_items\' Successful
Repairing Table -> \'colors\' Successful
Repairing Table -> \'data_input\' Successful
Repairing Table -> \'data_input_data\' Successful
Repairing Table -> \'data_input_fields\' Successful
Repairing Table -> \'data_local\' Successful
Repairing Table -> \'data_template\' Successful
Repairing Table -> \'data_template_data\' Successful
Repairing Table -> \'data_template_data_rra\' Successful
Repairing Table -> \'data_template_rrd\' Successful
Repairing Table -> \'graph_local\' Successful
Repairing Table -> \'graph_template_input\' Successful
Repairing Table -> \'graph_template_input_defs\' Successful
Repairing Table -> \'graph_templates\' Successful
Repairing Table -> \'graph_templates_gprint\' Successful
Repairing Table -> \'graph_templates_graph\' Successful
Repairing Table -> \'graph_templates_item\' Successful
Repairing Table -> \'graph_tree\' Successful
Repairing Table -> \'graph_tree_items\' Successful
Repairing Table -> \'host\' Successful
Repairing Table -> \'host_graph\' Successful
Repairing Table -> \'host_snmp_cache\' Successful
Repairing Table -> \'host_snmp_query\' Successful
Repairing Table -> \'host_template\' Successful
Repairing Table -> \'host_template_graph\' Successful
Repairing Table -> \'host_template_snmp_query\' Successful
Repairing Table -> \'plugin_config\' Successful
Repairing Table -> \'plugin_db_changes\' Successful
Repairing Table -> \'plugin_hooks\' Successful
Repairing Table -> \'plugin_realms\' Successful
Repairing Table -> \'poller\' Successful
Repairing Table -> \'poller_command\' Successful
Repairing Table -> \'poller_item\' Successful
Repairing Table -> \'poller_output\' Successful
Repairing Table -> \'poller_reindex\' Successful
Repairing Table -> \'poller_time\' Successful
Repairing Table -> \'rra\' Successful
Repairing Table -> \'rra_cf\' Successful
Repairing Table -> \'settings\' Successful
Repairing Table -> \'settings_graphs\' Successful
Repairing Table -> \'settings_tree\' Successful
Repairing Table -> \'snmp_query\' Successful
Repairing Table -> \'snmp_query_graph\' Successful
Repairing Table -> \'snmp_query_graph_rrd\' Successful
Repairing Table -> \'snmp_query_graph_rrd_sv\' Successful
Repairing Table -> \'snmp_query_graph_sv\' Successful
Repairing Table -> \'user_auth\' Successful
Repairing Table -> \'user_auth_perms\' Successful
Repairing Table -> \'user_auth_realm\' Successful
Repairing Table -> \'user_log\' Successful
Repairing Table -> \'version\' Successful

NOTE: Checking for Invalid Cacti Templates
NOTE: 11 Invalid Data Input Data Rows Found in Data Templates

WARNING: Cacti Template Problems found in your Database.  Using the \'--force\' option will remove
the invalid records.  However, these changes can be catastrophic to existing data sources.  Therefore, you
should contact your support organization prior to proceeding with that repair.

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

linux-suse:/srv/www/cacti/cli # php repair_database.php --force
Repairing All Cacti Database Tables
Repairing Table -> \'cdef\' Successful
Repairing Table -> \'cdef_items\' Successful
Repairing Table -> \'colors\' Successful
Repairing Table -> \'data_input\' Successful
Repairing Table -> \'data_input_data\' Successful
Repairing Table -> \'data_input_fields\' Successful
Repairing Table -> \'data_local\' Successful
Repairing Table -> \'data_template\' Successful
Repairing Table -> \'data_template_data\' Successful
Repairing Table -> \'data_template_data_rra\' Successful
Repairing Table -> \'data_template_rrd\' Successful
Repairing Table -> \'graph_local\' Successful
Repairing Table -> \'graph_template_input\' Successful
Repairing Table -> \'graph_template_input_defs\' Successful
Repairing Table -> \'graph_templates\' Successful
Repairing Table -> \'graph_templates_gprint\' Successful
Repairing Table -> \'graph_templates_graph\' Successful
Repairing Table -> \'graph_templates_item\' Successful
Repairing Table -> \'graph_tree\' Successful
Repairing Table -> \'graph_tree_items\' Successful
Repairing Table -> \'host\' Successful
Repairing Table -> \'host_graph\' Successful
Repairing Table -> \'host_snmp_cache\' Successful
Repairing Table -> \'host_snmp_query\' Successful
Repairing Table -> \'host_template\' Successful
Repairing Table -> \'host_template_graph\' Successful
Repairing Table -> \'host_template_snmp_query\' Successful
Repairing Table -> \'plugin_config\' Successful
Repairing Table -> \'plugin_db_changes\' Successful
Repairing Table -> \'plugin_hooks\' Successful
Repairing Table -> \'plugin_realms\' Successful
Repairing Table -> \'poller\' Successful
Repairing Table -> \'poller_command\' Successful
Repairing Table -> \'poller_item\' Successful
Repairing Table -> \'poller_output\' Successful
Repairing Table -> \'poller_reindex\' Successful
Repairing Table -> \'poller_time\' Successful
Repairing Table -> \'rra\' Successful
Repairing Table -> \'rra_cf\' Successful
Repairing Table -> \'settings\' Successful
Repairing Table -> \'settings_graphs\' Successful
Repairing Table -> \'settings_tree\' Successful
Repairing Table -> \'snmp_query\' Successful
Repairing Table -> \'snmp_query_graph\' Successful
Repairing Table -> \'snmp_query_graph_rrd\' Successful
Repairing Table -> \'snmp_query_graph_rrd_sv\' Successful
Repairing Table -> \'snmp_query_graph_sv\' Successful
Repairing Table -> \'user_auth\' Successful
Repairing Table -> \'user_auth_perms\' Successful
Repairing Table -> \'user_auth_realm\' Successful
Repairing Table -> \'user_log\' Successful
Repairing Table -> \'version\' Successful

NOTE: Checking for Invalid Cacti Templates
NOTE: 11 Invalid Data Input Data Rows Removed from Data Templates
Однако все так же и остается,полсе рестарта БД в логе кактуса

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

08/17/2015 01:50:00 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_bottom' AND ph.name IN ('snmpagent', 'settings', 'boost', 'dsstats') UNION SELECT pc.id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_bottom' AND ph.name NOT IN ('snmpagent', 'settings', 'boost', 'dsstats') ORDER BY id ASC"
08/17/2015 01:50:00 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'2006', SQL:"REPLACE INTO settings (name,value) VALUES ('stats_recache','RecacheTime:0.0 HostsRecached:0')'
08/17/2015 01:50:00 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT COUNT(*) FROM poller_command"
08/17/2015 01:50:00 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'cacti_stats_update' AND ph.name IN ('snmpagent', 'settings', 'boost', 'dsstats') UNION SELECT pc.id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'cacti_stats_update' AND ph.name NOT IN ('snmpagent', 'settings', 'boost', 'dsstats') ORDER BY id ASC"
08/17/2015 01:50:00 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'2006', SQL:"REPLACE INTO settings (name,value) VALUES ('stats_poller','Time:298.8860 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0')'
08/17/2015 01:50:00 PM - SYSTEM STATS: Time:298.8860 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0
08/17/2015 01:50:00 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_exiting' AND ph.name IN ('snmpagent', 'settings', 'boost', 'dsstats') UNION SELECT pc.id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_exiting' AND ph.name NOT IN ('snmpagent', 'settings', 'boost', 'dsstats') ORDER BY id ASC"
08/17/2015 01:50:00 PM - POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting.
08/17/2015 01:50:00 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
08/17/2015 01:50:00 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000" 
Вижу что БД ругается на несоответствие времени,

08/17/2015 01:49:59 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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) order by poller_output.local_data_id LIMIT 10000"
Но не уверен
Аватара пользователя
Raven
Бородатый сис
Бородатый сис
Сообщения: 2800
Зарегистрирован: 03 мар 2010, 15:12
ОС: RHEL 8
Откуда: Из серверной

Re: Cacti.И снова я ...

Сообщение Raven » 18 авг 2015, 14:53

1 После восстановления таблиц сделать дамп и посмотреть - мож с дампом что не так.
2 - Error 2006 это "MySQL server has gone away". Похоже сервер не выдерживает напора кактуса и сбрасывает соединения. Тут нужно смотреть настройки сервера.
3 - попробовать сконвертировать таблицы в innodb. Myisam не самый надежный движок, плюс на время записи таблицу блокирует полностью. Innodb блокирует только изменяемую строку.
Я не злопамятный, я просто часто ковыряю логи
blackdog
Злой чайник
Злой чайник
Сообщения: 111
Зарегистрирован: 07 мар 2014, 18:23
ОС: MSDOS

Re: Cacti.И снова я ...

Сообщение blackdog » 18 авг 2015, 16:17

Raven
До того как навернулась файловая все работало изумительно.
Систему переустановил,но /home не форматировал,в пользовательском разделе хвостов
от прошлой установки остаться нигде не могло?
Как делать дамп я как нить разберусь,а вот что там смотреть?
Raven писал(а):2 - Error 2006 это "MySQL server has gone away". Похоже сервер не выдерживает напора кактуса и сбрасывает соединения. Тут нужно смотреть настройки сервера.
Так он при одном хосте выдает такое.Уж не думаю что кактус одним хостом может завалить БД.
Какие настройки смотреть?
Raven писал(а):3 - попробовать сконвертировать таблицы в innodb. Myisam не самый надежный движок, плюс на время записи таблицу блокирует полностью. Innodb блокирует только изменяемую строку.
Про это тоже можно пошагово?В прошлой установке все встало сразу,вообще без проблем.
То есть с БД я ниче не делал кроме добавления БД кактуса скриптом и оно работало.
Не может же быть что при повторной инсталляции поменялись дефолтные конфиги БД?
blackdog
Злой чайник
Злой чайник
Сообщения: 111
Зарегистрирован: 07 мар 2014, 18:23
ОС: MSDOS

Re: Cacti.И снова я ...

Сообщение blackdog » 18 авг 2015, 18:29

*CRAZY*

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

Aug 18 18:17:41 linux-suse mysql-systemd-helper[7140]: 150818 18:17:41 [ERROR] mysqld: Table './cacti/settings' is marked as crashed and should be repaired
Aug 18 18:17:41 linux-suse mysql-systemd-helper[7140]: 150818 18:17:41 [Warning] Checking table:   './cacti/settings'

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

MariaDB [(none)]> use cacti;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [cacti]> repair table settins;
+---------------+--------+----------+-------------------------------------+
| Table         | Op     | Msg_type | Msg_text                            |
+---------------+--------+----------+-------------------------------------+
| cacti.settins | repair | Error    | Table 'cacti.settins' doesn't exist |
| cacti.settins | repair | status   | Operation failed                    |
+---------------+--------+----------+-------------------------------------+
2 rows in set (0,00 sec)

MariaDB [cacti]> create table settings;
ERROR 1050 (42S01): Table 'settings' already exists
MariaDB [cacti]> repair table settins;
+---------------+--------+----------+-------------------------------------+
| Table         | Op     | Msg_type | Msg_text                            |
+---------------+--------+----------+-------------------------------------+
| cacti.settins | repair | Error    | Table 'cacti.settins' doesn't exist |
| cacti.settins | repair | status   | Operation failed                    |
+---------------+--------+----------+-------------------------------------+
2 rows in set (0,00 sec)

MariaDB [cacti]> create table settings;
ERROR 1050 (42S01): Table 'settings' already exists
MariaDB [cacti]> create table cacti.settings;
ERROR 1050 (42S01): Table 'settings' already exists
MariaDB [cacti]> repair table settins;
+---------------+--------+----------+-------------------------------------+
| Table         | Op     | Msg_type | Msg_text                            |
+---------------+--------+----------+-------------------------------------+
| cacti.settins | repair | Error    | Table 'cacti.settins' doesn't exist |
| cacti.settins | repair | status   | Operation failed                    |
+---------------+--------+----------+-------------------------------------+
2 rows in set (0,00 sec)
Аватара пользователя
Raven
Бородатый сис
Бородатый сис
Сообщения: 2800
Зарегистрирован: 03 мар 2010, 15:12
ОС: RHEL 8
Откуда: Из серверной

Re: Cacti.И снова я ...

Сообщение Raven » 19 авг 2015, 11:26

странно. А что если

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

drop database cacti
и

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

ls -la /var/lib/mysql
?
Я не злопамятный, я просто часто ковыряю логи
blackdog
Злой чайник
Злой чайник
Сообщения: 111
Зарегистрирован: 07 мар 2014, 18:23
ОС: MSDOS

Re: Cacti.И снова я ...

Сообщение blackdog » 19 авг 2015, 15:45

Raven
Мой косяк,неверно название указывал таблицы
settins без g.
Но вот вопрос все равно открыт.
Базу дропал уже.Раза три делал пересоздание таблиц
скриптом кактуса,но все остается точно так же-ошибки указывающие на самые разные таблицы
появляются постоянно,то poller,то еще какие нить таблицы повреждены.
Вывод вечером покажу.У меня складывается впечатление что что то не так в самом
мускуле.
Скопировал БД с рабочего компа,попробую подсунуть на домашний
Последний раз редактировалось blackdog 19 авг 2015, 15:50, всего редактировалось 1 раз.
Аватара пользователя
Raven
Бородатый сис
Бородатый сис
Сообщения: 2800
Зарегистрирован: 03 мар 2010, 15:12
ОС: RHEL 8
Откуда: Из серверной

Re: Cacti.И снова я ...

Сообщение Raven » 19 авг 2015, 15:48

Конфиг оного можно глянуть?
Я не злопамятный, я просто часто ковыряю логи
blackdog
Злой чайник
Злой чайник
Сообщения: 111
Зарегистрирован: 07 мар 2014, 18:23
ОС: MSDOS

Re: Cacti.И снова я ...

Сообщение blackdog » 19 авг 2015, 20:12

[spoilermy.cnf]# This is default example of MySQL/MariaDB configuration provided with openSUSE package
# It is based on upstream defaults with some additional examples.


# The following options will be passed to all MariaDB clients
[client]
#password = your_password
#port = 3306
#socket = /var/run/mysql/mysql.sock


[mysqld]

# Remove leading # if you don't want to listen on network (only socket - safer)
# skip-networking

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Using newer file format that supports dynamic and compressed row formats.
# If you are using replication you have to make sure, that these options are
# set everywhere the same way (probably comment them out is the easiest way)
innodb_file_format=Barracuda
innodb_file_per_table=ON

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin=mysql-bin
# binlog_format=mixed

# Remove leading # if you want to store your database elsewhere
# datadir = /var/lib/mysql

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

# These are commonly set, remove the # and set as required.
# port = 3306
# socket = /var/run/mysql/mysql.sock

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
# skip-networking

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
log = /var/log/mysqld_multi.log

# If you want to use mysqld_multi uncomment 1 or more mysqld sections
# below or add your own ones.

# WARNING
# --------
# If you uncomment mysqld1 than make absolutely sure, that database mysql,
# configured above, is not started. This may result in corrupted data!
#
# [mysqld1]
# port = 3306
# datadir = /var/lib/mysql
# pid-file = /var/lib/mysql/mysqld.pid
# socket = /var/lib/mysql/mysql.sock
# user = mysql

# [mysqld2]
# port = 3307
# datadir = /var/lib/mysql-databases/mysqld2
# pid-file = /var/lib/mysql-databases/mysqld2/mysql.pid
# socket = /var/lib/mysql-databases/mysqld2/mysql.sock
# user = mysql

# [mysqld3]
# port = 3308
# datadir = /var/lib/mysql-databases/mysqld3
# pid-file = /var/lib/mysql-databases/mysqld3/mysql.pid
# socket = /var/lib/mysql-databases/mysqld3/mysql.sock
# user = mysql

# [mysqld6]
# port = 3309
# datadir = /var/lib/mysql-databases/mysqld6
# pid-file = /var/lib/mysql-databases/mysqld6/mysql.pid
# socket = /var/lib/mysql-databases/mysqld6/mysql.sock
# user = mysql

!includedir /etc/my.cnf.d[/spoiler]
Дефолтный он.
Ответить

Вернуться в «Unix»