cacti DB failed, updgrade lost everything

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Moderators, Developers

Author
Message
mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#31 Post by mrscary » Mon Jan 08, 2018 11:12 am

so my latest attempt.. I went thru MySQL.. dropped the database.. stopped MySQL.. deleted the cacti folder from disk
remade cacti folder (MySQL folder).. pasted in my old db files.. restarted MYSQL
ran the cacti upgrade via the web browser.. here are the results
Version: 1.0.0

[Success]
CREATE TABLE IF NOT EXISTS `user_auth_group` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(20) NOT NULL,
`description` varchar(255) NOT NULL default '',
`graph_settings` varchar(2) DEFAULT NULL,
`login_opts` tinyint(1) NOT NULL DEFAULT '1',
`show_tree` varchar(2) DEFAULT 'on',
`show_list` varchar(2) DEFAULT 'on',
`show_preview` varchar(2) NOT NULL DEFAULT 'on',
`policy_graphs` tinyint(1) unsigned NOT NULL DEFAULT '1',
`policy_trees` tinyint(1) unsigned NOT NULL DEFAULT '1',
`policy_hosts` tinyint(1) unsigned NOT NULL DEFAULT '1',
`policy_graph_templates` tinyint(1) unsigned NOT NULL DEFAULT '1',
`enabled` char(2) NOT NULL DEFAULT 'on',
PRIMARY KEY (`id`))
ENGINE=InnoDB
COMMENT='Table that Contains User Groups';

[Success]
CREATE TABLE IF NOT EXISTS `user_auth_group_perms` (
`group_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`type` tinyint(2) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`group_id`,`item_id`,`type`),
KEY `group_id` (`group_id`,`type`))
ENGINE=InnoDB
COMMENT='Table that Contains User Group Permissions';

[Success]
CREATE TABLE IF NOT EXISTS `user_auth_group_realm` (
`group_id` int(10) unsigned NOT NULL,
`realm_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`group_id`, `realm_id`),
KEY `group_id` (`group_id`),
KEY `realm_id` (`realm_id`))
ENGINE=InnoDB
COMMENT='Table that Contains User Group Realm Permissions';

[Success]
CREATE TABLE IF NOT EXISTS `user_auth_group_members` (
`group_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`group_id`, `user_id`),
KEY `group_id` (`group_id`),
KEY `realm_id` (`user_id`))
ENGINE=InnoDB
COMMENT='Table that Contains User Group Members';

[Success]
CREATE TABLE IF NOT EXISTS `settings_user_group` (
`group_id` smallint(8) unsigned NOT NULL DEFAULT '0',
`name` varchar(50) NOT NULL DEFAULT '',
`value` varchar(2048) NOT NULL DEFAULT '',
PRIMARY KEY (`group_id`,`name`))
ENGINE=InnoDB
COMMENT='Stores the Default User Group Graph Settings';

[Success]
CREATE TABLE IF NOT EXISTS `data_source_stats_daily` (
`local_data_id` mediumint(8) unsigned NOT NULL,
`rrd_name` varchar(19) NOT NULL,
`average` DOUBLE DEFAULT NULL,
`peak` DOUBLE DEFAULT NULL,
PRIMARY KEY (`local_data_id`,`rrd_name`)
) ENGINE=InnoDB;

[Success]
CREATE TABLE IF NOT EXISTS `data_source_stats_hourly` (
`local_data_id` mediumint(8) unsigned NOT NULL,
`rrd_name` varchar(19) NOT NULL,
`average` DOUBLE DEFAULT NULL,
`peak` DOUBLE DEFAULT NULL,
PRIMARY KEY (`local_data_id`,`rrd_name`)
) ENGINE=InnoDB;

[Success]
CREATE TABLE IF NOT EXISTS `data_source_stats_hourly_cache` (
`local_data_id` mediumint(8) unsigned NOT NULL,
`rrd_name` varchar(19) NOT NULL,
`time` timestamp NOT NULL default '0000-00-00 00:00:00',
`value` DOUBLE DEFAULT NULL,
PRIMARY KEY (`local_data_id`,`time`,`rrd_name`),
KEY `time` USING BTREE (`time`)
) ENGINE=MEMORY;

[Success]
CREATE TABLE IF NOT EXISTS `data_source_stats_hourly_last` (
`local_data_id` mediumint(8) unsigned NOT NULL,
`rrd_name` varchar(19) NOT NULL,
`value` DOUBLE DEFAULT NULL,
`calculated` DOUBLE DEFAULT NULL,
PRIMARY KEY (`local_data_id`,`rrd_name`)
) ENGINE=MEMORY;

[Success]
ALTER TABLE `data_source_stats_hourly_last` ADD `calculated`

[Success]
CREATE TABLE IF NOT EXISTS `data_source_stats_monthly` (
`local_data_id` mediumint(8) unsigned NOT NULL,
`rrd_name` varchar(19) NOT NULL,
`average` DOUBLE DEFAULT NULL,
`peak` DOUBLE DEFAULT NULL,
PRIMARY KEY (`local_data_id`,`rrd_name`)
) ENGINE=InnoDB;

[Success]
CREATE TABLE IF NOT EXISTS `data_source_stats_weekly` (
`local_data_id` mediumint(8) unsigned NOT NULL,
`rrd_name` varchar(19) NOT NULL,
`average` DOUBLE DEFAULT NULL,
`peak` DOUBLE DEFAULT NULL,
PRIMARY KEY (`local_data_id`,`rrd_name`)
) ENGINE=InnoDB;

[Success]
CREATE TABLE IF NOT EXISTS `data_source_stats_yearly` (
`local_data_id` mediumint(8) unsigned NOT NULL,
`rrd_name` varchar(19) NOT NULL,
`average` DOUBLE DEFAULT NULL,
`peak` DOUBLE DEFAULT NULL,
PRIMARY KEY (`local_data_id`,`rrd_name`)
) ENGINE=InnoDB;

[Success]
CREATE TABLE IF NOT EXISTS `poller_output_boost` (
`local_data_id` mediumint(8) unsigned NOT NULL default '0',
`rrd_name` varchar(19) NOT NULL default '',
`time` timestamp NOT NULL default '0000-00-00 00:00:00',
`output` varchar(512) NOT NULL,
PRIMARY KEY USING BTREE (`local_data_id`,`rrd_name`,`time`)
) ENGINE=InnoDB;

[Success]
CREATE TABLE IF NOT EXISTS `poller_output_boost_processes` (
`sock_int_value` bigint(20) unsigned NOT NULL auto_increment,
`status` varchar(255) default NULL,
PRIMARY KEY (`sock_int_value`))
ENGINE=MEMORY;

[Success]
CREATE TABLE IF NOT EXISTS `user_domains` (
`domain_id` int(10) unsigned NOT NULL auto_increment,
`domain_name` varchar(20) NOT NULL,
`type` int(10) UNSIGNED NOT NULL DEFAULT '0',
`enabled` char(2) NOT NULL DEFAULT 'on',
`defdomain` tinyint(3) NOT NULL DEFAULT '0',
`user_id` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`domain_id`))
ENGINE=InnoDB
COMMENT='Table to Hold Login Domains';

[Success]
CREATE TABLE IF NOT EXISTS `user_domains_ldap` (
`domain_id` int(10) unsigned NOT NULL,
`server` varchar(128) NOT NULL,
`port` int(10) unsigned NOT NULL,
`port_ssl` int(10) unsigned NOT NULL,
`proto_version` tinyint(3) unsigned NOT NULL,
`encryption` tinyint(3) unsigned NOT NULL,
`referrals` tinyint(3) unsigned NOT NULL,
`mode` tinyint(3) unsigned NOT NULL,
`dn` varchar(128) NOT NULL,
`group_require` char(2) NOT NULL,
`group_dn` varchar(128) NOT NULL,
`group_attrib` varchar(128) NOT NULL,
`group_member_type` tinyint(3) unsigned NOT NULL,
`search_base` varchar(128) NOT NULL,
`search_filter` varchar(128) NOT NULL,
`specific_dn` varchar(128) NOT NULL,
`specific_password` varchar(128) NOT NULL,
PRIMARY KEY (`domain_id`))
ENGINE=InnoDB
COMMENT='Table to Hold Login Domains for LDAP';

[Success]
RENAME TABLE `plugin_snmpagent_cache` TO `snmpagent_cache`

[Fail]
CREATE TABLE IF NOT EXISTS `snmpagent_cache` (
`oid` varchar(191) NOT NULL,
`name` varchar(191) NOT NULL,
`mib` varchar(191) NOT NULL,
`type` varchar(255) NOT NULL DEFAULT '',
`otype` varchar(255) NOT NULL DEFAULT '',
`kind` varchar(255) NOT NULL DEFAULT '',
`max-access` varchar(255) NOT NULL DEFAULT 'not-accessible',
`value` varchar(255) NOT NULL DEFAULT '',
`description` varchar(5000) NOT NULL DEFAULT '',
PRIMARY KEY (`oid`),
KEY `name` (`name`),
KEY `mib` (`mib`))
ENGINE=InnoDB
COMMENT='SNMP MIB CACHE';

[Success]
RENAME TABLE `plugin_snmpagent_mibs` TO `snmpagent_mibs`

[Success]
CREATE TABLE IF NOT EXISTS `snmpagent_mibs` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL DEFAULT '',
`file` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`))
ENGINE=InnoDB
COMMENT='Registered MIB files';

[Success]
RENAME TABLE `plugin_snmpagent_cache_notifications` TO `snmpagent_cache_notifications`

