hi ,all
I test the rsyslog dynamic file generate by follwoing configure
[root@mgt1 xcat]# cat cat /etc/rsyslog.d/xcat-compute.conf
cat: cat: No such file or directory
#:syslogtag,contains,"XXX",/var/log/xcat/gars_%syslogtag%-%$YEAR%.log
$template CUSTOM_LOGS,"/var/log/xcat/%syslogtag:F,58:1%.log"
#$template CUSTOM_LOGS,"/var/log/xcat/%syslogtag%.log"
#$template CUSTOM_LOGS,"/var/log/xcat/%syslogtag:1,-1::%.log"
if $syslogtag startswith 'XXXX' then ?CUSTOM_LOGS
& ~
$template xCATTraditionalFormat9,"%timegenerated% %HOSTNAME% %syslogtag%
%msg:::drop-last-lf%\n"
:fromhost-ip, !isequal, "127.0.0.1"
/var/log/xcat/computes.log;xCATTraditionalFormat9
and I try to restart the rsyslog daemon ,it work fine for me
I test use logger to generate the message
[root@node03 ~]# !141
for b in 1 2 3 4 ;do for a in `seq 1 10`; do logger -p local4.info -t
XXXXXcccc$a "update the message to the remote server";sleep 2; done;done
in server end ,I can see the dynamic file create :
[root@mgt1 xcat]# ll
total 7308
-rw-------. 1 root root 1976647 May 11 14:50 cluster.log
-rw-------. 1 root root 5448666 May 11 14:50 commands.log
-rw------- 1 root root 499 May 12 23:09 computes.log
drwxr-xr-x. 2 root root 6 Jan 4 15:01 rflash
-rw------- 1 root root 608 May 12 23:09 XXXXXcccc10.log
-rw------- 1 root root 450 May 12 23:09 XXXXXcccc1.log
-rw------- 1 root root 450 May 12 23:09 XXXXXcccc2.log
-rw------- 1 root root 600 May 12 23:09 XXXXXcccc3.log
-rw------- 1 root root 600 May 12 23:09 XXXXXcccc4.log
-rw------- 1 root root 600 May 12 23:09 XXXXXcccc5.log
-rw------- 1 root root 600 May 12 23:09 XXXXXcccc6.log
-rw------- 1 root root 600 May 12 23:09 XXXXXcccc7.log
-rw------- 1 root root 600 May 12 23:09 XXXXXcccc8.log
-rw------- 1 root root 600 May 12 23:09 XXXXXcccc9.log
but if I delete one file ,all follow up message related to this file will
be drop
and if I restart the rsyslog daemon ,the log file will generate again when
the new message come ,is this work as design or a bug for it ?
thanks
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.