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. Spring启动,constructor,@PostConstruct,afterPropertiesSet,onApplicationEvent执行顺序

    package com.xx; import javax.annotation.PostConstruct; import javax.annotation.Resource; import org. ...

  2. 学习:窗口创建以及消息处理basic.c

    WNDCLASS结构: Windows 的窗口总是基于窗口类来创建的,窗口类同时确定了处理窗口消息的窗口过程(回调函数). 在创建应用程序窗口之前,必须调用 RegisterClass 函数来注册窗口 ...

  3. Python爬虫 | xpath的安装

    错误信息:程序包无效.详细信息:“Cannot load extension with file or directory name . Filenames starting with "& ...

  4. memset使用技巧

    memset可以对高位数组进行初始化,非常方便.需要注意的是memset的头文件是string.h和memory.h . 下面来谈memset的4个使用技巧: (注:一下dp高维数组都是全局变量,局部 ...

  5. 洛谷 P1972 [SDOI2009]HH的项链-二维偏序+树状数组+读入挂(离线处理,思维,直接1~n一边插入一边查询),hahahahahahaha~

    P1972 [SDOI2009]HH的项链 题目背景 无 题目描述 HH 有一串由各种漂亮的贝壳组成的项链.HH 相信不同的贝壳会带来好运,所以每次散步完后,他都会随意取出一段贝壳,思考它们所表达的含 ...

  6. http 缓存机制简介

    我们应该从两个角度来看http的缓存:缓存控制 和 缓存校验.缓存控制:控制缓存的开关,用于标识请求或访问中是否开启了缓存,使用了什么样的存方式.缓存校验:如何校验缓存,缓存的有效期,如何确定缓存是最 ...

  7. 您使用的私钥格式错误,请检查RSA私钥配置,charset = utf-8 密钥集不存在

    支付宝突然报异常 您使用的私钥格式错误,请检查RSA私钥配置,charset = utf-8 经排查:系统日志 System.Security.Cryptography.CryptographicEx ...

  8. lintcode- 22.平面表

    题目描述 22. 平面列表 给定一个列表,该列表中的每个要素要么是个列表,要么是整数.将其变成一个只包含整数的简单列表. 样例 给定 [1,2,[1,2]],返回 [1,2,1,2]. 给定 [4,[ ...

  9. Centos7.4下安装PHP7.2.2

    ###安装php 安装PHP前,请先安装apache.yum install -y libxml2 libxml2-devel openssl openssl-devel libcurl curl-d ...

  10. APP用户隐私协议

    告知用户 重视每个用户的的隐私,郑重承诺如下: 一.我们所收集的信息以及如何使用: 我们可能通过您的IP地址,地理位置信息,收集一些非个人隐私的统计资料,使我们能够进一步改善APP的服务.例如,当您浏 ...