[Success]
CREATE TABLE IF NOT EXISTS `snmpagent_cache_notifications` (
`name` varchar(191) NOT NULL,
`mib` varchar(255) NOT NULL,
`attribute` varchar(255) NOT NULL,
`sequence_id` smallint(6) NOT NULL,
KEY `name` (`name`))
ENGINE=InnoDB
COMMENT='Notifcations and related attributes';

[Success]
RENAME TABLE `plugin_snmpagent_cache_textual_conventions` TO `snmpagent_cache_textual_conventions`

[Success]
CREATE TABLE IF NOT EXISTS `snmpagent_cache_textual_conventions` (
`name` varchar(191) NOT NULL,
`mib` varchar(191) NOT NULL,
`type` varchar(255) NOT NULL DEFAULT '',
`description` varchar(5000) NOT NULL DEFAULT '',
KEY `name` (`name`),
KEY `mib` (`mib`))
ENGINE=InnoDB
COMMENT='Textual conventions';

[Success]
RENAME TABLE `plugin_snmpagent_managers` TO `snmpagent_managers`

[Success]
CREATE TABLE IF NOT EXISTS `snmpagent_managers` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`hostname` varchar(100) NOT NULL,
`description` varchar(255) NOT NULL,
`disabled` char(2) DEFAULT NULL,
`max_log_size` tinyint(1) NOT NULL,
`snmp_version` varchar(255) NOT NULL,
`snmp_community` varchar(255) NOT NULL,
`snmp_username` varchar(255) NOT NULL,
`snmp_auth_password` varchar(255) NOT NULL,
`snmp_auth_protocol` varchar(255) NOT NULL,
`snmp_priv_password` varchar(255) NOT NULL,
`snmp_priv_protocol` varchar(255) NOT NULL,
`snmp_engine_id` varchar(64) NOT NULL DEFAULT '80005d750302FFFFFFFFFF',
`snmp_port` varchar(255) NOT NULL,
`snmp_message_type` tinyint(1) NOT NULL,
`notes` text,
PRIMARY KEY (`id`),
KEY `hostname` (`hostname`))
ENGINE=InnoDB
COMMENT='snmp notification receivers';

[Success]
RENAME TABLE `plugin_snmpagent_managers_notifications` TO `snmpagent_managers_notifications`

[Success]
CREATE TABLE IF NOT EXISTS `snmpagent_managers_notifications` (
`manager_id` int(8) NOT NULL,
`notification` varchar(190) NOT NULL,
`mib` varchar(191) NOT NULL,
KEY `mib` (`mib`),
KEY `manager_id` (`manager_id`),
KEY `manager_id2` (`manager_id`,`notification`))
ENGINE=InnoDB
COMMENT='snmp notifications to receivers';

[Success]
RENAME TABLE `plugin_snmpagent_notifications_log` TO `snmpagent_notifications_log`

[Success]
CREATE TABLE IF NOT EXISTS `snmpagent_notifications_log` (
`id` int(12) NOT NULL AUTO_INCREMENT,
`time` int(24) NOT NULL,
`severity` tinyint(1) NOT NULL,
`manager_id` int(8) NOT NULL,
`notification` varchar(190) NOT NULL,
`mib` varchar(191) NOT NULL,
`varbinds` varchar(5000) NOT NULL,
PRIMARY KEY (`id`),
KEY `time` (`time`),
KEY `severity` (`severity`),
KEY `manager_id` (`manager_id`),
KEY `manager_id2` (`manager_id`,`notification`))
ENGINE=InnoDB
COMMENT='logs snmp notifications to receivers';

[Success]
CREATE TABLE IF NOT EXISTS `data_source_purge_temp` (
`id` integer UNSIGNED auto_increment,
`name_cache` varchar(255) NOT NULL default '',
`local_data_id` mediumint(8) unsigned NOT NULL default '0',
`name` varchar(128) NOT NULL default '',
`size` integer UNSIGNED NOT NULL default '0',
`last_mod` TIMESTAMP NOT NULL default '0000-00-00 00:00:00',
`in_cacti` tinyint NOT NULL default '0',
`data_template_id` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY name (`name`),
KEY local_data_id (`local_data_id`),
KEY in_cacti (`in_cacti`),
KEY data_template_id (`data_template_id`))
ENGINE=InnoDB
COMMENT='RRD Cleaner File Repository';

[Success]
CREATE TABLE IF NOT EXISTS `data_source_purge_action` (
`id` integer UNSIGNED auto_increment,
`name` varchar(128) NOT NULL default '',
`local_data_id` mediumint(8) unsigned NOT NULL default '0',
`action` tinyint(2) NOT NULL default 0,
PRIMARY KEY (`id`),
UNIQUE KEY name (`name`))
ENGINE=InnoDB
COMMENT='RRD Cleaner File Actions';

[Success]
ALTER TABLE `graph_tree` ADD `enabled`

[Success]
ALTER TABLE `graph_tree` ADD `locked`

[Success]
ALTER TABLE `graph_tree` ADD `locked_date`

[Success]
ALTER TABLE `graph_tree` ADD `last_modified`

[Success]
ALTER TABLE `graph_tree` ADD `user_id`

[Success]
ALTER TABLE `graph_tree` ADD `modified_by`

[Success]
ALTER TABLE `graph_tree_items` ADD `parent`

[Success]
ALTER TABLE `graph_tree_items` ADD `position`

[Success]
ALTER TABLE graph_tree_items MODIFY COLUMN id BIGINT UNSIGNED NOT NULL auto_increment

[Success]
ALTER TABLE `graph_tree_items` ADD INDEX parent(parent)

[Success]
DROP TABLE IF EXISTS `user_auth_cache`

[Success]
CREATE TABLE `user_auth_cache` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL DEFAULT '0',
`hostname` varchar(64) NOT NULL DEFAULT '',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`token` varchar(191) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `tokenkey` (`token`),
KEY `hostname` (`hostname`),
KEY `user_id` (`user_id`))
ENGINE=InnoDB
COMMENT='Caches Remember Me Details'

[Success]
ALTER TABLE host
MODIFY COLUMN status_fail_date timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
MODIFY COLUMN status_rec_date timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'

[Success]
ALTER TABLE poller
MODIFY COLUMN last_update timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'

[Success]
ALTER TABLE poller_command
MODIFY COLUMN time timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'

[Fail]
ALTER TABLE poller_output
MODIFY COLUMN time timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'

[Success]
ALTER TABLE poller_time
MODIFY COLUMN start_time timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
MODIFY COLUMN end_time timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'

[Success]
ALTER TABLE user_log
MODIFY COLUMN time timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'

[Success]
ALTER TABLE `user_auth` ADD `lastchange`

[Success]
ALTER TABLE `user_auth` ADD `lastlogin`

[Success]
ALTER TABLE `user_auth` ADD `password_history`

[Success]
ALTER TABLE `user_auth` ADD `locked`

[Success]
ALTER TABLE `user_auth` ADD `failed_attempts`

[Success]
ALTER TABLE `user_auth` ADD `lastfail`

[Success]
ALTER TABLE `graph_tree_items` DROP `order_key`

[Success]
DELETE FROM plugin_realms WHERE file LIKE 'clog%'

[Success]
DELETE FROM plugin_config WHERE directory='clog'

[Success]
DELETE FROM plugin_hooks WHERE name='clog'

[Success]
ALTER TABLE `user_auth` ADD `email_address`

[Success]
ALTER TABLE `user_auth` ADD `password_change`

[Skipped]
DROP TABLE `poller_output_realtime`

[Success]
CREATE TABLE poller_output_realtime (
local_data_id mediumint(8) unsigned NOT NULL default '0',
rrd_name varchar(19) NOT NULL default '',
time timestamp NOT NULL default '0000-00-00 00:00:00',
output text NOT NULL,
poller_id varchar(256) NOT NULL default '',
PRIMARY KEY (local_data_id,rrd_name,`time`),
KEY poller_id(poller_id(191)))
ENGINE=InnoDB

[Success]
DROP TABLE `poller_output_rt`

[Success]
DELETE FROM plugin_realms WHERE file LIKE '%graph_image_rt%'

[Success]
DELETE FROM plugin_config WHERE directory='realtime'

[Success]
DELETE FROM plugin_hooks WHERE name='realtime'

[Success]
RENAME TABLE `plugin_nectar` TO `reports`

[Success]
RENAME TABLE `plugin_nectar_items` TO `reports_items`

[Fail]
UPDATE settings SET name=REPLACE(name, 'nectar','reports') WHERE name LIKE '%nectar%'

[Success]
ALTER TABLE `reports` ADD `bcc`

[Success]
ALTER TABLE `reports` ADD `from_name`

[Success]
ALTER TABLE `reports` ADD `user_id`

[Success]
ALTER TABLE `reports` ADD `graph_width`

[Success]
ALTER TABLE `reports` ADD `graph_height`

[Success]
ALTER TABLE `reports` ADD `graph_columns`

[Success]
ALTER TABLE `reports` ADD `thumbnails`

[Success]
ALTER TABLE `reports` ADD `font_size`

[Success]
ALTER TABLE `reports` ADD `alignment`

[Success]
ALTER TABLE `reports` ADD `cformat`

[Success]
ALTER TABLE `reports` ADD `format_file`

[Success]
ALTER TABLE `reports` ADD `graph_linked`

[Success]
ALTER TABLE `reports` ADD `subject`

[Success]
ALTER TABLE `reports_items` ADD `host_template_id`

[Success]
ALTER TABLE `reports_items` ADD `graph_template_id`

[Success]
ALTER TABLE `reports_items` ADD `tree_id`

