1.注意,logstash版本必须要求1.5
2.编辑mail.conf
input{
stdin{
}
}
output{
email{
body=>"%{message}"发送内容
from=>"xxxxx@sina.com"发送邮箱
contenttype=>"text/plain;charset=UTF-8"
options=>[
"smtpIporHost","smtp.sina.com",
"userName","xxxxxx",这..
分类:
其他好文 时间:
2016-04-08 20:14:04
阅读次数:
233
配置文件内容:input{
stdin{
}
}
output{
email{
port=>"25"
address=>"smtp.qq.com"
username=>"1820034099@qq.com"
password=>"*********"
authentication=>"plain"
use_tls=>false
from=>"1820034099@qq.com"
subject=>"Warning:youhaveanerror!"
..
分类:
其他好文 时间:
2016-04-07 18:48:02
阅读次数:
588
导入MySQLdb模块的时候报错,如下>>>importMySQLdbTraceback(mostrecentcalllast):File"<stdin>",line1,in<module>ImportError:NomodulenamedMySQLdb在网上找了一个解决方法:yuminstallMySQL-python(centos系统)再次导入的时候还是报错,怀疑是版本问..
分类:
数据库 时间:
2016-04-06 19:02:23
阅读次数:
4078
shell脚本查看Linux所支持的shell#cat/etc/shells/bin/sh/bin/bash/sbin/nologin/usr/bin/sh/usr/bin/bash/usr/sbin/nologin/bin/tcsh/bin/csh输入/输出设备文件 /dev/stdin 标准输入设备 0 /dev/stdout 标准输出设备 1 /dev/stderr 标准错误输出设备 2 重定向 输出重定向..
分类:
系统相关 时间:
2016-04-05 20:04:24
阅读次数:
220
input_manager.h #ifndef _INPUT_MANAGER_H #define _INPUT_MANAGER_H #include #define INPUT_TYPE_STDIN 0 #define INPUT_TYPE_TOUCHSCREEN 1 #define INPUT_V... ...
分类:
其他好文 时间:
2016-04-03 14:28:04
阅读次数:
268
sed命令行格式为: sed [-nefri] ‘command’ 输入文本/文件 常用选项: -n∶取消默认的输出,使用安静(silent)模式。在一般 sed 的用法中,所有来自 STDIN的资料一般都会被列出到屏幕上。但如果加上 -n 参数后,则只有经过sed 特殊处理的那一行(或者动作)才会 ...
分类:
系统相关 时间:
2016-03-31 20:23:14
阅读次数:
253
#!/bin/bash
##自动创建用户并创建密码
groupaddstduent
foriin`seq-w010`
do
useradd-Gstduentstduent$i-s/sbin/nologin
echo"stduent$i|passwdstduent$i--stdin"
done#!/bin/bash
###自动删除用户名和家目录
groupdeluser
foriin`seq-w020`;do
userdel-ruser_$i
doneseq-w#数..
分类:
其他好文 时间:
2016-03-28 07:12:52
阅读次数:
180
文件描述符是与文件输入、输出相关联的整数。它用来跟踪已经打开的文件。最常见的文件描述符是stdin、stdout、stderr。我们甚至可以将某个文件描述的内容重定向到另一个文件描述符中。文件描述符0,1,2是系统预留的: 0 stdin(标准输入) 1 stdout(标准输出) 2 stderr(
分类:
系统相关 时间:
2016-03-22 21:57:33
阅读次数:
244
Python2.6.6(r266:84292,Jul232015,15:22:56)[GCC4.4.720120313(RedHat4.4.7-11)]onlinux2Type"help","copyright","credits"or"license"formoreinformation.>>>printord(‘A‘)65>>>...>>>a={"a":"1","b","2"}File"<stdin>",line1a={"a":"1","b..
分类:
编程语言 时间:
2016-03-22 01:02:18
阅读次数:
419
这篇博客就介绍介绍常见的、人们钟爱的python中的标准库。sys
从字面上也能看出来,是system的缩写。这个模块能够访问与python解析器紧密联系的变量和函数。argv 命令行参数
exit 退出当前程序
modules 映射模块名到载入模块的字典
path 目录
platform 平台标识符
stdin 标准输入
stdout 标准输出
stderr...
分类:
编程语言 时间:
2016-03-22 00:50:14
阅读次数:
163