alerts 表 problem 表 escalations 表 events 表  event_recovery表 对 这些表进行清除 防止不停发送邮件

 -- alerts table rebuild.
-- ----------------------------
-- Table structure for alerts
-- ----------------------------
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `alerts`;
CREATE TABLE `alerts` (
`alertid` bigint(20) unsigned NOT NULL,
`actionid` bigint(20) unsigned NOT NULL,
`eventid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned DEFAULT NULL,
`clock` int(11) NOT NULL DEFAULT '',
`mediatypeid` bigint(20) unsigned DEFAULT NULL,
`sendto` varchar(100) COLLATE utf8_bin NOT NULL DEFAULT '',
`subject` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`message` text COLLATE utf8_bin NOT NULL,
`status` int(11) NOT NULL DEFAULT '',
`retries` int(11) NOT NULL DEFAULT '',
`error` varchar(2048) COLLATE utf8_bin NOT NULL DEFAULT '',
`esc_step` int(11) NOT NULL DEFAULT '',
`alerttype` int(11) NOT NULL DEFAULT '',
`p_eventid` bigint(20) unsigned DEFAULT NULL,
`acknowledgeid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`alertid`),
KEY `alerts_1` (`actionid`),
KEY `alerts_2` (`clock`),
KEY `alerts_3` (`eventid`),
KEY `alerts_4` (`status`),
KEY `alerts_5` (`mediatypeid`),
KEY `alerts_6` (`userid`),
KEY `alerts_7` (`p_eventid`),
KEY `c_alerts_6` (`acknowledgeid`),
CONSTRAINT `c_alerts_1` FOREIGN KEY (`actionid`) REFERENCES `actions` (`actionid`) ON DELETE CASCADE,
CONSTRAINT `c_alerts_2` FOREIGN KEY (`eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE,
CONSTRAINT `c_alerts_3` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE,
CONSTRAINT `c_alerts_4` FOREIGN KEY (`mediatypeid`) REFERENCES `media_type` (`mediatypeid`) ON DELETE CASCADE,
CONSTRAINT `c_alerts_5` FOREIGN KEY (`p_eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE,
CONSTRAINT `c_alerts_6` FOREIGN KEY (`acknowledgeid`) REFERENCES `acknowledges` (`acknowledgeid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
SET FOREIGN_KEY_CHECKS=1; --------------------------------------------------------------------------------------------------------
-- problem table rebuild.
-- ----------------------------
-- Table structure for problem
-- ----------------------------
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `problem`;
CREATE TABLE `problem` (
`eventid` bigint(20) unsigned NOT NULL,
`source` int(11) NOT NULL DEFAULT '',
`object` int(11) NOT NULL DEFAULT '',
`objectid` bigint(20) unsigned NOT NULL DEFAULT '',
`clock` int(11) NOT NULL DEFAULT '',
`ns` int(11) NOT NULL DEFAULT '',
`r_eventid` bigint(20) unsigned DEFAULT NULL,
`r_clock` int(11) NOT NULL DEFAULT '',
`r_ns` int(11) NOT NULL DEFAULT '',
`correlationid` bigint(20) unsigned DEFAULT NULL,
`userid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`eventid`),
KEY `problem_1` (`source`,`object`,`objectid`),
KEY `problem_2` (`r_clock`),
KEY `problem_3` (`r_eventid`),
CONSTRAINT `c_problem_1` FOREIGN KEY (`eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE,
CONSTRAINT `c_problem_2` FOREIGN KEY (`r_eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
SET FOREIGN_KEY_CHECKS=1; ------------------------------------------------------------------------------------------------------
-- escalations table rebuild
-- ------------------------------------
-- Table structure for escalations
---------------------------------------
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `escalations`;
CREATE TABLE `escalations` (
`escalationid` bigint(20) unsigned NOT NULL,
`actionid` bigint(20) unsigned NOT NULL,
`triggerid` bigint(20) unsigned DEFAULT NULL,
`eventid` bigint(20) unsigned DEFAULT NULL,
`r_eventid` bigint(20) unsigned DEFAULT NULL,
`nextcheck` int(11) NOT NULL DEFAULT '',
`esc_step` int(11) NOT NULL DEFAULT '',
`status` int(11) NOT NULL DEFAULT '',
`itemid` bigint(20) unsigned DEFAULT NULL,
`acknowledgeid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`escalationid`),
UNIQUE KEY `escalations_1` (`actionid`,`triggerid`,`itemid`,`escalationid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
SET FOREIGN_KEY_CHECKS=1; ---------------------------------------------------------------------------------------------------
-- events table rebuild
-- ------------------------------------
-- Table structure for events
---------------------------------------
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `events`;
CREATE TABLE `events` (
`eventid` bigint(20) unsigned NOT NULL,
`source` int(11) NOT NULL DEFAULT '',
`object` int(11) NOT NULL DEFAULT '',
`objectid` bigint(20) unsigned NOT NULL DEFAULT '',
`clock` int(11) NOT NULL DEFAULT '',
`value` int(11) NOT NULL DEFAULT '',
`acknowledged` int(11) NOT NULL DEFAULT '',
`ns` int(11) NOT NULL DEFAULT '',
PRIMARY KEY (`eventid`),
KEY `events_1` (`source`,`object`,`objectid`,`clock`),
KEY `events_2` (`source`,`object`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
SET FOREIGN_KEY_CHECKS=1; -----------------------------------------------------------------------------
-- event_recovery table rebuild
-- ------------------------------------
-- Table structure for event_recovery
---------------------------------------
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `event_recovery`;
CREATE TABLE `event_recovery` (
`eventid` bigint(20) unsigned NOT NULL,
`r_eventid` bigint(20) unsigned NOT NULL,
`c_eventid` bigint(20) unsigned DEFAULT NULL,
`correlationid` bigint(20) unsigned DEFAULT NULL,
`userid` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`eventid`),
KEY `event_recovery_1` (`r_eventid`),
KEY `event_recovery_2` (`c_eventid`),
CONSTRAINT `c_event_recovery_1` FOREIGN KEY (`eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE,
CONSTRAINT `c_event_recovery_2` FOREIGN KEY (`r_eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE,
CONSTRAINT `c_event_recovery_3` FOREIGN KEY (`c_eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
SET FOREIGN_KEY_CHECKS=1;

zabbix 后台数据库清除数据的更多相关文章

  1. Javaweb项目-下拉列表显示后台数据库的数据

    下面将演示前端下拉列表显示后台数据库中class表的说有班级的名称 环境: Tomcat-8.5.40 mysql-8.0.13 eclipse-4.9.0 springmvc框架 一.从mysql中 ...

  2. AngularJS + Java---前台网页与后台数据库传递数据 基本结构

    第一个关于这两种语言的项目,以下只是我自己的理解,欢迎指教:) 基本对应关系 1. controller .jsp(.html)  ng-controller="controllerTest ...

  3. 转 zabbix 优化方法 以及 后台数据库查询方法 两则

    ############sample 1 https://blog.51cto.com/sfzhang88/1558254 如何从Zabbix数据库中获取监控数据 sfzhang关注6人评论40627 ...

  4. 利用ajax的方式来提交数据到后台数据库及交互功能

    怎么样用ajax来提交数据到后台数据库,并完成交互呢????? 一.当我们在验证表单的时候,为了阻止把错误的也发送到服务器,我们通常这样设置:     $(function(){       var ...

  5. EasyUI动态显示后台数据库中的数据

    最近在完成一个项目,采用SSM框架搭建完成,前端使用EasyUI搭建页面: 其中涉及到一个查询显示功能:查询数据库中的数据,动态显示在页面之中,刚开始这部分十分有疑问,所以虚心向同学学习,现总结至博客 ...

  6. Kubernetes后台数据库etcd:安装部署etcd集群,数据备份与恢复

    目录 一.系统环境 二.前言 三.etcd数据库 3.1 概述 四.安装部署etcd单节点 4.1 环境介绍 4.2 配置节点的基本环境 4.3 安装部署etcd单节点 4.4 使用客户端访问etcd ...

  7. Android实现多次闪退清除数据

    背景 很多时候由于后台返回的数据异常,可能会导致App闪退.而如果这些异常数据被App本地缓存下来,那么即使杀掉进程重新进入还是会发生闪退.唯一的解决方法就是清除App数据,但是用户可能没有这个意识或 ...

  8. Android存储扩展学习-----应用的清除数据和清除缓存

    前几天和朋友聊到了APP清除数据这块,聊到了清除数据都会清掉哪些数据,我们每个人的手机在”设置–>应用管理”里面,选择任意一个App,都会看到两个按钮,一个是清除缓存,另一个是清除数据,那么当我 ...

  9. 编译安装mysql和zabbix,xtrabackup数据库备份

    xtrabackup参考文章 https://www.cnblogs.com/linuxk/p/9372990.html 下载5.7的mysql 社区版包 https://cdn.mysql.com/ ...

随机推荐

  1. 高性能MySQL(一)——索引

    一.mysql索引分类 单值索引:一个索引只包含单个列,一个表可以有多个单列索引 唯一索引:索引列的值必须唯一,但允许有空值 复合索引:一个索引包含多个列 基本语法: 创建:1.CREATE [UNI ...

  2. Eclipse 常用快捷键——IDEA 常用快捷键

    Eclipse 常用快捷键 熟练 单选注释 ctrl + / 多行注释 ctrl + shift + / 向下复制一行 (Duplicate Lines) ctrl+alt+down 删除一行或选中行 ...

  3. Java检查异常、非检查异常、运行时异常、非运行时异常的区别

    Java把所有的非正常情况分为两种:异常(Exception)和错误(Error),它们都继承Throwable父类. Java的异常(Exception和Error)分为检查异常和非检查的异常. 其 ...

  4. DOM是什么

    UI—html—DOM(tree-structured representation. manipulate)—Virtual DOM(component) Real DOM强调树状结构的整体:核心是 ...

  5. [nodemon] app crashed - waiting for file changes before starting...

    慕课网前端工程师晋升课程 Vue全家桶+SSR+Koa2全栈开发美团网 视频里用 npx create-nuxt-app mt-app创建项目后,不能使用import ...from....跟着老师修 ...

  6. MongoDB 启动报错

    1.配置MongoDB ls /etc/mongod.conf 可以根据此配置文件启动 或者根据自己需求进行配置文件的变更 重要提醒: 如果变更MongoDB配置文件中:日志与数据文件目录,那么要把这 ...

  7. Git常用命令与入门

    Git 仓库就是那个.git 目录,其中存放的是我们所提交的文档索引内容,Git 可基于文档索引内容对其所管理的文档进行内容追踪,从而实现文档的版本控制..git目录位于工作目录内.对于任何一个文件, ...

  8. CCF 201709-3 JSON查询

    CCF 201709-3 JSON查询 试题编号: 201709-3 试题名称: JSON查询 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 JSON (JavaScript ...

  9. Navicat自动断开连接处理方式

    问题描述 使用Navicat连接mysql后,如果一段时间不操作,那么会再次操作时会提示无响应,每次都这样确实折磨人,大大降低了工作效率! 问题解决 关闭连接→右键连接→连接属性 将上述心跳时间设置为 ...

  10. 帝国cms伪静态设置方法

    众所周知,动态页面不利于收录和排名.伪静态可以完美的解决这问题,配合百度云加速CDN,可以让动态页面有静态页面一样快的访问速度. 今天开拓族给大家带来帝国CMS伪静态的详细设置方法. 1.栏目设置为动 ...