[Success]
ALTER TABLE `reports_items` ADD `branch_id`

[Success]
ALTER TABLE `reports_items` ADD `tree_cascade`

[Success]
ALTER TABLE `reports_items` ADD `graph_name_regexp`

[Success]
ALTER TABLE `host` ADD `snmp_sysDescr`

[Success]
ALTER TABLE `host` ADD `snmp_sysObjectID`

[Success]
ALTER TABLE `host` ADD `snmp_sysUpTimeInstance`

[Success]
ALTER TABLE `host` ADD `snmp_sysContact`

[Success]
ALTER TABLE `host` ADD `snmp_sysName`

[Success]
ALTER TABLE `host` ADD `snmp_sysLocation`

[Success]
ALTER TABLE `host` ADD `polling_time`

[Success]
INSERT IGNORE INTO user_auth_realm VALUES (18,1)

[Success]
INSERT IGNORE INTO user_auth_realm VALUES (20,1)

[Success]
INSERT IGNORE INTO user_auth_realm VALUES (21,1)

[Success]
ALTER TABLE `plugin_aggregate_graphs_graph_item` ADD `t_graph_type_id`

[Success]
ALTER TABLE `plugin_aggregate_graphs_graph_item` ADD `graph_type_id`

[Success]
ALTER TABLE `plugin_aggregate_graphs_graph_item` ADD `t_cdef_id`

[Success]
ALTER TABLE `plugin_aggregate_graphs_graph_item` ADD `cdef_id`

[Success]
ALTER TABLE `plugin_aggregate_graph_templates_item` ADD `t_graph_type_id`

[Success]
ALTER TABLE `plugin_aggregate_graph_templates_item` ADD `graph_type_id`

[Success]
ALTER TABLE `plugin_aggregate_graph_templates_item` ADD `t_cdef_id`

[Success]
ALTER TABLE `plugin_aggregate_graph_templates_item` ADD `cdef_id`

[Success]
RENAME TABLE `plugin_aggregate_color_template_items` TO `color_template_items`

[Success]
RENAME TABLE `plugin_aggregate_color_templates` TO `color_templates`

[Success]
RENAME TABLE `plugin_aggregate_graph_templates` TO `aggregate_graph_templates`

[Success]
RENAME TABLE `plugin_aggregate_graph_templates_graph` TO `aggregate_graph_templates_graph`

[Success]
RENAME TABLE `plugin_aggregate_graph_templates_item` TO `aggregate_graph_templates_item`

[Success]
RENAME TABLE `plugin_aggregate_graphs` TO `aggregate_graphs`

[Success]
RENAME TABLE `plugin_aggregate_graphs_graph_item` TO `aggregate_graphs_graph_item`

[Success]
RENAME TABLE `plugin_aggregate_graphs_items` TO `aggregate_graphs_items`

[Success]
DELETE FROM plugin_config WHERE directory='aggregate'

[Success]
DELETE FROM plugin_realms WHERE plugin='aggregate'

[Success]
DELETE FROM plugin_db_changes WHERE plugin='aggregate'

[Success]
DELETE FROM plugin_hooks WHERE name='aggregate'

[Success]
RENAME TABLE `plugin_autom8_graph_rules` TO `automation_graph_rules`

[Success]
RENAME TABLE `plugin_autom8_graph_rule_items` TO `automation_graph_rule_items`

[Success]
RENAME TABLE `plugin_autom8_match_rule_items` TO `automation_match_rule_items`

[Success]
RENAME TABLE `plugin_autom8_tree_rules` TO `automation_tree_rules`

[Success]
RENAME TABLE `plugin_autom8_tree_rule_items` TO `automation_tree_rule_items`

[Success]
DELETE FROM plugin_config WHERE directory='autom8'

[Success]
DELETE FROM plugin_realms WHERE plugin='autom8'

[Success]
DELETE FROM plugin_db_changes WHERE plugin='autom8'

[Success]
DELETE FROM plugin_hooks WHERE name='autom8'

[Fail]
UPDATE settings SET name=REPLACE(name, 'autom8', 'automation') WHERE name LIKE 'autom8%'

[Success]
RENAME TABLE `plugin_discover_hosts` TO `automation_devices`

[Success]
ALTER TABLE `automation_devices` DROP `hash`

[Success]
ALTER TABLE automation_devices
ADD COLUMN id BIGINT unsigned auto_increment FIRST,
ADD COLUMN network_id INT unsigned NOT NULL default '0' AFTER id,
ADD COLUMN snmp_port int(10) unsigned NOT NULL DEFAULT '161' AFTER snmp_version,
ADD COLUMN snmp_engine_id varchar(30) DEFAULT '' AFTER snmp_context,
DROP PRIMARY KEY,
ADD PRIMARY KEY(id),
ADD UNIQUE INDEX ip(ip);
ADD INDEX network_id(network_id),
COMMENT='Table of Discovered Devices'

[Success]
RENAME TABLE `plugin_discover_template` TO `automation_templates`

[Success]
ALTER TABLE automation_templates
CHANGE COLUMN sysdescr sysDescr VARCHAR(255) DEFAULT ''

[Success]
ALTER TABLE `automation_templates` ADD `availability_method`

[Success]
ALTER TABLE `automation_templates` ADD `sysName`

[Success]
ALTER TABLE `automation_templates` ADD `sysOid`

[Success]
ALTER TABLE `automation_templates` ADD `sequence`

[Success]
ALTER TABLE `automation_templates` DROP `tree`

[Success]
ALTER TABLE `automation_templates` DROP `snmp_version`

[Success]
UPDATE automation_templates SET sequence=id

