-- MySQL dump 10.13  Distrib 5.1.73, for redhat-linux-gnu (x86_64)
--
-- Host: localhost    Database: nagiosxi
-- ------------------------------------------------------
-- Server version	5.1.73-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Current Database: `nagiosxi`
--

/*!40000 DROP DATABASE IF EXISTS `nagiosxi`*/;

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `nagiosxi` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `nagiosxi`;

--
-- Table structure for table `xi_auditlog`
--

DROP TABLE IF EXISTS `xi_auditlog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_auditlog` (
  `auditlog_id` int(11) NOT NULL AUTO_INCREMENT,
  `log_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `source` text,
  `user` varchar(200) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `message` text,
  `ip_address` varchar(45) DEFAULT NULL,
  `details` text,
  PRIMARY KEY (`auditlog_id`),
  KEY `log_time` (`log_time`) USING BTREE,
  KEY `user` (`user`) USING BTREE,
  KEY `type` (`type`) USING BTREE,
  KEY `ip_address` (`ip_address`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=6559 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_auth_tokens`
--

DROP TABLE IF EXISTS `xi_auth_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_auth_tokens` (
  `auth_token_id` int(11) NOT NULL AUTO_INCREMENT,
  `auth_user_id` int(11) NOT NULL,
  `auth_session_id` int(11) NOT NULL,
  `auth_token` varchar(128) DEFAULT NULL,
  `auth_valid_until` datetime DEFAULT NULL,
  `auth_expires_at` datetime DEFAULT NULL,
  `auth_restrictions` mediumtext,
  `auth_used` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`auth_token_id`),
  UNIQUE KEY `auth_token_id` (`auth_token_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_cmp_ccm_backups`
--

DROP TABLE IF EXISTS `xi_cmp_ccm_backups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_cmp_ccm_backups` (
  `config_id` int(11) NOT NULL AUTO_INCREMENT,
  `config_creator` int(11) DEFAULT NULL,
  `config_name` varchar(200) DEFAULT NULL,
  `config_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `archived` smallint(6) DEFAULT '0',
  PRIMARY KEY (`config_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_cmp_favorites`
--

DROP TABLE IF EXISTS `xi_cmp_favorites`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_cmp_favorites` (
  `item_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `title` varchar(63) NOT NULL,
  `partial_href` text NOT NULL,
  PRIMARY KEY (`item_id`),
  KEY `user_menu_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_cmp_nagiosbpi_backups`
--

DROP TABLE IF EXISTS `xi_cmp_nagiosbpi_backups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_cmp_nagiosbpi_backups` (
  `config_id` int(11) NOT NULL AUTO_INCREMENT,
  `config_creator` int(11) DEFAULT NULL,
  `config_name` varchar(200) DEFAULT NULL,
  `config_file` varchar(64) DEFAULT NULL,
  `config_hash` varchar(50) DEFAULT NULL,
  `config_changes` text,
  `config_diff` text,
  `config_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `archived` smallint(6) DEFAULT '0',
  PRIMARY KEY (`config_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_cmp_trapdata`
--

DROP TABLE IF EXISTS `xi_cmp_trapdata`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_cmp_trapdata` (
  `trapdata_id` int(11) NOT NULL AUTO_INCREMENT,
  `trapdata_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `trapdata_enabled` smallint(6) DEFAULT '1',
  `trapdata_event_name` varchar(128) NOT NULL DEFAULT '',
  `trapdata_event_oid` varchar(256) NOT NULL DEFAULT '',
  `trapdata_category` varchar(128) NOT NULL DEFAULT '',
  `trapdata_severity` varchar(64) NOT NULL DEFAULT '',
  `trapdata_custom_format` text,
  `trapdata_raw_data` text,
  `trapdata_exec` text,
  `trapdata_desc` text,
  `trapdata_wizard_integration_enabled` smallint(6) DEFAULT '0',
  `trapdata_wizard_integration_data` text,
  `trapdata_parent_mib_name` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`trapdata_id`),
  UNIQUE KEY `trapdata_event_name` (`trapdata_event_name`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_cmp_trapdata_log`
--

DROP TABLE IF EXISTS `xi_cmp_trapdata_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_cmp_trapdata_log` (
  `trapdata_log_id` int(11) NOT NULL AUTO_INCREMENT,
  `trapdata_log_event_name` varchar(128) NOT NULL DEFAULT '',
  `trapdata_log_event_oid` varchar(50) NOT NULL DEFAULT '',
  `trapdata_log_numeric_oid` varchar(100) DEFAULT NULL,
  `trapdata_log_symbolic_oid` varchar(100) DEFAULT NULL,
  `trapdata_log_community` varchar(20) DEFAULT NULL,
  `trapdata_log_trap_hostname` varchar(100) DEFAULT NULL,
  `trapdata_log_trap_ip` varchar(16) DEFAULT NULL,
  `trapdata_log_agent_hostname` varchar(100) DEFAULT NULL,
  `trapdata_log_agent_IP` varchar(16) DEFAULT NULL,
  `trapdata_log_category` varchar(20) NOT NULL DEFAULT '',
  `trapdata_log_severity` varchar(20) NOT NULL DEFAULT '',
  `trapdata_log_uptime` varchar(20) NOT NULL DEFAULT '',
  `trapdata_log_datetime` datetime DEFAULT NULL,
  `trapdata_log_bindings` text,
  PRIMARY KEY (`trapdata_log_id`),
  UNIQUE KEY `trapdata_log_id` (`trapdata_log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_commands`
--

DROP TABLE IF EXISTS `xi_commands`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_commands` (
  `command_id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) DEFAULT '0',
  `submitter_id` int(11) DEFAULT '0',
  `beneficiary_id` int(11) DEFAULT '0',
  `command` int(11) NOT NULL,
  `submission_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `event_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `frequency_type` int(11) DEFAULT '0',
  `frequency_units` int(11) DEFAULT '0',
  `frequency_interval` int(11) DEFAULT '0',
  `processing_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `status_code` int(11) DEFAULT '0',
  `result_code` int(11) DEFAULT '0',
  `command_data` text,
  `result` text,
  PRIMARY KEY (`command_id`)
) ENGINE=MyISAM AUTO_INCREMENT=474 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_deploy_agents`
--

DROP TABLE IF EXISTS `xi_deploy_agents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_deploy_agents` (
  `deploy_id` int(11) NOT NULL AUTO_INCREMENT,
  `creator_id` int(11) DEFAULT NULL,
  `deployed_date` datetime DEFAULT NULL,
  `last_updated_date` datetime DEFAULT NULL,
  `last_status_check` datetime DEFAULT NULL,
  `available` smallint(6) NOT NULL DEFAULT '0',
  `version` varchar(10) DEFAULT NULL,
  `address` varchar(60) DEFAULT NULL,
  `hostname` varchar(250) DEFAULT NULL,
  `os` varchar(24) DEFAULT NULL,
  `metadata` text,
  PRIMARY KEY (`deploy_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_deploy_jobs`
--

DROP TABLE IF EXISTS `xi_deploy_jobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_deploy_jobs` (
  `job_id` int(11) NOT NULL AUTO_INCREMENT,
  `job_name` varchar(64) DEFAULT NULL,
  `creator_id` int(11) DEFAULT NULL,
  `version` varchar(10) DEFAULT NULL,
  `os` varchar(24) DEFAULT NULL,
  `addresses` text,
  `ncpa_token` text,
  `username` varchar(64) DEFAULT NULL,
  `password` text,
  `vault_password` text,
  `sudo` smallint(6) NOT NULL DEFAULT '0',
  `status` int(11) DEFAULT NULL,
  `pid` int(11) DEFAULT NULL,
  `metadata` text,
  PRIMARY KEY (`job_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_eventqueue`
--

DROP TABLE IF EXISTS `xi_eventqueue`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_eventqueue` (
  `eventqueue_id` int(11) NOT NULL AUTO_INCREMENT,
  `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `event_source` smallint(6) DEFAULT NULL,
  `event_type` smallint(6) NOT NULL DEFAULT '0',
  `event_meta` text,
  PRIMARY KEY (`eventqueue_id`),
  UNIQUE KEY `eventqueue_id` (`eventqueue_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2311 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_events`
--

DROP TABLE IF EXISTS `xi_events`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_events` (
  `event_id` int(11) NOT NULL AUTO_INCREMENT,
  `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `event_source` smallint(6) DEFAULT NULL,
  `event_type` smallint(6) NOT NULL DEFAULT '0',
  `status_code` smallint(6) NOT NULL DEFAULT '0',
  `processing_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`event_id`),
  KEY `event_source` (`event_source`) USING BTREE,
  KEY `event_time` (`event_time`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=24884 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_incidents`
--

DROP TABLE IF EXISTS `xi_incidents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_incidents` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `incident_id` int(11) DEFAULT '0',
  `submitted` int(11) DEFAULT '0',
  `type` varchar(16) DEFAULT NULL,
  `host` varchar(96) DEFAULT NULL,
  `service` varchar(96) DEFAULT NULL,
  `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `status` varchar(16) DEFAULT NULL,
  `output` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=897 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_meta`
--

DROP TABLE IF EXISTS `xi_meta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_meta` (
  `meta_id` int(11) NOT NULL AUTO_INCREMENT,
  `metatype_id` int(11) DEFAULT '0',
  `metaobj_id` int(11) DEFAULT '0',
  `keyname` varchar(128) NOT NULL,
  `keyvalue` text,
  PRIMARY KEY (`meta_id`)
) ENGINE=MyISAM AUTO_INCREMENT=24889 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_mibs`
--

DROP TABLE IF EXISTS `xi_mibs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_mibs` (
  `mib_id` int(11) NOT NULL AUTO_INCREMENT,
  `mib_name` varchar(64) DEFAULT NULL,
  `mib_uploaded` datetime DEFAULT NULL,
  `mib_last_processed` datetime DEFAULT NULL,
  `mib_type` enum('upload','process_manual','process_nxti') DEFAULT NULL,
  PRIMARY KEY (`mib_id`),
  UNIQUE KEY `mib_id` (`mib_id`),
  UNIQUE KEY `mib_name` (`mib_name`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_options`
--

DROP TABLE IF EXISTS `xi_options`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_options` (
  `option_id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(128) NOT NULL,
  `value` text,
  PRIMARY KEY (`option_id`),
  KEY `name` (`name`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=345 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_sessions`
--

DROP TABLE IF EXISTS `xi_sessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_sessions` (
  `session_id` int(11) NOT NULL AUTO_INCREMENT,
  `session_phpid` varchar(128) DEFAULT NULL,
  `session_created` datetime DEFAULT NULL,
  `session_user_id` int(11) NOT NULL,
  `session_address` varchar(128) DEFAULT NULL,
  `session_page` varchar(255) DEFAULT NULL,
  `session_data` text,
  `session_last_active` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`session_id`),
  UNIQUE KEY `session_id` (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_sysstat`
--

DROP TABLE IF EXISTS `xi_sysstat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_sysstat` (
  `sysstat_id` int(11) NOT NULL AUTO_INCREMENT,
  `metric` varchar(128) NOT NULL,
  `value` text,
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`sysstat_id`),
  KEY `metric` (`metric`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_usermeta`
--

DROP TABLE IF EXISTS `xi_usermeta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_usermeta` (
  `usermeta_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `keyname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `keyvalue` longtext COLLATE utf8_unicode_ci,
  `autoload` smallint(6) DEFAULT '0',
  PRIMARY KEY (`usermeta_id`),
  UNIQUE KEY `user_unique_key` (`user_id`,`keyname`),
  KEY `autoload` (`autoload`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=3645 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `xi_users`
--

DROP TABLE IF EXISTS `xi_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `xi_users` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(64) NOT NULL,
  `password` varchar(128) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `email` varchar(128) NOT NULL,
  `backend_ticket` varchar(128) DEFAULT NULL,
  `enabled` smallint(6) DEFAULT '1',
  `api_key` varchar(128) DEFAULT NULL,
  `api_enabled` smallint(6) NOT NULL DEFAULT '0',
  `login_attempts` smallint(6) NOT NULL DEFAULT '0',
  `last_attempt` int(10) NOT NULL DEFAULT '0',
  `last_password_change` int(10) NOT NULL DEFAULT '0',
  `last_login` int(11) NOT NULL DEFAULT '0',
  `created_by` int(10) NOT NULL DEFAULT '0',
  `created_time` int(11) NOT NULL DEFAULT '0',
  `last_edited` int(11) NOT NULL DEFAULT '0',
  `last_edited_by` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM AUTO_INCREMENT=99 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2020-06-26 10:11:07
