rsyslog+logstash+elasticsearch+kibana收集用户登录日志,执行命令
添加如下配置到/etc/bashrc文件末尾up_client_ip=`(who am i|cut -d\( -f2|cut -d\) -f1)`logger -p local5.info -- $up_client_ip,$(whoami),$$export PROMPT_COMMAND='{ msg=$(history 1 | { read x y; echo $y; });logger -p