Zabbix的数据表结构
看到Zabbix的数据表结构吧,就知道数据量大了 性能问题很让人担忧,不过基于Zabbix数据库导出报表,或自动跑报表的时候,就必须去了解一下zabbix的数据表结构了,得知道XX放在哪才能找到XX,既然能找到XX了,让他数据可视化起来也就不是什么问题了,废话少说开撸
0、Hosts表
mysql> DESC hosts;
###这里面存有hostid、proxyid、节点信息、状态以及XXX各种信息,比较核心的一张表###
+--------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+---------------------+------+-----+---------+-------+
| hostid | bigint(20) unsigned | NO | PRI | NULL | |
| proxy_hostid | bigint(20) unsigned | YES | MUL | NULL | |
| host | varchar(64) | NO | MUL | | |
| status | int(11) | NO | MUL | 0 | |
| disable_until | int(11) | NO | | 0 | |
| error | varchar(128) | NO | | | |
| available | int(11) | NO | | 0 | |
| errors_from | int(11) | NO | | 0 | |
| lastaccess | int(11) | NO | | 0 | |
| ipmi_authtype | int(11) | NO | | 0 | |
| ipmi_privilege | int(11) | NO | | 2 | |
| ipmi_username | varchar(16) | NO | | | |
| ipmi_password | varchar(20) | NO | | | |
| ipmi_disable_until | int(11) | NO | | 0 | |
| ipmi_available | int(11) | NO | | 0 | |
| snmp_disable_until | int(11) | NO | | 0 | |
| snmp_available | int(11) | NO | | 0 | |
| maintenanceid | bigint(20) unsigned | YES | MUL | NULL | |
| maintenance_status | int(11) | NO | | 0 | |
| maintenance_type | int(11) | NO | | 0 | |
| maintenance_from | int(11) | NO | | 0 | |
| ipmi_errors_from | int(11) | NO | | 0 | |
| snmp_errors_from | int(11) | NO | | 0 | |
| ipmi_error | varchar(128) | NO | | | |
| snmp_error | varchar(128) | NO | | | |
| jmx_disable_until | int(11) | NO | | 0 | |
| jmx_available | int(11) | NO | | 0 | |
| jmx_errors_from | int(11) | NO | | 0 | |
| jmx_error | varchar(128) | NO | | | |
| name | varchar(64) | NO | MUL | | |
| flags | int(11) | NO | | 0 | |
| templateid | bigint(20) unsigned | YES | MUL | NULL | |
+--------------------+---------------------+------+-----+---------+-------+
1、groups表
mysql> DESC groups;
##这张表结构主要就是组名和组ID##
+----------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------------------+------+-----+---------+-------+
| groupid | bigint(20) unsigned | NO | PRI | NULL | |
| name | varchar(64) | NO | MUL | | |
| internal | int(11) | NO | | 0 | |
| flags | int(11) | NO | | 0 | |
+----------+---------------------+------+-----+---------+-------+
3、hosts_groups表
mysql> DESC hosts_groups;
###hosts[主机] 和 groups[组] 的关联关系###
+-------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+-------+
| hostgroupid | bigint(20) unsigned | NO | PRI | NULL | |
| hostid | bigint(20) unsigned | NO | MUL | NULL | |
| groupid | bigint(20) unsigned | NO | MUL | NULL | |
+-------------+---------------------+------+-----+---------+-------+
4、items表
mysql> DESC items;
###存有各种监控项的信息###
+-----------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+---------------------+------+-----+---------+-------+
| itemid | bigint(20) unsigned | NO | PRI | NULL | |
| type | int(11) | NO | | 0 | |
| snmp_community | varchar(64) | NO | | | |
| snmp_oid | varchar(255) | NO | | | |
| hostid | bigint(20) unsigned | NO | MUL | NULL | |
| name | varchar(255) | NO | | | |
| key_ | varchar(255) | NO | | | |
| delay | int(11) | NO | | 0 | |
| history | int(11) | NO | | 90 | |
| trends | int(11) | NO | | 365 | |
| status | int(11) | NO | MUL | 0 | |
| value_type | int(11) | NO | | 0 | |
| trapper_hosts | varchar(255) | NO | | | |
| units | varchar(255) | NO | | | |
| multiplier | int(11) | NO | | 0 | |
| delta | int(11) | NO | | 0 | |
| snmpv3_securityname | varchar(64) | NO | | | |
| snmpv3_securitylevel | int(11) | NO | | 0 | |
| snmpv3_authpassphrase | varchar(64) | NO | | | |
| snmpv3_privpassphrase | varchar(64) | NO | | | |
| formula | varchar(255) | NO | | 1 | |
| error | varchar(128) | NO | | | |
| lastlogsize | bigint(20) unsigned | NO | | 0 | |
| logtimefmt | varchar(64) | NO | | | |
| templateid | bigint(20) unsigned | YES | MUL | NULL | |
| valuemapid | bigint(20) unsigned | YES | MUL | NULL | |
| delay_flex | varchar(255) | NO | | | |
| params | text | NO | | NULL | |
| ipmi_sensor | varchar(128) | NO | | | |
| data_type | int(11) | NO | | 0 | |
| authtype | int(11) | NO | | 0 | |
| username | varchar(64) | NO | | | |
| password | varchar(64) | NO | | | |
| publickey | varchar(64) | NO | | | |
| privatekey | varchar(64) | NO | | | |
| mtime | int(11) | NO | | 0 | |
| flags | int(11) | NO | | 0 | |
| filter | varchar(255) | NO | | | |
| interfaceid | bigint(20) unsigned | YES | MUL | NULL | |
| port | varchar(64) | NO | | | |
| description | text | NO | | NULL | |
| inventory_link | int(11) | NO | | 0 | |
| lifetime | varchar(64) | NO | | 30 | |
| snmpv3_authprotocol | int(11) | NO | | 0 | |
| snmpv3_privprotocol | int(11) | NO | | 0 | |
| state | int(11) | NO | | 0 | |
| snmpv3_contextname | varchar(255) | NO | | | |
+-----------------------+---------------------+------+-----+---------+-------+
5、media表
###存有XX用户的Media配置和相对应的告警方式###
mysql> DESC media;
+-------------+---------------------+------+-----+-----------------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+-----------------+-------+
| mediaid | bigint(20) unsigned | NO | PRI | NULL | |
| userid | bigint(20) unsigned | NO | MUL | NULL | |
| mediatypeid | bigint(20) unsigned | NO | MUL | NULL | |
| sendto | varchar(100) | NO | | | |
| active | int(11) | NO | | 0 | |
| severity | int(11) | NO | | 63 | |
| period | varchar(100) | NO | | 1-7,00:00-24:00 | |
+-------------+---------------------+------+-----+-----------------+-------+
6、media_type表
mysql> desc media_type;
##存有media告警方式对应的执行脚本的信息##
+-------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+-------+
| mediatypeid | bigint(20) unsigned | NO | PRI | NULL | |
| type | int(11) | NO | | 0 | |
| description | varchar(100) | NO | | | |
| smtp_server | varchar(255) | NO | | | |
| smtp_helo | varchar(255) | NO | | | |
| smtp_email | varchar(255) | NO | | | |
| exec_path | varchar(255) | NO | | | |
| gsm_modem | varchar(255) | NO | | | |
| username | varchar(255) | NO | | | |
| passwd | varchar(255) | NO | | | |
| status | int(11) | NO | | 0 | |
+-------------+---------------------+------+-----+---------+-------+
7、triggers表
mysql> DESC triggers;
###存有触发器相关所有信息###
+-------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+-------+
| triggerid | bigint(20) unsigned | NO | PRI | NULL | |
| expression | varchar(2048) | NO | | | |
| description | varchar(255) | NO | | | |
| url | varchar(255) | NO | | | |
| status | int(11) | NO | MUL | 0 | |
| value | int(11) | NO | MUL | 0 | |
| priority | int(11) | NO | | 0 | |
| lastchange | int(11) | NO | | 0 | |
| comments | text | NO | | NULL | |
| error | varchar(128) | NO | | | |
| templateid | bigint(20) unsigned | YES | MUL | NULL | |
| type | int(11) | NO | | 0 | |
| state | int(11) | NO | | 0 | |
| flags | int(11) | NO | | 0 | |
+-------------+---------------------+------+-----+---------+-------+
8、trigger_depends表
mysql> DESC trigger_depends;
##存有触发器的依存信息###
+----------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------------+------+-----+---------+-------+
| triggerdepid | bigint(20) unsigned | NO | PRI | NULL | |
| triggerid_down | bigint(20) unsigned | NO | MUL | NULL | |
| triggerid_up | bigint(20) unsigned | NO | MUL | NULL | |
+----------------+---------------------+------+-----+---------+-------+
9、graphs表
mysql> DESC graphs;
##该表存有用户定义的图表信息###
+------------------+---------------------+------+-----+----------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------------+------+-----+----------+-------+
| graphid | bigint(20) unsigned | NO | PRI | NULL | |
| name | varchar(128) | NO | MUL | | |
| width | int(11) | NO | | 900 | |
| height | int(11) | NO | | 200 | |
| yaxismin | double(16,4) | NO | | 0.0000 | |
| yaxismax | double(16,4) | NO | | 100.0000 | |
| templateid | bigint(20) unsigned | YES | MUL | NULL | |
| show_work_period | int(11) | NO | | 1 | |
| show_triggers | int(11) | NO | | 1 | |
| graphtype | int(#11) | NO | | 0 | |
| show_legend | int(11) | NO | | 1 | |
| show_3d | int(11) | NO | | 0 | |
| percent_left | double(16,4) | NO | | 0.0000 | |
| percent_right | double(16,4) | NO | | 0.0000 | |
| ymin_type | int(11) | NO | | 0 | |
| ymax_type | int(11) | NO | | 0 | |
| ymin_itemid | bigint(20) unsigned | YES | MUL | NULL | |
| ymax_itemid | bigint(20) unsigned | YES | MUL | NULL | |
| flags | int(11) | NO | | 0 | |
+------------------+---------------------+------+-----+----------+-------+
10、graphs_items表
mysql> DESC graphs_items;
##graphs_items 保存了属于某个图表的所有的监控项信息###
+-----------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------------------+------+-----+---------+-------+
| gitemid | bigint(20) unsigned | NO | PRI | NULL | |
| graphid | bigint(20) unsigned | NO | MUL | NULL | |
| itemid | bigint(20) unsigned | NO | MUL | NULL | |
| drawtype | int(11) | NO | | 0 | |
| sortorder | int(11) | NO | | 0 | |
| color | varchar(6) | NO | | 009600 | |
| yaxisside | int(11) | NO | | 0 | |
| calc_fnc | int(11) | NO | | 2 | |
| type | int(11) | NO | | 0 | |
+-----------+---------------------+------+-----+---------+-------+
11、screens表
mysql> desc screens;
##存有用户定义的一些监控图片组##
+------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+-------+
| screenid | bigint(20) unsigned | NO | PRI | NULL | |
| name | varchar(255) | NO | | NULL | |
| hsize | int(11) | NO | | 1 | |
| vsize | int(11) | NO | | 1 | |
| templateid | bigint(20) unsigned | YES | MUL | NULL | |
+------------+---------------------+------+-----+---------+-------+
12、screens_items表
mysql> desc screens_items;
##和前面graphs_items概念一样##
+---------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+---------------------+------+-----+---------+-------+
| screenitemid | bigint(20) unsigned | NO | PRI | NULL | |
| screenid | bigint(20) unsigned | NO | MUL | NULL | |
| resourcetype | int(11) | NO | | 0 | |
| resourceid | bigint(20) unsigned | NO | | 0 | |
| width | int(11) | NO | | 320 | |
| height | int(11) | NO | | 200 | |
| x | int(11) | NO | | 0 | |
| y | int(11) | NO | | 0 | |
| colspan | int(11) | NO | | 0 | |
| rowspan | int(11) | NO | | 0 | |
| elements | int(11) | NO | | 25 | |
| valign | int(11) | NO | | 0 | |
| halign | int(11) | NO | | 0 | |
| style | int(11) | NO | | 0 | |
| url | varchar(255) | NO | | | |
| dynamic | int(11) | NO | | 0 | |
| sort_triggers | int(11) | NO | | 0 | |
| application | varchar(255) | NO | | | |
+---------------+---------------------+------+-----+---------+-------+
13、functions表
mysql> DESC functions;
##比较重要的一张表,存有触发器里面各种表达式##
+------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+-------+
| functionid | bigint(20) unsigned | NO | PRI | NULL | |
| itemid | bigint(20) unsigned | NO | MUL | NULL | |
| triggerid | bigint(20) unsigned | NO | MUL | NULL | |
| function | varchar(12) | NO | | | |
| parameter | varchar(255) | NO | | 0 | |
+------------+---------------------+------+-----+---------+-------+
14、sessions表
mysql> DESC sessions;
##存有各个用户的session,登入登出都会操作该表##
+------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+-------+
| sessionid | varchar(32) | NO | PRI | | |
| userid | bigint(20) unsigned | NO | MUL | NULL | |
| lastaccess | int(11) | NO | | 0 | |
| status | int(11) | NO | | 0 | |
+------------+---------------------+------+-----+---------+-------+
» 转载保留版权:IT辰逸 » 《Zabbix 数据库表结构》
» 本文链接地址:http://www.ipython.me/centos/zabbix-datatable-struc.html
» 本文版权采取: BY-NC-SA 协议进行授权,转载注明出处。除IT-Tools、News以及特别标注,本站所有文章均为原创。
» 如果喜欢可以: 点此订阅本站
Zabbix的数据表结构的更多相关文章
- 25 Zabbix系统数据表结构介绍
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 25 Zabbix系统数据表结构介绍 自学Zabbix之路15.1 Zabbix数据库表结构简单解 ...
- 【转】Informix数据表结构分析资料整理之约束查询代码
原文地址:http://blog.csdn.net/xqf222/article/details/6271219 本文主要整理了Informix数据库相关系统表数据,已分析整个Informix数据表结 ...
- navicat如何导出mysql数据表结构
我们在创建数据库时会对字段进行设置,比如类型.长度等,如果字段多的话一个个设置非常麻烦,可以从其他地方已有的表导入数据表结构,怎么操作呢?我们拿navicat导出mysql数据表结构为例: 1.点击“ ...
- (笔记)Mysql命令desc:获取数据表结构
desc命令用于获取数据表结构. desc命令格式: desc 表名;同样 show columns from 表名;也能获取数据表结构. 举例如下:mysql> desc MyCl ...
- phpmyadmin数据表结构没有显示注释列
新开的一个项目,用phpmyadmin作为图形化操作数据库工具.创建数据表时为其每列添加好注释,浏览数据表内容有显示注释内容,但是查看数据表结构没有显示注释列,不方便直观查看数据表每列的意思. 上网搜 ...
- Activiti学习(二)数据表结构
Activiti工作流引擎数据库表结构 数据库表的命名 Acitiviti数据库中表的命名都是以ACT_开头的.第二部分是一个两个字符用例表的标识.此用例大体与服务API是匹配的. l ...
- jdbcTemplate 获取数据表结构
jdbcTemplate 操作方法 /** *1.方法一: */ String sql = "select * from "+ tableName; //RowCountCallb ...
- mysql导出数据表结构,必须退出mysql命令.重新使用msyqldump命令
只导出数据库中所有表结构(-d 减去数据) 导出所有表结构和数据 mysqldump -uroot --default-character-set=utf8 -p123-d必须空格good>H: ...
- python --商品评价---- 数据表结构以及理解
商品评论(评价)功能 1.概述 评论功能已经成为APP和网站开发中的必备功能.本文主要介绍评论功能的数据库设计. 评论功能最主要的是发表评论和回复评论(删除功能在后台).评论功能的拓展功能体现有以下几 ...
随机推荐
- Webserver管理系列:5、利用MSConfig排查木马
木马程序最喜欢去的地方有两个一个是服务里面,一个是启动里面.利用msconfig我们能够高速的找到可疑程序. 在命令行中输入msconfig回车 选择服务项: 这里面的服务有非常多我们非常难排查,我告 ...
- STL 之 queue、priority_queue 源代码剖析
/* * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute an ...
- maven Nexus 搭建本地中央仓库。
maven 网络中央仓库占用大量的网络资源,所以构建本地中央仓库. 过程如下: 下载地址: http://www.sonatype.org/nexus/archived 我用的是1.6的 [root@ ...
- centos 安装 redis3.2.0 集群
这里创建6个redis节点,其中三个为主节点,三个为从节点. redis和端口对应关系: 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 从: 127.0.0 ...
- oracle检查点队列与增量检查点【转载】
oracle检查点队列与增量检查点 今天是2013-09-04,这几天一直心里安顿不下来,今天还好了,可以自己安静的学习一下oracle,在此记录一下学习笔记.这篇文章我不知道在那转载的,一直都留在我 ...
- 【剑指offer】q34:丑数
题目要求第n个丑数.所以对于中间结果不须要保存. def Humble(index): curHum = 1 M2 = 2; M3 = 3; M5 = 5 while index > 1: cu ...
- java常见的输入和输出流案例研究(一个)
字节输入和输出流 1.FileInputStream[文件字节输入流]->读取文件内容 用途:从文件系统中的文件获得输入字节.经常使用于读取图像.声音等原始字节流,读取字符流可考虑使用FileR ...
- 红黑树-Python实现
#coding:utf8 #author:HaxtraZ #description:红黑树,python实现 RED = 'red' BLACK = 'black' class RBT: def __ ...
- TreeSet排序
TreeSet的排序能够通过两种方法来实现: 1.通过TreeSet(Comparator<? super E> comparator) 构造方法指定TreeSet的比較器进行排序. 2. ...
- UFLDL教程笔记及练习答案二(预处理:主成分分析和白化)
首先将本节主要内容记录下来.然后给出课后习题的答案. 笔记: :首先我想推导用SVD求解PCA的合理性. PCA原理:如果样本数据X∈Rm×n.当中m是样本数量,n是样本的维数.PCA降维的目的就是为 ...