logstash: input:https://www.elastic.co/guide/en/logstash/current/input-plugins.html input { file { path =>"/var/log/messages" type => "system" start_p ...
分类:
数据库 时间:
2017-10-11 19:19:09
阅读次数:
222
#coding=utf-8 import os def join(arr,join_falg): res = "" for a in arr: res += a+join_falg return res def get_file_parats(file): path_arr = file.split... ...
分类:
编程语言 时间:
2017-10-11 00:57:55
阅读次数:
290
puppetfile资源常用的参数:file{
path
ensure
backup
checksum
content
force
group
links
mode
owner
source
selinux_ignore_default
selrange
selrole
seltype
seluser
}path:指定要管理的文件或目录,必须用引号引起来.ensure:有5个值,分别是absent,present,file,directory,l..
分类:
其他好文 时间:
2017-10-10 16:59:51
阅读次数:
194
#!/usr/bin/python # coding:utf8 import os import chardet import sys import traceback import logging # 遍历文件 def get_all_file_path(path, all_file_path):... ...
分类:
编程语言 时间:
2017-10-10 14:48:53
阅读次数:
253
# Redis configuration file example. # # Note that in order to read the configuration file, Redis must be # started with the file path as first argumen... ...
分类:
其他好文 时间:
2017-10-03 21:11:57
阅读次数:
407
博主原创,如需转载请标明出处 首先推荐一款远程SSH工具 MobaXterm backup 1、从官网上下载JDK1.8 下载地址 2、将下载的tar文件上传至linux地址、 3、cd到usr文件夹下 在usr下创建java文件夹 4、将jdk压缩包复制到/usr/java/文件夹下 5、到/us ...
分类:
系统相关 时间:
2017-09-30 17:51:52
阅读次数:
281
input { file { path => ['/gwlog/data/**/*.json'] discover_interval => 1 ignore_older => 5 start_position => "beginning" close_older => 6 max_open_file... ...
分类:
数据库 时间:
2017-09-24 15:24:44
阅读次数:
408
数据库运维人员,在维护数据库时,有时会遇到一些特殊的情况,例如,SQL Server实例无法访问,此时需要用到管理员在紧急情况下专用的连接;有时,在做一些系统级别的配置修改时,当前数据库不能被其他用户访问,必须把数据库切换到单用户模式。居安思危,在系统正常运行时,多做一些演练,避免在真正出现异常时, ...
分类:
其他好文 时间:
2017-09-22 22:45:06
阅读次数:
322
架构如下,logstash-agent---->redis---->logstash-server----->elasticsearch---->kibana需求:想收集多个log文件,例如/var/log/messages,/var/log/logstash/logstash.err两个日志文件;logstashinput和output如何写,input{file{path=>"/var/log/messages"ty..
分类:
其他好文 时间:
2017-09-20 16:37:08
阅读次数:
186
一、读文件 file = open("文件路径名","读写模式") # r :读模式 、w :写模式、a :追加模式 如果文件存在,则打开文件成功,如果文件不存在,则打开错误,会抛出一个IOError错误 file_content = file.read() #读取文件中的数据并以字符串的形式返回到 ...
分类:
编程语言 时间:
2017-09-16 17:17:38
阅读次数:
160