<DIV>Hi,</DIV> <DIV> </DIV> <DIV>Thanks for the help. It works now.</DIV> <DIV> </DIV> <DIV>My Observation are for HP-UX : </DIV> <DIV>1. If both syslog and syslog-ng daemons are running on the system, then message sent through logger are being captured by syslog daemon only.</DIV> <DIV>2. While in other OS like, AIX, Linux, Solaris message goes to both the file defined in syslog.conf and syslog-ng.conf.</DIV> <DIV>3. So to captured all message on HP-UX to syslog-ng, I need to stop HP-UX's syslog daemon?</DIV> <DIV> </DIV> <DIV> </DIV> <DIV>Please any further comment on my Observation. Am I correct?</DIV> <DIV> </DIV> <DIV>Thanks and Regards</DIV> <DIV>Shamimuddin</DIV> <DIV>CSC India</DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV><BR><B><I>olivier rolland <madmax2010fr@yahoo.fr></I></B> wrote:</DIV> <BLOCKQUOTE
class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi<BR><BR>You can use logger on HP-UX using priority and Tag option<BR>For exemple logger -p local4.info -t WHATIHAVETOCATCH "My message "<BR>and you create a match filter like<BR>filter f_what {match (WHATIHAVETOCATCH);};<BR>filter f_infolocal { level(info) and facility(local4);};<BR><BR>destination d_what { file(/place/fileyouwant.log);};<BR><BR>log { source(s_sys) ; filter(f_what); filter(infolocal) ; <BR>destination(d_what);};<BR><BR>Now you catch your regexp and you log messages into the file that you want.<BR><BR>Shamim a écrit :<BR>> Hi<BR>> <BR>> Please can anyone help me how to log message to syslog-ng manually.<BR>> e.g. in Linux I can log message as # logger "test message" <BR>> <RETURN>; and it goes to file defined in <BR>> syslog-ng.conf(/var/adm/messages),<BR>> <BR>> However in case of HP-UX it is not working as describe above for <BR>> Linux.
Is there any other method to log message manually in HP-UX?<BR>> Or messages are dropping?<BR>> <BR>> Please suggest.<BR>> <BR>> Thanks<BR>> Shamimuddin<BR>> CSC Noida<BR>><BR>> */olivier rolland <MADMAX2010FR@YAHOO.FR>/* wrote:<BR>><BR>> You have to put the log device with the pad_size into your system<BR>> source.<BR>> source s_sys {pipe("/dev/log" pad_size(2048));<BR>> internal(); };<BR>> It's working on my system so you can try.<BR>> You can also add the klog device (/dev/klog) with same options than<BR>> /dev/log.<BR>><BR>> Shamim a écrit :<BR>> ><BR>> > Hi,<BR>> > I've compile syslog-ng-2.0.2 on HP-UX-11.11, however messages<BR>> are not<BR>> > going to desired destinations as defined in the syslog-ng.conf .<BR>> ><BR>> > my syslog-ng.conf<BR>> > ---------------------------------------------<BR>> > # syslog-ng configuration file.<BR>> > #<BR>> > #
This should behave pretty much like the original syslog on<BR>> HP-UX. But<BR>> > # it could be configured a lot smarter.<BR>> > #<BR>> > # See syslog-ng(8) and syslog-ng.conf(8) for more information.<BR>> > #<BR>> > # 20000925 gb@sysfive.com<BR>> > options { sync (0);<BR>> > time_reopen (10);<BR>> > log_fifo_size (1000);<BR>> > long_hostnames (off);<BR>> > use_dns (no);<BR>> > use_fqdn (no);<BR>> > create_dirs (no);<BR>> > keep_hostname (yes);<BR>> > };<BR>> > source s_sys {internal();pipe("/dev/log"); };<BR>> > destination d_cons { file("/dev/console1"); };<BR>> > destination d_mesg { file("/var/adm/syslog/syslog-ng.log"); };<BR>> > destination d_mail { file("/var/adm/syslog/mail-ng.log"); };<BR>> > destination d_mlrt { usertty("root"); };<BR>> > destination d_mlal { usertty("*"); };<BR>> > filter f_filter1 { facility(mail) and level(debug);
};<BR>> > filter f_filter2 { (facility(mail) and level(debug)) or<BR>> > level(info); };<BR>> > filter f_filter3 { level(alert); };<BR>> > filter f_filter4 { level(emerg); };<BR>> > log { source(s_sys); destination(d_mail); };<BR>> > log { source(s_sys); destination(d_mesg); };<BR>> > log { source(s_sys); destination(d_cons);destination(d_mlrt); };<BR>> > log { source(s_sys); destination(d_mlal); };<BR>> > #<BR>> > --------------------------------------------<BR>> > Now If I generate message using "logger" utility on system, message<BR>> > should go to "/var/adm/syslog/syslog-ng.log", though they are<BR>> not going...<BR>> > Is there anything wrong with .conf file?<BR>> ><BR>> > What should be the conf file for central server and client on HP-UX?<BR>> ><BR>> ><BR>> > syslog-ng daemon is running like:<BR>> ><BR>>
-------------------------------------------------------------------------------<BR>> > syslog-ng service starting.<BR>> > # ps -eaf |grep syslog-ng<BR>> > root 14437 1 0 10:22:30 ? 0:00<BR>> > /opt/soe/local/syslog-ng-2.0.2/sbin/syslog-ng -f /opt/soe/local<BR>> > #<BR>> ><BR>> ------------------------------------------------------------------------------<BR>> ><BR>> > Thanks<BR>> > Shamim<BR></BLOCKQUOTE><p> 
                <hr size=1>
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the <a href="http://uk.rd.yahoo.com/mail/uk/taglines/default/championships/quiz/*http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk/">Yahoo! Mail Championship</a>.