Hello: I have configured syslog-ng on solaris 2.7 and can see syslog messages logged into the /var/adm directory when I use the logger command. The perl module which I use in syslogd does not seem to working with syslog-ng the source line in syslog-ng server machine is source local { sun-streams("/dev/log" door("/etc/.syslog_door")); internal(); }; my perl lines are as follows openlog ($ident, 'ndelay', 'user'); syslog ("user.alert", "PingStatus change: Host %s is down\n", $host); Is there anything else I need to do to make this happen? Thanks Ravi
I noticed that the syslog module on default uses udp port 514 when used as below. I am running the syslog-ng deamon on a tcp port 4477 which is why I was not getting the logs. ============== use Sys::Syslog; openlog('Test', 'pid', 'user'); $n=$ARGV[0]; syslog('err', 'Logging a Test Message %d', $n); ============== How do I specify it to use a tcp port to use instead? Thanks Ravi
On Wed, Jul 18, 2001 at 05:11:37PM -0400, Ravi Malghan wrote: % I noticed that the syslog module on default uses udp port 514 when used as below. I am running the syslog-ng deamon % on a tcp port 4477 which is why I was not getting the logs. % % ============== % use Sys::Syslog; % % openlog('Test', 'pid', 'user'); % $n=$ARGV[0]; % syslog('err', 'Logging a Test Message %d', $n); % ============== % % How do I specify it to use a tcp port to use instead? try logging to a local socket instead; Sys::Syslog doesn't support tcp sockets. use Sys::Syslog qw(:DEFAULT setlogsock); setlogsock('unix'); openlog('Test', 'pid', 'user'); syslog('info', 'foo'); closelog(); john -- John Morrissey _o /\ ---- __o RPA Internet _-< \_ / \ ---- < \, jwm@rpa.net __(_)/_(_)________/ \_______(_) /_(_)__
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 18. July 2001 21:11, you wrote: Hi,
Hello: I have configured syslog-ng on solaris 2.7 and can see syslog messages logged into the /var/adm directory when I use the logger command. The perl module which I use in syslogd does not seem to working with syslog-ng the source line in syslog-ng server machine is source local { sun-streams("/dev/log" door("/etc/.syslog_door")); internal(); };
my perl lines are as follows openlog ($ident, 'ndelay', 'user'); syslog ("user.alert", "PingStatus change: Host %s is down\n", $host);
Is there anything else I need to do to make this happen?
Well we had I similar problem here. We found out that the perl module doesn't use streams or the like. It uses udp, so you maybe have to activate a udp() source. Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7VprYoMpjYcJiUzMRAviYAKD3GxX0Ci5qzjh1Mxg3+i6cGnQLdACfdLNB 8EYfnw6jieQ7aqXuG4KXoHQ= =+6WG -----END PGP SIGNATURE-----
participants (3)
-
John Morrissey
-
Ravi Malghan
-
Thomas Vollmer