- 论坛徽章:
- 0
|
我的配置文件如下,其中的shell脚本可以工作,但是perl的就不行。perl和shell脚本的作用都是一样的,打印一些输出。- [root@James etc]# cat syslog-ng.conf
- @version: 3.0
- #Default configuration file for syslog-ng.
- #
- # For a description of syslog-ng configuration file directives, please read
- # the syslog-ng Administrator’s guide at:
- #
- # http://www.balabit.com/dl/html/syslog-ng-admin-guide_en.html/bk01-toc.html
- #
- options {
- # Number of syslog lines stored in memory before being written to files
- flush_lines (0);
- log_fifo_size (2048);
- create_dirs (yes);
- perm (0640);
- dir_perm (0750);
- };
- source ppp { program("/root/perl/test.pl"); };
- destination ppp {
- file ("/var/log/syslog-ng/$HOST/perl.pl.log" create_dirs(yes));
- };
- log {
- source(ppp);
- destination(ppp);
- };
- source sss { program("/root/shell/test.sh"); };
- destination sss {
- file ("/var/log/syslog-ng/$HOST/test.sh.log" create_dirs(yes));
- };
- log {
- source(sss);
- destination(sss);
- };
复制代码 |
|