[Success]
CREATE TABLE IF NOT EXISTS `automation_devices` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`network_id` int(10) unsigned NOT NULL DEFAULT '0',
`hostname` varchar(100) NOT NULL DEFAULT '',
`ip` varchar(17) NOT NULL DEFAULT '',
`community` varchar(100) NOT NULL DEFAULT '',
`snmp_version` tinyint(1) unsigned NOT NULL DEFAULT '1',
`snmp_port` int(10) unsigned NOT NULL DEFAULT '161',
`snmp_username` varchar(50) DEFAULT NULL,
`snmp_password` varchar(50) DEFAULT NULL,
`snmp_auth_protocol` char(5) DEFAULT '',
`snmp_priv_passphrase` varchar(200) DEFAULT '',
`snmp_priv_protocol` char(6) DEFAULT '',
`snmp_context` varchar(64) DEFAULT '',
`snmp_engine_id` varchar(30) DEFAULT '',
`sysName` varchar(100) NOT NULL DEFAULT '',
`sysLocation` varchar(255) NOT NULL DEFAULT '',
`sysContact` varchar(255) NOT NULL DEFAULT '',
`sysDescr` varchar(255) NOT NULL DEFAULT '',
`sysUptime` int(32) NOT NULL DEFAULT '0',
`os` varchar(64) NOT NULL DEFAULT '',
`snmp` tinyint(4) NOT NULL DEFAULT '0',
`known` tinyint(4) NOT NULL DEFAULT '0',
`up` tinyint(4) NOT NULL DEFAULT '0',
`time` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`),
KEY `hostname` (`hostname`))
ENGINE=InnoDB
COMMENT='Table of Discovered Devices'

[Success]
CREATE TABLE IF NOT EXISTS `automation_ips` (
`ip_address` varchar(20) NOT NULL DEFAULT '',
`hostname` varchar(250) DEFAULT NULL,
`network_id` int(10) unsigned DEFAULT NULL,
`pid` int(10) unsigned DEFAULT NULL,
`status` int(10) unsigned DEFAULT NULL,
`thread` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`ip_address`),
KEY `pid` (`pid`))
ENGINE=MEMORY
COMMENT='List of discoverable ip addresses used for scanning'

[Success]
CREATE TABLE IF NOT EXISTS `automation_networks` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`poller_id` int(10) unsigned DEFAULT '0',
`name` varchar(128) NOT NULL DEFAULT '' COMMENT 'The name for this network',
`subnet_range` varchar(255) NOT NULL DEFAULT '' COMMENT 'Defined subnet ranges for discovery',
`dns_servers` varchar(128) NOT NULL DEFAULT '' COMMENT 'DNS Servers to use for name resolution',
`enabled` char(2) DEFAULT '',
`snmp_id` int(10) unsigned DEFAULT NULL,
`enable_netbios` char(2) DEFAULT '',
`add_to_cacti` char(2) DEFAULT '',
`total_ips` int(10) unsigned DEFAULT '0',
`up_hosts` int(10) unsigned NOT NULL DEFAULT '0',
`snmp_hosts` int(10) unsigned NOT NULL DEFAULT '0',
`ping_method` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The ping method (ICMP:TCP:UDP)',
`ping_port` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'For TCP:UDP the port to ping',
`ping_timeout` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The ping timeout in seconds',
`ping_retries` int(10) unsigned DEFAULT '0',
`sched_type` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Schedule type: manual or automatic',
`threads` int(10) unsigned DEFAULT '1',
`run_limit` int(10) unsigned NULL DEFAULT '0' COMMENT 'The maximum runtime for the discovery',
`start_at` varchar(20) DEFAULT NULL,
`next_start` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`recur_every` int(10) unsigned DEFAULT '1',
`day_of_week` varchar(45) DEFAULT NULL COMMENT 'The days of week to run in crontab format',
`month` varchar(45) DEFAULT NULL COMMENT 'The months to run in crontab format',
`day_of_month` varchar(45) DEFAULT NULL COMMENT 'The days of month to run in crontab format',
`monthly_week` varchar(45) DEFAULT NULL,
`monthly_day` varchar(45) DEFAULT NULL,
`last_runtime` double NOT NULL DEFAULT '0' COMMENT 'The last runtime for discovery',
`last_started` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'The time the discovery last started',
`last_status` varchar(128) NOT NULL DEFAULT '' COMMENT 'The last exit message if any',
`rerun_data_queries` char(2) DEFAULT NULL COMMENT 'Rerun data queries or not for existing hosts',
PRIMARY KEY (`id`),
KEY `poller_id` (`poller_id`))
ENGINE=InnoDB
COMMENT='Stores scanning subnet definitions'

[Success]
CREATE TABLE IF NOT EXISTS `automation_processes` (
`pid` int(8) unsigned NOT NULL,
`poller_id` int(10) unsigned DEFAULT '0',
`network_id` int(10) unsigned NOT NULL DEFAULT '0',
`task` varchar(20) NULL DEFAULT '',
`status` varchar(20) DEFAULT NULL,
`command` varchar(20) DEFAULT NULL,
`up_hosts` int(10) unsigned DEFAULT '0',
`snmp_hosts` int(10) unsigned DEFAULT '0',
`heartbeat` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`pid`, `network_id`))
ENGINE=MEMORY
COMMENT='Table tracking active poller processes'

[Success]
CREATE TABLE IF NOT EXISTS `automation_snmp` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`id`))
ENGINE=InnoDB
COMMENT='Group of SNMP Option Sets'

[Success]
CREATE TABLE IF NOT EXISTS `automation_snmp_items` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`snmp_id` int(10) unsigned NOT NULL DEFAULT '0',
`sequence` int(10) unsigned NOT NULL DEFAULT '0',
`snmp_version` varchar(100) NOT NULL DEFAULT '',
`snmp_readstring` varchar(100) NOT NULL,
`snmp_port` int(10) NOT NULL DEFAULT '161',
`snmp_timeout` int(10) unsigned NOT NULL DEFAULT '500',
`snmp_retries` tinyint(11) unsigned NOT NULL DEFAULT '3',
`max_oids` int(12) unsigned DEFAULT '10',
`snmp_username` varchar(50) DEFAULT NULL,
`snmp_password` varchar(50) DEFAULT NULL,
`snmp_auth_protocol` char(5) DEFAULT '',
`snmp_priv_passphrase` varchar(200) DEFAULT '',
`snmp_priv_protocol` char(6) DEFAULT '',
`snmp_context` varchar(64) DEFAULT '',
PRIMARY KEY (`id`,`snmp_id`))
ENGINE=InnoDB
COMMENT='Set of SNMP Options'

[Success]
CREATE TABLE IF NOT EXISTS `automation_templates` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`host_template` int(8) NOT NULL DEFAULT '0',
`availability_method` int(10) unsigned DEFAULT '2',
`sysDescr` varchar(255) NULL DEFAULT '',
`sysName` varchar(255) NULL DEFAULT '',
`sysOid` varchar(60) NULL DEFAULT '',
`sequence` int(10) unsigned DEFAULT '0',
PRIMARY KEY (`id`))
ENGINE=InnoDB
COMMENT='Templates of SNMP Sys variables used for automation'

[Success]
DELETE FROM plugin_config WHERE directory='discovery'

[Success]
DELETE FROM plugin_realms WHERE plugin='discovery'

[Success]
DELETE FROM plugin_db_changes WHERE plugin='discovery'

[Success]
DELETE FROM plugin_hooks WHERE name='discovery'

[Success]
UPDATE automation_match_rule_items SET field=REPLACE(field, 'host_template.', 'ht.')

[Success]
UPDATE automation_match_rule_items SET field=REPLACE(field, 'host.', 'h.')

[Success]
UPDATE automation_match_rule_items SET field=REPLACE(field, 'graph_templates.', 'gt.')

[Success]
UPDATE automation_match_rule_items SET field=REPLACE(field, 'graph_templates_graph.', 'gtg.')

[Success]
INSERT IGNORE INTO user_auth_realm (user_id, realm_id) VALUES (1, 23)

[Success]
ALTER TABLE `colors` ADD UNIQUE INDEX hex(hex)

[Success]
ALTER TABLE `colors` ADD `name`

[Success]
ALTER TABLE `colors` ADD `read_only`

[Fail]
ALTER TABLE settings MODIFY COLUMN value varchar(2048) NOT NULL default ''

[Success]
ALTER TABLE settings_graphs MODIFY COLUMN value varchar(2048) NOT NULL default ''

[Success]
ALTER TABLE user_auth MODIFY COLUMN password varchar(2048) NOT NULL default ''

[Success]
RENAME TABLE `settings_graphs` TO `settings_user`

[Success]
ALTER TABLE `user_auth` ADD `reset_perms`

[Success]
ALTER TABLE `graph_templates_item` ADD `vdef_id`

[Success]
ALTER TABLE `graph_templates_item` ADD `line_width`

[Success]
ALTER TABLE `graph_templates_item` ADD `dashes`

[Success]
ALTER TABLE `graph_templates_item` ADD `dash_offset`

[Success]
ALTER TABLE `graph_templates_item` ADD `shift`

[Success]
ALTER TABLE `graph_templates_item` ADD `textalign`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_alt_y_grid`

[Success]
ALTER TABLE `graph_templates_graph` ADD `alt_y_grid`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_right_axis`

[Success]
ALTER TABLE `graph_templates_graph` ADD `right_axis`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_right_axis_label`

[Success]
ALTER TABLE `graph_templates_graph` ADD `right_axis_label`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_right_axis_format`

[Success]
ALTER TABLE `graph_templates_graph` ADD `right_axis_format`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_right_axis_formatter`

[Success]
ALTER TABLE `graph_templates_graph` ADD `right_axis_formatter`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_left_axis_formatter`

[Success]
ALTER TABLE `graph_templates_graph` ADD `left_axis_formatter`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_no_gridfit`

[Success]
ALTER TABLE `graph_templates_graph` ADD `no_gridfit`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_unit_length`

[Success]
ALTER TABLE `graph_templates_graph` ADD `unit_length`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_tab_width`

[Success]
ALTER TABLE `graph_templates_graph` ADD `tab_width`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_dynamic_labels`

[Success]
ALTER TABLE `graph_templates_graph` ADD `dynamic_labels`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_force_rules_legend`

[Success]
ALTER TABLE `graph_templates_graph` ADD `force_rules_legend`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_legend_position`

[Success]
ALTER TABLE `graph_templates_graph` ADD `legend_position`

[Success]
ALTER TABLE `graph_templates_graph` ADD `t_legend_direction`

[Success]
ALTER TABLE `graph_templates_graph` ADD `legend_direction`

[Success]
REPLACE INTO `user_auth_realm` VALUES (19,1);

[Success]
REPLACE INTO `user_auth_realm` VALUES (22,1);

[Success]
REPLACE INTO `vdef` VALUES (1, 'e06ed529238448773038601afb3cf278', 'Maximum');

[Success]
REPLACE INTO `vdef` VALUES (2, 'e4872dda82092393d6459c831a50dc3b', 'Minimum');

[Success]
REPLACE INTO `vdef` VALUES (3, '5ce1061a46bb62f36840c80412d2e629', 'Average');

[Success]
REPLACE INTO `vdef` VALUES (4, '06bd3cbe802da6a0745ea5ba93af554a', 'Last (Current)');

[Success]
REPLACE INTO `vdef` VALUES (5, '631c1b9086f3979d6dcf5c7a6946f104', 'First');

[Success]
REPLACE INTO `vdef` VALUES (6, '6b5335843630b66f858ce6b7c61fc493', 'Total: Current Data Source');

[Success]
REPLACE INTO `vdef` VALUES (7, 'c80d12b0f030af3574da68b28826cd39', '95th Percentage: Current Data Source');

[Success]
REPLACE INTO `vdef_items` VALUES (1, '88d33bf9271ac2bdf490cf1784a342c1', 1, 1, 4, 'CURRENT_DATA_SOURCE');

[Success]
REPLACE INTO `vdef_items` VALUES (2, 'a307afab0c9b1779580039e3f7c4f6e5', 1, 2, 1, '1');

[Success]
REPLACE INTO `vdef_items` VALUES (3, '0945a96068bb57c80bfbd726cf1afa02', 2, 1, 4, 'CURRENT_DATA_SOURCE');

[Success]
REPLACE INTO `vdef_items` VALUES (4, '95a8df2eac60a89e8a8ca3ea3d019c44', 2, 2, 1, '2');

[Success]
REPLACE INTO `vdef_items` VALUES (5, 'cc2e1c47ec0b4f02eb13708cf6dac585', 3, 1, 4, 'CURRENT_DATA_SOURCE');

[Success]
REPLACE INTO `vdef_items` VALUES (6, 'a2fd796335b87d9ba54af6a855689507', 3, 2, 1, '3');

[Success]
REPLACE INTO `vdef_items` VALUES (7, 'a1d7974ee6018083a2053e0d0f7cb901', 4, 1, 4, 'CURRENT_DATA_SOURCE');

[Success]
REPLACE INTO `vdef_items` VALUES (8, '26fccba1c215439616bc1b83637ae7f3', 4, 2, 1, '5');

[Success]
REPLACE INTO `vdef_items` VALUES (9, 'a8993b265f4c5398f4a47c44b5b37a07', 5, 1, 4, 'CURRENT_DATA_SOURCE');

[Success]
REPLACE INTO `vdef_items` VALUES (10, '5a380d469d611719057c3695ce1e4eee', 5, 2, 1, '6');

[Success]
REPLACE INTO `vdef_items` VALUES (11, '65cfe546b17175fad41fcca98c057feb', 6, 1, 4, 'CURRENT_DATA_SOURCE');

[Success]
REPLACE INTO `vdef_items` VALUES (12, 'f330b5633c3517d7c62762cef091cc9e', 6, 2, 1, '7');

[Success]
REPLACE INTO `vdef_items` VALUES (13, 'f1bf2ecf54ca0565cf39c9c3f7e5394b', 7, 1, 4, 'CURRENT_DATA_SOURCE');

[Success]
REPLACE INTO `vdef_items` VALUES (14, '11a26f18feba3919be3af426670cba95', 7, 2, 6, '95');

[Success]
REPLACE INTO `vdef_items` VALUES (15, 'e7ae90275bc1efada07c19ca3472d9db', 7, 3, 1, '8');

[Success]
ALTER TABLE `data_template_data` ADD `t_data_source_profile_id`

[Success]
ALTER TABLE `data_template_data` ADD `data_source_profile_id`

[Success]
CREATE TABLE IF NOT EXISTS `data_source_profiles` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`hash` varchar(32) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`step` int(10) unsigned NOT NULL DEFAULT '300',
`heartbeat` int(10) unsigned NOT NULL DEFAULT '600',
`x_files_factor` double DEFAULT '0.5',
`default` char(2) DEFAULT '',
PRIMARY KEY (`id`))
ENGINE=InnoDB
COMMENT='Stores Data Source Profiles'

[Success]
CREATE TABLE IF NOT EXISTS `data_source_profiles_cf` (
`data_source_profile_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`consolidation_function_id` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`data_source_profile_id`,`consolidation_function_id`),
KEY `data_source_profile_id` (`data_source_profile_id`))
ENGINE=InnoDB
COMMENT='Maps the Data Source Profile Consolidation Functions'

