记录关于Devops运维,虚拟化容器云计算,数据库,网络安全等各方面问题。
 
0
zabbix触发器表达式详解概述触发器中的表达式使用很灵活,我们可以创建一个复杂的逻辑测试监控,触发器表达式形式如下:{<server>:<key>.<function>(<parameter>)}<operator><constant>{主机:key.函数(参数)}<表达式>常数,具体的例子,请接着往下走,很简单Functions函数触发器functions可以引用检索到的值,当前时间或者其他元素。触发器表达式支持的function完整列表请点击官网地址 supported functionsFunction参数大多数数值functions可以使用秒来作为参数。你可以使用前缀“#”来表示它有不同的含义FUNCTION CALL描述sum(600)600秒内的总和sum(#5)倒数第五5个值last函数使用不同的参数将会得到不同的值,#2表示倒数第二新的数据。例入从老到最新值为1,2,3,4,5,6,7,8,9,10,last(#2)得到的值为9,last(#9)得到的值为2。last函数必须包含参数。AVG,count,last,min和max函数还支持额外的参数,以秒为单位的参数time_shift(时间偏移量)。例如avg(1h,1d),那么将会获取到昨天的1小时内的平均数据。备注:触发器表达式需要使用history历史数据来计算,如果history不可用(time_shift时间偏移量参数无法使用),因此history记...
关于ip_conntrack调整的一个好文   Tuning Linux firewall connection tracker ip_conntrackOverviewIf your Linux server should handle lots of connections, you can get into the problem with ip_conntrack iptables module. It limits number of simultaneous connections your system can have. Default value (in CentOS and most other distros) is 65536. To check how many entries in the conntrack table are occupied at the moment: cat /proc/sys/net/ipv4/netfilter/ip_conntrack_count Or you can dump whole table : cat /proc/net/ip_conntrack Conntrack table is hash table (hash map) of fixed size (8192 entries by default), which is used for primary lookup. When the slot in the table is found it points to list of conntrack structures, so secondary lookup is done using list traversal. 65536/8192 gives 8 – the average list length. You may want to experiment with this value on heavily loaded systems. Modifying conntrack capacity To see the current conntrack capacity...
报错ip_conntrack version 2.4 (8192 buckets, 65536 max) - 304 bytes per conntrack     大家都知道linux的iptables防火墙使用了ip_conntrack 内核模块实现连接跟踪功能,所有的进出数据包都会记录在连接跟踪表中,包括tcp,udp,icmp等,一旦连接跟踪表被填满以后,就会发生丢包,导致网络不稳定。 在大多数系统中,缺省的连接跟踪表大小是65536,可以通过下面2条命令查看缺省大小,sysctl  net.ipv4.netfilter.ip_conntrack_maxcat  /proc/sys/net/ipv4/netfilter/ip_conntrack_max 当需要扩大连接跟踪表时,首先需要先加载ip_conntrack 模块,再通过以下接口进行调整,例如:modprobe  ip_conntracksysctl  -w net.ipv4.netfilter.ip_conntrack_max = 655360(放大10倍)。 其实,ip_conntrack 模块支持一个隐含的模块参数hashsize(隐含参数意味着通过modinfo ip_conntrack查看时没有给出的模块参数),连接跟踪表其实是一张hash表,每个hash bucket(桶)有8条记录,因此65536条记录对应8192个has...
Raw Devices on Oracle Linux and Red Hat Enterprise LinuxVerify that an appropriate raw devices utility (util-linux) rpm is installed for the update of the operating systems. For example, on Oracle Linux 4 and Red Hat Enterprise Linux 4 (update 5), util-linux-2.12a-16.EL4.23.x86_64 or later rpm should be installed. On Oracle Linux 5 and Red Hat Enterprise Linux 5, util-linux-2.13-0.44.EL5.x86_64 or later rpm should be installed.When you restart an Oracle Linux 4, Oracle Linux 5, Red Hat Enterprise Linux 4, or Red Hat Enterprise Linux 5 system, raw devices revert to their original owners and permissions by default. If you are using raw devices with this operating system for your Oracle files, for example, for ASM storage or Oracle Clusterware files, you need to override this default behavior. To do this, add an entry to the /etc/rc.d/rc.local file for each raw device containing the chmod and chown commands required to reset them to the required values.As an example, here are sample ent...
 
