搜索""的结果
Log file monitoringOverviewZabbix can be used for centralized monitoring and analysis of log files with/without log rotation support. Notifications can be used to warn users when a log file contains certain strings or string patterns.To monitor a log file you must have: Zabbix agent running on the host log monitoring item set upThe size limit of a monitored log file depends on large file support.ConfigurationVerify agent parametersMake sure that in the agent configuration file: 'Hostname' parameter matches the host name in the frontend Servers in the 'ServerActive' parameter are specified for the processing of active checksItem configurationConfigure a log monitoring item: Specifically for log monitoring items you enter:TypeSelect Zabbix agent (active) here.KeySet either:log[/path/to/file/file_name,<regexp>,<encoding>,<maxlines>,<mode>,<output>,<maxdelay>]orlogrt[/path/to/file/regexp_describing_filename_pattern,<regexp>,<encoding>,<ma...
zabbix agent/3.0Contents1 Zabbix agent protocol1.1 Active agents1.1.1 Items to be monitored exist1.1.2 No active items1.1.3 Host does not exist1.1.4 Host not monitored1.1.5 Meta information updateZabbix agent protocolActive agents Note: Also see the description in the zabbix manualWhen an active agent starts, it connects to the server to ask for any item it should be monitoring:{
"request":"active checks",
"host":"Host name"
}
If host has metadata to send, it is included in this request:{
"host": "Host name",
"host_metadata": "apache|mysql|postfix",
"request": "active checks"
}
If host has non-default listen IP or port set, they are included in this request:{
"host": "Host name",
"ip": "127.0.0.1",
"port": 10055,
"request": "active checks"
}
Items ...
tag@cwtdb2 ~]$ free -g-bash: fork: Cannot allocate memoryThere is also /proc/sys/kernel/pid_max file, which specifies the value at which PIDs wrap around (i.e., the value in this file is one greater than the maximum PID). The default value for this file, 32768, results in the same range of PIDs as on earlier kernels (<=2.4). The value in this file can be set to any value up to 2^22 (PID_MAX_LIMIT, approximately 4 million). Increasing the value will help on large Linux system or clusters to ease process identification and process management. You can easily prevent fork() failures error message with this hack. Display Current Process Identifiers Limit On a Linux Based SystemsType the following command at shell prompt: $ sysctl kernel.pid_max OR $ cat /proc/sys/kernel/pid_max OR $ sysctl kernel.pid_max Sample outputs:kernel.pid_max = 32768Allow for more PIDs on a Linux based systemsup to 222 = 4,194,304Type the following command: # sysctl -w kernel.pid_max=4194303 OR # echo 4194303 ...
Oracle在10g中引入了闪回区(flash recovery area)的概念,用以简化和完善备份,但是闪回区同样需要精心规划和设置,否则一样会遇到问题,从Oracle10gR2开始,Oracle还提供了一个新的视图V$FLASH_RECOVERY_AREA_USAGE,用以监控闪回区空间的耗用情况。本文简要介绍Oracle闪回区的警报和空间维护机制。每次RMAN在闪回区(flash recovery area)创建文件时,会同时更新可删除文件列表。当闪回区存在空间压力时,Oracle会自动从闪回区中删除废弃文件,当没有更多空间可以释放时,Oracle会给出空间压力警报。当空间使用达到100%,数据库将会因为无法归档等原因挂起。闪回区的大小由:db_recovery_file_dest_size 参数指定。路径由: db_recovery_file_dest 参赛指定。 SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ----------------------------...
应用部署到weblogic下(Tomcat下无问题),filter执行时报错: java.lang.IllegalStateException: Cannot resize buffer - 299 bytes have already been written (Servlet 2.3, sec. 5.1)at weblogic.servlet.internal.ServletResponseImpl.setBufferSize(ServletResponseImpl.java:346)at weblogic.servlet.jsp.PageContextImpl.initialize(PageContextImpl.java:74)at weblogic.servlet.jsp.PageContextImpl.<init>(PageContextImpl.java:110)at weblogic.servlet.jsp.JspFactoryImpl.getPageContext(JspFactoryImpl.java:40)at jsp_servlet.__index._jspService(__index.java:65)原因:调用了response.sendRedirect()之后,再调用了filterChain.doFilter(request, response)解决:修改代码,确保 sendRedirect 之后 return 或 doFilter 之前无 sendRedirect。Jetty下,post 1个表单数据时报错: java.lang.IllegalStateException: Form too large210799>200000原因: Jetty对form post data的大小有限制,默认为200000bytes解决: 修改Jetty的默认限制值。1. Jetty: 默认限制为200000bytes(约200KB).修改默认限制值的方法如下:参考:http:/...
Linux时间戳和标准时间的互转在LINUX系统中,有许多场合都使用时间戳的方式表示时间,即从1970年1月1日起至当前的天数或秒数。如/etc/shadow里的密码更改日期和失效日期,还有代理服务器的访问日志对访问时间的记录等等。Unix时间戳(Unix timestamp),或称Unix时间(Unix time)、POSIX时间(POSIX time),是一种时间表示方式,定义为从格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数。Unix时间戳不仅被使用在Unix系统、类Unix系统中(比如Linux系统),也在许多其他操作系统中被广泛采用。php中获取时间戳的方法是:time();Date();Linux中获取时间戳的方法是:date +%sLinux中将时间戳转换为日期: date -d "@<timestamp>" 下面介绍几种时间戳格式和标准时间格式转换的方法:1、分别以标准格式和时间戳来显示当前时间[root@365linux ~]# date 2010年 08月 10日 星期二 03:39:21 CST [root@365linux ~]# date +%s 12813827752、显示指定时间的时间戳[root@365linux ~]# date -d "2010-07-20 10:25:30" +%s 1279592730 3...
下载Nginx到官网下载源码文件,地址:http://nginx.org/en/download.html,选择最新版本。本人下载的地址为:http://nginx.org/download/nginx-1.10.2.tar.gz,可用wget命令下载,也可以在windows系统上下载好再传到linux上。卸载httpd如果系统默认安装了httpd服务,卸载之。不卸载也没关系,这里只是方便默认80端口的处理。yum -y remove httpd解压tar -xzvf nginx-xxxxxx.tar.gz安装编译器和依赖库yum install gcc gcc-c++ zlib-devel pcre-devel openssl-devel openssl-libs openssl -y如果已经安装,就不必了安装前配置cd命令转到解压后的目录下。./configure --prefix=/usr/local/nginx这样安装时系统就会把Nginx安装到/usr/local/nginx目录下。编译make安装make install安装完成,接下来配置环境变量以后就不用使用绝对路径来操作Nginx了:vim /etc/profile.d/http.sh加入以下内容:export PATH=/usr/local/nginx/sbin:$PATH生效配置:source !$启动Nginxnginxnginx -s 后跟stop、reload来关闭和重载nginx,直接运行nginx则启动服务。 如果启动时提示端口被占用,则需要找出被占用的进程,或者更改/usr/local/nginx/conf/nginx.conf文件里的侦听端口。访问Nginx在...
内网Linux服务器巡检报告上传到FTP指定目录,通过smtp邮件发送139邮箱方法。水平有限,供参考,可以使用。具体服务器环境:20台服务器Centos6系统,全部位于防火墙后的内网环境中。其中一台主机A可以上外网。其它主机只能内网访问。具体方案:可上网的主机A,配置好smtp邮件客户端,并配置好vsftp功能。每台主机通过脚本收集巡检报告,然后通过定时任务,使用ftp将报告上传到A主机的ftp目录里面。最后将所有主机的报告打包发送到指定邮箱中。具体配置:A主机,配置vsftp功能,这里就不说了。指定FTP目录为:/home/ftp ,并配置好ftp账号与密码。然后给A主机配置好巡检报告脚本,可以根据自己情况修改检查项目,本例具体内容如下:[root@cw ~] #:vi /home/check/report.shreport_ip=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk 'NR==1 { print $1}'`report_time=`date`report_crond=`/etc/init.d/crond status`report_ntp=`cat /etc/crontab |grep ntpdate`report_cpu=`uptime`report_Mem=`free -g`report_Disk=`df -h`report_phy_disk=`/opt/MegaRAID/storcli/storcli64 /c0 show|grep DRIVE`report_Listen=`netstat -lntup |grep java`r...
ALERT LOGWarning: VKTM detected a time drift.Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.CauseThis problem is due to the Bug 11837095 - "TIME DRIFT DETECTED" APPEARS INTERMITTENTLY IN ALERT LOG"SolutionTime drift" error is a " message which can be ignored, to remove the "Warning: VKTM detected set event 10795 or Apply patch 11837095SQL> alter system set event="10795 trace name context forever, level 2" scope=spfile;
Centos6配置SMTP发送邮件与附件方法注:需要先开通相关的邮件账号的smtp 功能,这样,才可以使用客户端软件发邮件。安装客户端软件。[root@cw ~] #:yum install mailx[root@cw ~] #:wget http://ftp5.gwdg.de/pub/opensuse/repositories/home:/billcavalieri:/QEMU/RedHat_RHEL-6/x86_64/sharutils-4.7-6.3.x86_64.rpm[root@cw ~] #:rpm -ivh sharutils-4.7-6.3.x86_64.rpm配置mail.rc文件,增加smtp账号信息:[root@cw ~] #:vi /etc/mail.rcset sendcharsets=iso-8859-1,utf-8set from=yy@139.comset smtp=smtp.139.com:25set smtp-auth-user=yy@139.comset smtp-auth-password=yyyyyyyset smtp-auth=login具体说明:from: 对方收到邮件时显示的发件人smtp: 指定第三方发送邮件的smtp服务器地址smtp-auth: SMTP的认证方式。默认是LOGIN,也可改为CRAM-MD5或PLAIN方式smtp-auth-user: 第三方发邮件的用户名smtp-auth-password: 用户名对应密码然后测试发邮件与附件,mreport="/home/ftp/report.txt"echo "邮件正文内容" | mailx -v -s "邮件主题" -a $mreport 15871@139.com其中$mreport 是附件文件。
最新评论