[Success]
CREATE TABLE IF NOT EXISTS `data_source_profiles_rra` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`data_source_profile_id` mediumint(8) unsigned not null default '0',
`name` varchar(255) NOT NULL DEFAULT '',
`steps` int(10) unsigned DEFAULT '1',
`rows` int(10) unsigned NOT NULL DEFAULT '700',
PRIMARY KEY (`id`),
KEY `data_source_profile_id` (`data_source_profile_id`))
ENGINE=InnoDB
COMMENT='Stores RRA Definitions for Data Source Profiles'

[Success]
INSERT INTO data_source_profiles_rra
(`data_source_profile_id`, `name`, `steps`, `rows`)
SELECT '1' AS `data_source_profile_id`, `name`, `steps`, `rows` FROM `rra` WHERE `id`=1

[Success]
REPLACE INTO data_source_profiles_cf
(data_source_profile_id, consolidation_function_id)
SELECT '1' AS data_source_profile_id, consolidation_function_id FROM rra_cf WHERE rra_id=1

[Success]
INSERT INTO data_source_profiles_rra
(`data_source_profile_id`, `name`, `steps`, `rows`)
SELECT '1' AS `data_source_profile_id`, `name`, `steps`, `rows` FROM `rra` WHERE `id`=2

[Success]
REPLACE INTO data_source_profiles_cf
(data_source_profile_id, consolidation_function_id)
SELECT '1' AS data_source_profile_id, consolidation_function_id FROM rra_cf WHERE rra_id=2

[Success]
INSERT INTO data_source_profiles_rra
(`data_source_profile_id`, `name`, `steps`, `rows`)
SELECT '1' AS `data_source_profile_id`, `name`, `steps`, `rows` FROM `rra` WHERE `id`=3

[Success]
REPLACE INTO data_source_profiles_cf
(data_source_profile_id, consolidation_function_id)
SELECT '1' AS data_source_profile_id, consolidation_function_id FROM rra_cf WHERE rra_id=3

[Success]
INSERT INTO data_source_profiles_rra
(`data_source_profile_id`, `name`, `steps`, `rows`)
SELECT '1' AS `data_source_profile_id`, `name`, `steps`, `rows` FROM `rra` WHERE `id`=4

[Success]
REPLACE INTO data_source_profiles_cf
(data_source_profile_id, consolidation_function_id)
SELECT '1' AS data_source_profile_id, consolidation_function_id FROM rra_cf WHERE rra_id=4

[Success]
UPDATE data_template_data
SET data_source_profile_id=1
WHERE data_template_data.id IN(
SELECT data_template_data_id
FROM (
SELECT data_template_data_id, GROUP_CONCAT(rra_id) AS pattern
FROM data_template_data_rra
GROUP BY data_template_data_id
HAVING pattern='1,2,3,4'
) AS rs);

[Success]
DROP TABLE `rra`

[Success]
DROP TABLE `rra_cf`

[Success]
DROP TABLE `data_template_data_rra`

[Success]
ALTER TABLE `data_template_data` DROP `t_rra_id`

[Success]
ALTER TABLE `automation_tree_rule_items` DROP `rra_id`

[Success]
ALTER TABLE `automation_tree_rules` DROP `rra_id`

[Success]
ALTER TABLE `graph_tree_items` DROP `rra_id`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_alt_y_grid`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `alt_y_grid`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_right_axis`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `right_axis`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_right_axis_label`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `right_axis_label`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_right_axis_format`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `right_axis_format`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_right_axis_formatter`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `right_axis_formatter`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_left_axis_formatter`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `left_axis_formatter`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_no_gridfit`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `no_gridfit`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_unit_length`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `unit_length`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_tab_width`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `tab_width`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_dynamic_labels`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `dynamic_labels`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_force_rules_legend`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `force_rules_legend`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_legend_position`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `legend_position`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `t_legend_direction`

[Success]
ALTER TABLE `aggregate_graph_templates_graph` ADD `legend_direction`

[Success]
ALTER TABLE `cdef` ADD `system`

[Success]
UPDATE cdef SET system=1 WHERE name LIKE '\_%'

[Success]
ALTER TABLE data_local DROP INDEX data_template_id

[Success]
ALTER TABLE `data_local` ADD INDEX data_template_id(data_template_id)

[Success]
ALTER TABLE data_local DROP INDEX snmp_query_id

[Success]
ALTER TABLE `data_local` ADD INDEX snmp_query_id(snmp_query_id)

[Success]
ALTER TABLE poller
MODIFY COLUMN last_update TIMESTAMP NOT NULL default '0000-00-00'

[Success]
CREATE TABLE IF NOT EXISTS poller_resource_cache (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
resource_type varchar(20) DEFAULT NULL,
md5sum varchar(32) DEFAULT NULL,
path varchar(191) DEFAULT NULL,
update_time timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
contents longblob,
PRIMARY KEY (id),
UNIQUE KEY path (path))
ENGINE=InnoDB
COMMENT='Caches all scripts, resources files, and plugins'

[Success]
ALTER TABLE `host` ADD `poller_id`

[Success]
ALTER TABLE `host` ADD INDEX poller_id(poller_id)