0
概述在zabbix里面,我们不需要使用大数字来,例如我们可以不使用86400来表示一天,这个数字又不容易理解也容易出错。用什么办法来解决大数字问题呢?我们可以使用单位来简化,例如简化zabbix触发器表达式或者item key。所以,我们可以使用1d来渠道86400,‘d’就是单位后缀,表示天。时间单位后缀* s - 秒(一般来说来说不写s,就表示s了)* m - 分* h - 小时* d - 天* w - 周时间单位后缀支持如下使用场景:* 触发器表达式* zabbix internal item参数,如 zabbix[queue,<from>,<to>]* last parameter of aggregate checks单位符号Zabbix server和zabbix后台都支持使用这些单位显示,触发器表达式也可以使用这些单位。K - kiloM - megaG - gigaT - tera 如果item值的单位不是B、Bps,那么1000为基数,1000将会别显示成1k,2000显示为2k。如果单位是B或者Bps,那么基数就是1024了,item值为1024将会被展示成1k。所以在单位上面,大家一定要切记。例如流量别忘记单位改为B,访问量/次数不填写单位除了以上单位,zabbix还支持如下单位(单位很大,基本很少用到)P - petaE - exaZ - zettaY - yotta使用例子在编写触发器表达式中使用这些单位会显得好理解并且更好...
具体如何安装zabbix与orabbix ,这里就不再说了。下面要监控的是gps_index与gps_data表空间文件大小。首先修改好 #  vi  /opt/orabbix/conf/query.props分别加入以下内容。注意加入 QueryList 中的 内容,分行时,要加\      gps_index,gps_data单独一行加入以上内容,如下图:最后需要添加 查询内容:gps_index.Query=select bytes from dba_data_files where tablespace_name = 'GPS_INDEX'gps_data.Query=select bytes from dba_data_files where tablespace_name = 'GPS_DATA'完成后,保存。最后重启orabbix服务。下一步就要到zabbix中,添加监控项与图表。如下图所示,按此方法添加 gps_index与gps_data的监控项。最后添加图表,命名为GPS,如下图所示:最后测试数据是否正常。
Orabbix无法获取Oracle DB Size和DB Files Size的解决方法这几天在研究Orabbix时发现在Zabbix中无法获取DB Size和DB Files Size的大小,,后来发现问题出在/opt/orabbix/conf/query.props文件的配置上:因为最新的Orabbix 1.2.3版本在解压安装后,默认的query.props文件内没有配置这两个选项的检测,所以需要手动加上,分别在此文件中两个地方加入配置,具体如下:1. 在“QueryList=”的最后加上“,dbfilesize,dbsize”,注意要用逗号格开;2. 另外加上,dbfilesize,dbsize的检测语句,如下:dbfilesize.Query=select to_char(sum(bytes/1024/1024), 'FM99999999999999990') retvalue from dba_data_filesdbsize.Query=SELECT to_char(sum(  NVL(a.bytes/1024/1024/10 - NVL(f.bytes/1024/1024, 0), 0)), 'FM99999999999999990') retvalue \FROM sys.dba_tablespaces d, \(select tablespace_name, sum(bytes) bytes from dba_data_files group by tablespace_name) a, \(select tablespace_name, sum(bytes) bytes from dba_free_space group by tablespace_name) f \WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+) \AN...
Orabbix 是一个用来监控 Oracle 数据库实例的 Zabbix 插件。下载地址:http://www.smartmarmot.com/product/orabbix/download/  Orabbix插件的安装与配置 确保安装jdk环境,java version查看,没有则通过yum来安装JAVA:yum install java  1.在/opt目录下新建一个orabbix目录: [root@oracle orabbix]#midir -p /opt/orabbix(建议在此目录下,如果放置其他目录稍后需要更改orabbix的启动文件orabbix,启动文件默认写在opt/orabbix目录下 )  2. 解压安装文件[root@oracle orabbix]#unzip orabbix-1.2.3.zip 3.赋予权限 [root@oracle orabbix]# chmod -R a+x orabbix/ 4 通过/opt/orabbix/conf/config.props.sample文件创建一个config.props文件:  [root@oracle orabbix]#cp/opt/orabbix/conf/config.props.sample /opt/orabbix/conf/config.props  5.  编辑orabbix配置文件,具体如下 [root@oracle orabbix]#vi confi/config.props #comma separed list of Zabbix servers#ZabbixServerList=ZabbixServer1,ZabbixServer2ZabbixServ...
背景:     A公司集成两台WebSphere Application Server群集和一台Oracle DB作为项目架构 拓扑:     DB为后台Oracle服务器,Web1与Web2做WebSphere Application Server的IBM HTTP Server群集,Proxy为代理服务器,通过虚拟机IP让终端访问群集。 硬件与软件要求: 1.登陆至操作系统     作为root用户登录,您无法以非root用户标识正确安装产品;     选择允许所有者读写文件并允许其他人根据主要系统策略访问这些文件的umask。建议选择umask022 (chmod -R * 755 filename) 2.浏览器支持     下载并安装Mozilla Web浏览器(V1.4或V1.75或更高版本)     如果您没有Mozilla 浏览器,从http://www.mozilla.org/releases 下载并安装浏览器。 3.导出受支持浏览器位置     例如Mozilla软件包位于...
 
0
Zabbix 通过pyora监控oracle1.oracle客户端的安装从oracle官方网站上下载客户端,devel和sqlplus程序或者从以下网址下载 http://pan.uu456.com/s/1mgx8Fsk以root用户安装rpm –ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpmrpm –ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpmrpm –ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpmvim /root/.bashrc 添加export ORACLE_HOME=/usr/lib/oracle/11.2/client64export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/libexport TNS_ADMIN=/usr/lib/oracle/11.2/client64/network/adminexport PATH=$PATH:$ORACLE_HOME/bin设置好环境变量之后执行source /root/.bashrc创建文件 /etc/ld.so.conf.d/oracle.conf添加/usr/lib/oracle/11.2/client64/lib执行命令 ldconfig创建连接文件在ORACLE_HOME目录下创建以下目录network/admin,并创建文件tnsnames.ora,内容如下:vim /usr/lib/oracle/11.2/client64/network/admin/tnsnames.oraorcl =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.10)(PORT = 1521)) )(CONNECT_DATA =(SERVICE_NAME = orcl)))...
    总共268页,当前第132页 | 页数:
  1. 122
  2. 123
  3. 124
  4. 125
  5. 126
  6. 127
  7. 128
  8. 129
  9. 130
  10. 131
  11. 132
  12. 133
  13. 134
  14. 135
  15. 136
  16. 137
  17. 138
  18. 139
  19. 140
  20. 141
  21. 142