syslog

NFS服务+Rsyslog服务配置实践

末鹿安然 提交于 2019-12-03 20:59:04
NFS服务 概述 NFS:Network File System(网络文件系统),是一种基于TCP/IP传输的网络文件系统协议,最早由SUN公司研发。目前使用的NFS 4.X版本 通过使用 RPC(远程过程调用 Remote Procedure Call)实现远程到本地的映射,NFS服务启动后开启随机端口并将这些端口向RPC进行注册,RPC监听111端口 ,客户端的请求访问111号端口获取NFC真实端口,然后建立连接传输数据 NFS没有用户的认证机制,且文件的传输都是基于明文的方式,所以安全性很差。通常只在局域网内使用,NFS基于IP来进行认证,需要辅助的守护进程nfsd来进行 传输过程 服务端启动RPC服务,监听111端口 服务端启动NFS,并将监听的随机端口向RPC进行注册 客户端启动RCP服务向服务端的RPC111端口发送请求获取服务端NFS的端口 服务端RPC收到请求后返回NFS注册的端口 客户端通过获取的NFS端口与服务端NFS服务建立连接通信 相关软件包 RPC主程序rpcbind:提供nfs的端口映射功能,监听111端口,进程名为portmapper,通过rpcinfo命令查看端口映射 NFS主程序:nfs-utils,提供 rpc.nfsd 及 rpc.mountd这两个守护进程 主要进程 mountd:是nfs服务的认证服务的守护进程

How to setup SysLogHandler with Django 1.3 logging dictionary configuration

时光总嘲笑我的痴心妄想 提交于 2019-12-03 16:30:03
问题 I'm having no luck finding any information on setting up syslog logging with Django 1.3 dictionary configuration. The Django documents don't cover syslog and the python documentation is less than clear and doesn’t cover dictionary config at all. I've started with the following but I'm stuck on how to configure the SysLogHandler. LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'formatters': { 'verbose': { 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %

Is there a robust java.util.logging handler implementation of syslog?

心已入冬 提交于 2019-12-03 15:30:10
I'm looking into hooking up a 3rd party Java application to our log aggregation/analysis solution (probably Splunk, we haven't finalized our selection yet though). It seems to be easiest to hook the Splunk agent to syslog, so I'm looking for a way to redirect the application logs to a local syslog daemon on the server. The Java application uses java.util.logging, which unfortunately does not feature a syslog handler out of the box (I believe log4j does, though). Are there any proven libraries to do this? The log load isn't huge (probably 10-20 messages per minute from each process, up to 6

centos 安装ELK

☆樱花仙子☆ 提交于 2019-12-03 14:42:17
准备安装环境 由于本人的centos是通过虚拟机来进行安装的,为了本地电脑能够访问centos系统中的端口,则需要把防火墙进行关闭,通过以下方式进行关闭防火墙。 # vi /etc/sysconfig/selinux 改变SELINUX的值从enforcing 到disabled, 找到SELINUX改变它的值为disabled,SELINUX=disabled,修改完成进行保存。 保存完之后输入reboot命令进行重启。 接着查看防火墙是否被关闭 [root@localhost ~]# /usr/sbin/sestatus SELinux status: disabled [root@localhost ~]# getenforce Disabled 安装Java Jdk Elasticsearch 要求安装的版本是1.8的版本,下面我们是安装1.8的方式,通过Oracle网站下载Oracle jdk1.8. [root@localhost ~]# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http:%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "https://download.oracle.com

How can I change localhost.localdomain in the messages written by Log4j to the Linux syslog

假装没事ソ 提交于 2019-12-03 09:54:24
I'm writing messages to the Linux syslog using Log4j and its SyslogAppender. The outputted messages look like this: Oct 12 09:06:03 localhost.localdomain 3364 [Thread-5] INFO TEST MESSAGE MyApplicationLogger - This is my message I would like to replace localhost.localdomain with the name of the server running the application but can't seem to figure out how. Here's my configuration file, in case it's useful: log4j.logger.MyApplicationLogger=INFO, SyslogAppender log4j.appender.SyslogAppender=org.apache.log4j.net.SyslogAppender log4j.appender.SyslogAppender.syslogHost=localhost log4j.appender

Log4net: SysLog Appender Example

主宰稳场 提交于 2019-12-03 07:06:08
问题 I am looking for example configuration on how to get Log4net logging to a Syslog server. Any help would be welcome. 回答1: I didn't find Simon Whittemore's entry very helpful, this is what got my appender producing "proper" syslog remote messages: <appender name="RemoteSyslogAppender" type="log4net.Appender.RemoteSyslogAppender"> <identity value="HepeManok" /> <layout type="log4net.Layout.PatternLayout" value="%-5p %type: %m%n"/> <remoteAddress value="syslog.lameserver.net" /> </appender> The

Can syslog Performance Be Improved?

删除回忆录丶 提交于 2019-12-03 03:21:13
问题 We have an application on Linux that used the syslog mechanism. After a week spent trying to figure out why this application was running slower than expected, we discovered that if we eliminated syslog, and just wrote directly to a log file, performance improved dramatically. I understand why syslog is slower than direct file writes. But I was wondering: Are there ways to configure syslog to optimize its performance? 回答1: You can configure syslogd (and rsyslog at least) not to sync the log

syslog_r for Linux?

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Folks, I can't find the re-entrant version of syslog() for Linux...is there one? And if no, what do you? The obvious answer is to move logging facility into separate thread and serialise access to syslog... 回答1: According to the POSIX specification , the syslog function is already thread-safe, and so implemented in Linux. So syslog_r is unnecessary - use syslog if you need a reentrant logger function. 文章来源: syslog_r for Linux?

Redirect C++ std::clog to syslog on Unix

只谈情不闲聊 提交于 2019-12-03 02:04:45
问题 I work on Unix on a C++ program that send messages to syslog. The current code uses the syslog system call that works like printf. Now I would prefer to use a stream for that purpose instead, typically the built-in std::clog . But clog merely redirect output to stderr, not to syslog and that is useless for me as I also use stderr and stdout for other purposes. I've seen in another answer that it's quite easy to redirect it to a file using rdbuf() but I see no way to apply that method to call

在CentOS 7.2上使用rsyslog配置syslog server

匿名 (未验证) 提交于 2019-12-03 00:43:02
--=========准备======== 1.firewall状态检查 firewall-cmd --state 2.停止和禁用 systemctl stop firewalld.service systemctl disable firewalld.service 3.检查服务 systemctl status firewalld.service 4.检查iptables systemctl status iptables.service systemctl stop iptables.service --==========配置========= 1.打开配置文件 vim /etc/rsyslog.conf 2.启用rsyslog从UDP 514端口接收日志 $ModLoad imudp $UDPServerRun 514 3.启用rsyslog从TCP 514端口接收日志 $ModLoad imtcp $InputTCPServerRun 514 4.创建一个日志接收模板 在GLOBAL DIRECTIVES块前,加入 $template RemoteLogs,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log" * *.*? ?RemoteLogs 备注: The "& ~" sign represents a redirect rule,