[Success]
CREATE TABLE IF NOT EXISTS `external_links` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sortorder` int(11) NOT NULL DEFAULT '0',
`enabled` char(2) DEFAULT 'on',
`contentfile` varchar(255) NOT NULL DEFAULT '',
`title` varchar(20) NOT NULL DEFAULT '',
`style` varchar(10) NOT NULL DEFAULT '',
`extendedstyle` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`id`))
ENGINE=InnoDB
COMMENT='Stores External Link Information'

[Success]
CREATE TABLE IF NOT EXISTS `sites` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '',
`address1` varchar(100) DEFAULT '',
`address2` varchar(100) DEFAULT '',
`city` varchar(50) DEFAULT '',
`state` varchar(20) DEFAULT NULL,
`postal_code` varchar(20) DEFAULT '',
`country` varchar(30) DEFAULT '',
`timezone` varchar(40) DEFAULT '',
`latitude` decimal(13,10) NOT NULL DEFAULT '0.0000000000',
`longitude` decimal(13,10) NOT NULL DEFAULT '0.0000000000',
`alternate_id` varchar(30) DEFAULT '',
`notes` varchar(1024),
PRIMARY KEY (`id`),
KEY `name` (`name`),
KEY `city` (`city`),
KEY `state` (`state`),
KEY `postal_code` (`postal_code`),
KEY `country` (`country`),
KEY `alternate_id` (`alternate_id`))
ENGINE=InnoDB
COMMENT='Contains information about customer sites';

[Success]
ALTER TABLE `host` ADD `site_id`

[Success]
ALTER TABLE host MODIFY COLUMN poller_id mediumint(8) unsigned default '1'

[Success]
ALTER TABLE `host` ADD INDEX site_id(site_id)

[Success]
DROP TABLE `poller`

[Success]
CREATE TABLE `poller` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`disabled` char(2) DEFAULT '',
`name` varchar(30) DEFAULT NULL,
`notes` varchar(1024) DEFAULT '',
`status` int(10) unsigned NOT NULL DEFAULT '0',
`hostname` varchar(250) NOT NULL DEFAULT '',
`dbdefault` varchar(20) NOT NULL DEFAULT 'cacti',
`dbhost` varchar(64) NOT NULL DEFAULT '',
`dbuser` varchar(20) NOT NULL DEFAULT '',
`dbpass` varchar(64) NOT NULL DEFAULT '',
`dbport` int(10) unsigned DEFAULT '3306',
`dbssl` char(3) DEFAULT '',
`total_time` double DEFAULT '0',
`snmp` mediumint(8) unsigned DEFAULT '0',
`script` mediumint(8) unsigned DEFAULT '0',
`server` mediumint(8) unsigned DEFAULT '0',
`last_update` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_status` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`))
ENGINE=InnoDB
COMMENT='Pollers for Cacti'

[Success]
INSERT INTO poller (id, name, hostname) VALUES (1, "Main Poller", "PSBENIT-CJF")

[Success]
UPDATE automation_networks SET poller_id=1 WHERE poller_id=0

[Success]
UPDATE automation_processes SET poller_id=1 WHERE poller_id=0

[Success]
UPDATE host SET poller_id=1 WHERE poller_id=0

[Success]
UPDATE poller_command SET poller_id=1 WHERE poller_id=0

[Success]
UPDATE poller_item SET poller_id=1 WHERE poller_id=0

[Success]
UPDATE poller_output_realtime SET poller_id=1 WHERE poller_id=0

[Success]
UPDATE poller_time SET poller_id=1 WHERE poller_id=0

[Success]
ALTER TABLE sessions MODIFY COLUMN data MEDIUMBLOB

[Success]
ALTER TABLE `host` ADD `snmp_engine_id`

[Success]
ALTER TABLE `poller_item` ADD `snmp_engine_id`

[Success]
ALTER TABLE `automation_snmp_items` ADD `snmp_engine_id`

[Success]
ALTER TABLE host MODIFY COLUMN poller_id int(10) unsigned DEFAULT "1"

[Success]
ALTER TABLE host MODIFY COLUMN site_id int(10) unsigned DEFAULT "1"

[Success]
ALTER TABLE `host` ADD `last_updated`

[Success]
ALTER TABLE `host` ADD INDEX last_updated(last_updated)

[Success]
ALTER TABLE `host_snmp_cache` ADD `last_updated`

[Success]
ALTER TABLE `host_snmp_cache` ADD INDEX last_updated(last_updated)

[Success]
ALTER TABLE `poller_item` ADD `last_updated`

[Success]
ALTER TABLE `poller_item` ADD INDEX last_updated(last_updated)

[Success]
ALTER TABLE `poller_command` ADD `last_updated`

[Success]
ALTER TABLE `poller_command` ADD INDEX last_updated(last_updated)

[Success]
ALTER TABLE automation_networks MODIFY COLUMN poller_id int(10) unsigned DEFAULT "1"

[Success]
ALTER TABLE automation_processes MODIFY COLUMN poller_id int(10) unsigned DEFAULT "1"

[Success]
ALTER TABLE poller_command MODIFY COLUMN poller_id int(10) unsigned DEFAULT "1"

[Success]
ALTER TABLE poller_item MODIFY COLUMN poller_id int(10) unsigned DEFAULT "1"

[Success]
ALTER TABLE poller_time MODIFY COLUMN poller_id int(10) unsigned DEFAULT "1"

[Success]
ALTER TABLE `graph_local` ADD `snmp_query_graph_id`

[Success]
ALTER TABLE `graph_local` ADD INDEX snmp_query_graph_id(snmp_query_graph_id)

[Success]
UPDATE graph_local AS gl
INNER JOIN (
SELECT DISTINCT local_graph_id, task_item_id
FROM graph_templates_item
) AS gti
ON gl.id=gti.local_graph_id
INNER JOIN data_template_rrd AS dtr
ON gti.task_item_id=dtr.id
INNER JOIN data_template_data AS dtd
ON dtr.local_data_id=dtd.local_data_id
INNER JOIN data_input_fields AS dif
ON dif.data_input_id=dtd.data_input_id
INNER JOIN data_input_data AS did
ON did.data_template_data_id=dtd.id
AND did.data_input_field_id=dif.id
INNER JOIN snmp_query_graph_rrd AS sqgr
ON sqgr.snmp_query_graph_id=did.value
SET gl.snmp_query_graph_id=did.value
WHERE input_output='in'
AND type_code='output_type'
AND gl.snmp_query_id>0

[Success]
ALTER TABLE `graph_tree` ADD `sequence`

[Success]
Disabling monitor version 1.3 as it is not compatible with Cacti 1.1.29

[Success]
Disabling cycle version 2.3 as it is not compatible with Cacti 1.1.29

[Success]
Disabling settings version 0.72 as it is not compatible with Cacti 1.1.29

[Success]
Disabling thold version 0.5 as it is not compatible with Cacti 1.1.29

[Success]
Disabling intropage version 0.7 as it is not compatible with Cacti 1.1.29

[Success]
Disabling snmpagent version 0.2.2 as it is not compatible with Cacti 1.1.29

[Success]
Disabling usersettings version 0.1 as it is not compatible with Cacti 1.1.29

[Success]
Disabling ipsubnet version .4f as it is not compatible with Cacti 1.1.29

[Success]
Disabling nectar version 0.35a as it is not compatible with Cacti 1.1.29

[Success]
Disabling autom8thold version 1.0.0 as it is not compatible with Cacti 1.1.29

[Success]
CREATE TABLE IF NOT EXISTS `poller_data_template_field_mappings` (
`data_template_id` int(10) unsigned NOT NULL DEFAULT '0',
`data_name` varchar(40) NOT NULL DEFAULT '',
`data_source_names` varchar(125) NOT NULL DEFAULT '',
`last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`data_template_id`,`data_name`,`data_source_names`))
ENGINE=InnoDB
COMMENT='Tracks mapping of Data Templates to their Data Source Names'

[Success]
INSERT IGNORE INTO poller_data_template_field_mappings
SELECT dtr.data_template_id, dif.data_name, GROUP_CONCAT(dtr.data_source_name ORDER BY dtr.data_source_name) AS data_source_names, NOW()
FROM data_template_rrd AS dtr
INNER JOIN data_input_fields AS dif
ON dtr.data_input_field_id = dif.id
WHERE dtr.local_data_id=0
GROUP BY dtr.data_template_id, dif.data_name

[Success]
ALTER TABLE host_snmp_cache MODIFY COLUMN field_value varchar(512) DEFAULT NULL

[Success]
UPDATE graph_templates_graph SET t_auto_scale_opts='' WHERE t_auto_scale_opts IS NULL

[Success]
UPDATE graph_templates_graph SET t_auto_scale_opts='' WHERE t_auto_scale_opts='0'

[Success]
UPDATE graph_templates_graph SET t_auto_scale_log='' WHERE t_auto_scale_log IS NULL

[Success]
UPDATE graph_templates_graph SET t_auto_scale_log='' WHERE t_auto_scale_log='0'

[Success]
UPDATE graph_templates_graph SET t_scale_log_units='' WHERE t_scale_log_units IS NULL

[Success]
UPDATE graph_templates_graph SET t_scale_log_units='' WHERE t_scale_log_units='0'

[Success]
UPDATE graph_templates_graph SET t_auto_scale_rigid='' WHERE t_auto_scale_rigid IS NULL

[Success]
UPDATE graph_templates_graph SET t_auto_scale_rigid='' WHERE t_auto_scale_rigid='0'

[Success]
UPDATE graph_templates_graph SET t_auto_padding='' WHERE t_auto_padding IS NULL

[Success]
UPDATE graph_templates_graph SET t_auto_padding='' WHERE t_auto_padding='0'

[Success]
UPDATE graph_templates_graph SET t_base_value='' WHERE t_base_value IS NULL

[Success]
UPDATE graph_templates_graph SET t_base_value='' WHERE t_base_value='0'

[Success]
UPDATE graph_templates_graph SET t_grouping='' WHERE t_grouping IS NULL

[Success]
UPDATE graph_templates_graph SET t_grouping='' WHERE t_grouping='0'

[Success]
UPDATE graph_templates_graph SET t_unit_value='' WHERE t_unit_value IS NULL

[Success]
UPDATE graph_templates_graph SET t_unit_value='' WHERE t_unit_value='0'

[Success]
UPDATE graph_templates_graph SET t_unit_exponent_value='' WHERE t_unit_exponent_value IS NULL

[Success]
UPDATE graph_templates_graph SET t_unit_exponent_value='' WHERE t_unit_exponent_value='0'

[Success]
UPDATE graph_templates_graph SET t_alt_y_grid='' WHERE t_alt_y_grid IS NULL

[Success]
UPDATE graph_templates_graph SET t_alt_y_grid='' WHERE t_alt_y_grid='0'

[Success]
UPDATE graph_templates_graph SET t_right_axis='' WHERE t_right_axis IS NULL

[Success]
UPDATE graph_templates_graph SET t_right_axis='' WHERE t_right_axis='0'

[Success]
UPDATE graph_templates_graph SET t_right_axis_label='' WHERE t_right_axis_label IS NULL

[Success]
UPDATE graph_templates_graph SET t_right_axis_label='' WHERE t_right_axis_label='0'

[Success]
UPDATE graph_templates_graph SET t_right_axis_format='' WHERE t_right_axis_format IS NULL

[Success]
UPDATE graph_templates_graph SET t_right_axis_format='' WHERE t_right_axis_format='0'

[Success]
UPDATE graph_templates_graph SET t_right_axis_formatter='' WHERE t_right_axis_formatter IS NULL

[Success]
UPDATE graph_templates_graph SET t_right_axis_formatter='' WHERE t_right_axis_formatter='0'

[Success]
UPDATE graph_templates_graph SET t_left_axis_formatter='' WHERE t_left_axis_formatter IS NULL

[Success]
UPDATE graph_templates_graph SET t_left_axis_formatter='' WHERE t_left_axis_formatter='0'

[Success]
UPDATE graph_templates_graph SET t_no_gridfit='' WHERE t_no_gridfit IS NULL

[Success]
UPDATE graph_templates_graph SET t_no_gridfit='' WHERE t_no_gridfit='0'

[Success]
UPDATE graph_templates_graph SET t_unit_length='' WHERE t_unit_length IS NULL

[Success]
UPDATE graph_templates_graph SET t_unit_length='' WHERE t_unit_length='0'

[Success]
UPDATE graph_templates_graph SET t_tab_width='' WHERE t_tab_width IS NULL

[Success]
UPDATE graph_templates_graph SET t_tab_width='' WHERE t_tab_width='0'

[Success]
UPDATE graph_templates_graph SET t_dynamic_labels='' WHERE t_dynamic_labels IS NULL

[Success]
UPDATE graph_templates_graph SET t_dynamic_labels='' WHERE t_dynamic_labels='0'

[Success]
UPDATE graph_templates_graph SET t_force_rules_legend='' WHERE t_force_rules_legend IS NULL

[Success]
UPDATE graph_templates_graph SET t_force_rules_legend='' WHERE t_force_rules_legend='0'

[Success]
UPDATE graph_templates_graph SET t_legend_position='' WHERE t_legend_position IS NULL

[Success]
UPDATE graph_templates_graph SET t_legend_position='' WHERE t_legend_position='0'

[Success]
UPDATE graph_templates_graph SET t_legend_direction='' WHERE t_legend_direction IS NULL

[Success]
UPDATE graph_templates_graph SET t_legend_direction='' WHERE t_legend_direction='0'

[Success]
UPDATE graph_templates_graph SET t_image_format_id='' WHERE t_image_format_id IS NULL

[Success]
UPDATE graph_templates_graph SET t_image_format_id='' WHERE t_image_format_id='0'

[Success]
UPDATE graph_templates_graph SET t_title='' WHERE t_title IS NULL

[Success]
UPDATE graph_templates_graph SET t_title='' WHERE t_title='0'

[Success]
UPDATE graph_templates_graph SET t_height='' WHERE t_height IS NULL

[Success]
UPDATE graph_templates_graph SET t_height='' WHERE t_height='0'

[Success]
UPDATE graph_templates_graph SET t_width='' WHERE t_width IS NULL

[Success]
UPDATE graph_templates_graph SET t_width='' WHERE t_width='0'

[Success]
UPDATE graph_templates_graph SET t_upper_limit='' WHERE t_upper_limit IS NULL

[Success]
UPDATE graph_templates_graph SET t_upper_limit='' WHERE t_upper_limit='0'

[Success]
UPDATE graph_templates_graph SET t_lower_limit='' WHERE t_lower_limit IS NULL

[Success]
UPDATE graph_templates_graph SET t_lower_limit='' WHERE t_lower_limit='0'

[Success]
UPDATE graph_templates_graph SET t_vertical_label='' WHERE t_vertical_label IS NULL

[Success]
UPDATE graph_templates_graph SET t_vertical_label='' WHERE t_vertical_label='0'

[Success]
UPDATE graph_templates_graph SET t_slope_mode='' WHERE t_slope_mode IS NULL

[Success]
UPDATE graph_templates_graph SET t_slope_mode='' WHERE t_slope_mode='0'

[Success]
UPDATE graph_templates_graph SET t_auto_scale='' WHERE t_auto_scale IS NULL

[Success]
UPDATE graph_templates_graph SET t_auto_scale='' WHERE t_auto_scale='0'

[Success]
UPDATE graph_templates_graph SET unit_value='' WHERE unit_value='on'

[Success]
ALTER TABLE `data_local` ADD INDEX snmp_index(snmp_index(191))

[Success]
ALTER TABLE graph_local DROP INDEX snmp_index

[Success]
ALTER TABLE `graph_local` ADD INDEX snmp_index(snmp_index(191))


Version: 1.0.4

[Success]
ALTER TABLE poller_output_boost DROP PRIMARY KEY, ADD PRIMARY KEY(`local_data_id`, `time`, `rrd_name`) USING BTREE


Version: 1.0.5

[Success]
ALTER TABLE host_snmp_cache MODIFY COLUMN snmp_index varchar(191) NOT NULL default ""

[Success]
ALTER TABLE poller_command MODIFY COLUMN command varchar(191) NOT NULL default ""

[Success]
ALTER TABLE poller_data_template_field_mappings MODIFY COLUMN data_source_names varchar(191) NOT NULL default ""

[Success]
ALTER TABLE snmpagent_managers_notifications MODIFY COLUMN notification varchar(180) NOT NULL

[Success]
ALTER TABLE snmpagent_notifications_log MODIFY COLUMN notification varchar(180) NOT NULL

[Success]
ALTER TABLE poller_reindex DROP PRIMARY KEY, ADD PRIMARY KEY (host_id, data_query_id)

[Success]
UPDATE data_template_data SET data_source_profile_id = 1 WHERE data_source_profile_id = 0

[Success]
ALTER TABLE automation_devices MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""

[Success]
ALTER TABLE automation_snmp_items MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""

[Success]
ALTER TABLE host MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""

[Success]
ALTER TABLE poller_item MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""

[Fail]
ALTER TABLE snmpagent_managers MODIFY COLUMN snmp_engine_id VARCHAR(64) DEFAULT ""

[Success]
ALTER TABLE host ADD COLUMN external_id VARCHAR(40) DEFAULT NULL AFTER notes

[Success]
ALTER TABLE host ADD INDEX external_id (external_id)


Version: 1.1.2

[Success]
ALTER TABLE `graph_templates_item`
DROP INDEX `local_graph_id`,
ADD INDEX `local_graph_id_sequence` (`local_graph_id`, `sequence`)

[Success]
ALTER TABLE `graph_tree_items`
DROP INDEX `parent`,
ADD INDEX `parent_position` (`parent`, `position`)

[Success]
ALTER TABLE `graph_template_input_defs`
COMMENT = 'Stores the relationship for what graph items are associated';

[Success]
ALTER TABLE `graph_tree` ADD INDEX `sequence` (`sequence`)

[Success]
UPDATE graph_templates_item SET hash="" WHERE local_graph_id>0


Version: 1.1.4

[Success]
ALTER TABLE `cdef` ADD INDEX (`hash`)

[Success]
ALTER TABLE `cdef_items`
DROP INDEX `cdef_id`,
ADD INDEX `cdef_id_sequence` (`cdef_id`, `sequence`)

[Success]
ALTER TABLE `data_input_fields`
DROP INDEX `type_code`,
ADD INDEX `type_code_data_input_id` (`type_code`, `data_input_id`)

[Fail]
ALTER TABLE `snmpagent_cache`
DROP INDEX `mib`,
ADD INDEX `mib_name` (`mib`, `name`)

[Success]
ALTER TABLE `host` ADD INDEX (`hostname`)

[Success]
ALTER TABLE `snmpagent_managers_notifications`
DROP INDEX `manager_id`,
DROP INDEX `manager_id2`,
ADD INDEX `manager_id_notification` (`manager_id`,`notification`)

[Success]
ALTER TABLE `snmpagent_notifications_log`
DROP INDEX `manager_id`,
DROP INDEX `manager_id2`,
ADD INDEX `manager_id_notification` (`manager_id`,`notification`)

[Success]
ALTER TABLE `user_auth_group_members` DROP INDEX `group_id`

[Success]
ALTER TABLE `user_auth_group_realm` DROP INDEX `group_id`

[Success]
ALTER TABLE `user_log` DROP INDEX `username`

[Success]
ALTER TABLE `vdef` ADD INDEX `hash` (`hash`)

[Success]
ALTER TABLE `vdef_items`
DROP INDEX `vdef_id`,
ADD INDEX `vdef_id_sequence` (`vdef_id`, `sequence`)

[Success]
ALTER TABLE `graph_templates_item` ADD INDEX `lgi_gti` (`local_graph_id`, `graph_template_id`)

[Success]
ALTER TABLE `poller_item` ADD INDEX `poller_id_host_id` (`poller_id`, `host_id`)

[Success]
ALTER TABLE `automation_networks` ADD COLUMN `site_id` INT UNSIGNED DEFAULT "1" AFTER `poller_id`

[Success]
ALTER TABLE `graph_tree_items`
ADD COLUMN `site_id` INT UNSIGNED DEFAULT "0" AFTER `host_id`,
ADD INDEX `site_id` (`site_id`)

[Success]
ALTER TABLE `graph_tree_items`
ADD COLUMN `graph_regex` VARCHAR(60) DEFAULT "" AFTER `sort_children_type`,
ADD COLUMN `host_regex` VARCHAR(60) DEFAULT "" AFTER `graph_regex`


Version: 1.1.6

[Success]
ALTER TABLE `data_input`
MODIFY COLUMN `input_string` varchar(512) default NULL

[Success]
ALTER TABLE `data_input`
ADD KEY `name_type_id` (`name`(171), `type_id`)

[Success]
ALTER TABLE `snmp_query_graph`
ADD KEY `graph_template_id_name` (`graph_template_id`, `name`)

[Success]
ALTER TABLE `graph_templates`
ADD `multiple` CHAR(2) NOT NULL DEFAULT '' AFTER `name`,
ADD KEY `multiple_name` (`multiple`, `name`(171))

[Success]
UPDATE graph_templates
SET multiple = 'on'
WHERE hash = '010b90500e1fc6a05abfd542940584d0'

[Fail]
ALTER TABLE poller_output
MODIFY COLUMN output VARCHAR(512) NOT NULL default '',
ENGINE=MEMORY

[Success]
ALTER TABLE `graph_templates_gprint`
ADD KEY `name` (`name`)

[Success]
ALTER TABLE `data_source_profiles`
ADD KEY `name` (`name`(171))

[Success]
ALTER TABLE `cdef`
ADD KEY `name` (`name`(171))

[Success]
ALTER TABLE `vdef`
ADD KEY `name` (`name`(171))

[Success]
ALTER TABLE `poller`
ADD KEY `name` (`name`)

[Success]
ALTER TABLE `host_template`
ADD KEY `name` (`name`)

[Success]
ALTER TABLE `data_template`
ADD KEY `name` (`name`)

[Success]
ALTER TABLE `automation_tree_rules`
ADD KEY `name` (`name`(171))

[Success]
ALTER TABLE `automation_graph_rules`
ADD KEY `name` (`name`(171))

[Success]
ALTER TABLE `graph_tree`
ADD KEY `name` (`name`(171))

[Success]
ALTER TABLE `snmp_query_graph`
ADD KEY `snmp_query_id_name` (`snmp_query_id`, `name`)

[Fail]
REPLACE INTO settings (name, value) VALUES ('max_display_rows', '1000')


Version: 1.1.7

[Success]
ALTER TABLE poller_data_template_field_mappings
MODIFY COLUMN data_name VARCHAR(40) NOT NULL default ""


Version: 1.1.11

[Success]
ALTER TABLE poller_data_template_field_mappings
MODIFY COLUMN data_name VARCHAR(40) NOT NULL DEFAULT "",
MODIFY COLUMN data_source_names VARCHAR(125) NOT NULL DEFAULT ""

[Fail]
DELETE FROM settings WHERE name LIKE "md5%_plugins"

[Success]
DELETE FROM poller_resource_cache WHERE path LIKE "plugins/%"


Version: 1.1.14

[Success]
ALTER TABLE automation_networks
MODIFY COLUMN subnet_range VARCHAR(1024) NOT NULL DEFAULT ""


Version: 1.1.17

[Success]
UPDATE user_auth SET realm=3 WHERE realm=1

[Success]
ALTER TABLE data_source_profiles_rra
ADD COLUMN timespan int(10) unsigned NOT NULL DEFAULT "0"


Version: 1.1.20

[Success]
ALTER TABLE snmpagent_cache
MODIFY COLUMN `oid` VARCHAR(50) NOT NULL,
MODIFY COLUMN `name` VARCHAR(50) NOT NULL,
MODIFY COLUMN `mib` VARCHAR(50) NOT NULL,
MODIFY COLUMN `type` VARCHAR(50) NOT NULL,
MODIFY COLUMN `otype` VARCHAR(50) NOT NULL,
MODIFY COLUMN `kind` VARCHAR(50) NOT NULL,
MODIFY COLUMN `max-access` VARCHAR(50) NOT NULL

[Success]
ALTER TABLE snmpagent_mibs
MODIFY COLUMN `name` VARCHAR(50) NOT NULL DEFAULT ""

[Success]
ALTER TABLE snmpagent_cache_notifications
MODIFY COLUMN `name` VARCHAR(50) NOT NULL,
MODIFY COLUMN `mib` VARCHAR(50) NOT NULL,
MODIFY COLUMN `attribute` VARCHAR(50) NOT NULL,
ADD PRIMARY KEY (`name`,`mib`,`attribute`,`sequence_id`)

[Success]
ALTER TABLE snmpagent_cache_textual_conventions
MODIFY COLUMN name VARCHAR(50) NOT NULL,
MODIFY COLUMN mib VARCHAR(50) NOT NULL,
MODIFY COLUMN type VARCHAR(50) NOT NULL,
ADD PRIMARY KEY (`name`,`mib`,`type`)

[Success]
ALTER TABLE snmpagent_managers_notifications
MODIFY COLUMN `notification` VARCHAR(50) NOT NULL,
MODIFY COLUMN `mib` VARCHAR(50) NOT NULL,
ADD PRIMARY KEY (`manager_id`,`notification`,`mib`)


Version: 1.1.26

[Success]
ALTER TABLE `host` ADD KEY `status` (`status`);

[Success]
ALTER TABLE `user_auth_cache` ADD KEY `last_update` (`last_update`);

[Success]
ALTER TABLE `poller_output_realtime` ADD KEY `time` (`time`);

[Success]
ALTER TABLE `poller_time` ADD KEY `poller_id_end_time` (`poller_id`, `end_time`);

[Success]
ALTER TABLE `poller_item`
DROP KEY `rrd_next_step`,
ADD KEY `poller_id_rrd_next_step` (`poller_id`, `rrd_next_step`);


Version: 1.1.28

[Success]
ALTER TABLE `poller` ADD INDEX `disabled` (`disabled`);

[Success]
ALTER TABLE `host`
DROP INDEX `poller_id` ,
ADD INDEX `poller_id_disabled` (`poller_id`, `disabled`);

[Success]
ALTER TABLE `poller_item`
DROP INDEX `local_data_id`,
ADD INDEX `poller_id_action` (`poller_id`, `action`);



my PATHS are now empty again.
trying to figure out how to fix the empty paths at the moment.

mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#32 Post by mrscary » Mon Jan 08, 2018 11:19 am

getting this in my event viewer
InnoDB: Cannot open table cacti/settings_user from the internal data dictionary of InnoDB though the .frm file for the table exists.

I may need to go back and start over again.. think im getting closer.

netniV
Cacti Guru User
Posts: 2976
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

#33 Post by netniV » Mon Jan 08, 2018 12:06 pm

I haven't run cacti on windows to really comment but I think that would just be a warning about something trying to load Zend twice. Unlikely to be the real issue since it doesn't stop your code from running.

mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#34 Post by mrscary » Mon Jan 08, 2018 12:51 pm

latest update.. I got cacti running.. my paths are there.. my test email works, so I know its doing something.
my devices are there.. my templates are there..
but.. zero data so far on my graphs.. time for lunch and then swear at it some more LOL

mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#35 Post by mrscary » Mon Jan 08, 2018 1:50 pm

got rid of the zen error.. turns out, it was enabled twice in my php.ini file.
my CLOG file now shows this quite a few times.. and my graphs still aren't pulling any data..
01/08/2018 10:48:37 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(C:\inetpub\wwwroot\cacti\lib\functions.php: 4446 cacti_debug_backtrace)
01/08/2018 10:48:37 - ERROR PHP CORE_WARNING: Module 'sockets' already loaded in file: Unknown on line: 0


still troubleshooting.

edit.. im also seeing these in my event log.. not sure why MySQL is denying connections
Aborted connection 114 to db: 'cacti' user: 'cactiuser' host: 'localhost' (Got an error reading communication packets)For more information, see Help and Support Center at http://www.mysql.com.

mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#36 Post by mrscary » Mon Jan 08, 2018 2:21 pm

real time graphs are working, but not the poller graphs.. (just updating this thread in case anyone else is looking at the same issues.

netniV
Cacti Guru User
Posts: 2976
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

#37 Post by netniV » Mon Jan 08, 2018 4:42 pm

Is your poller actually running? If so, as what user? There is an FAQ someone posted about installing on windows, make sure you've covered those steps.

mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#38 Post by mrscary » Mon Jan 08, 2018 5:48 pm

when I get in tomorrow ill triple check but it looks to be running to me. its on a schedule and there is data in the CLOG..
I also ran it manually a few times

netniV
Cacti Guru User
Posts: 2976
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

#39 Post by netniV » Mon Jan 08, 2018 6:40 pm

Does the website user have write access to cache log resource rra scripts folders?

mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#40 Post by mrscary » Tue Jan 09, 2018 7:39 am

yes, actually I gave "everyone" full control to it

netniV
Cacti Guru User
Posts: 2976
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

#41 Post by netniV » Tue Jan 09, 2018 8:17 am

I would run through all the windows installation steps again and see if you've missed anything. Unfortunately, I'm not sure what else to suggest at this point as I don't run Cacti on Windows. Is there a reason for running it there over Linux?

mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#42 Post by mrscary » Tue Jan 09, 2018 8:29 am

we are a 99.999999 percent windows shop. all devices are already configured to allow SNMP from this PC (as it does other things for SNMP as well)

mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#43 Post by mrscary » Tue Jan 09, 2018 9:24 am

BOOM!
got it.. was missing 2 environment variables that the installer did not create.
graphs looks to be populating.. however some of my older templates for things like my EXSI hosts, etc no longer function and show errors in the CLOG.. hopefully I can find new templates for those.

this is what I get for waiting so long between version upgrades I guess.. ill miss a bunch of my old plugins.. is there a respository for new "plug ins" for this version of CACTI? I am always going through the CACTI download pages in search of new templates, plug ins, etc. I want to enable THOLD, but im almost scared to do so.. does it work in this version?

mrscary
Cacti User
Posts: 62
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

#44 Post by mrscary » Tue Jan 09, 2018 9:42 am

I take it back.. it graphed for two cycles.. ill let it sit while I go to my meeting.. see if it graphs anything over the next hour

netniV
Cacti Guru User
Posts: 2976
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

#45 Post by netniV » Tue Jan 09, 2018 10:01 am

When you say installer, which installer? The Cacti installer doesn't create any environment variables but it does create include/config.php which holds the basics needed to communicate with mysql etc.

As for plugin repository, the docs section is quite outdated for some I think. For example, Autom8 (Automate), Monitor, THold are now all on GitHub https://github.com/cacti/ but still show up on the plugin page. Personally, I consider the docs plugin page to really be for 0.8.8.

Other plugins depend on the author. If you have a list and link to the originals, I can see if I know where they are now. For example, weathermaps is now half-running on 1.x (doesn't crash) but hasn't had all the work done to it that's needed for production. QuickTree (by the same author) needs an update which I have done https://github.com/netniV/cacti-quicktree/releases) but I consider that a pre-release since I'm not the original author :-)

Post Reply