[syslog-ng] Observation of syslog-ng on HP-UX

Shamim shamim_99 at yahoo.com
Tue Feb 27 09:30:18 CET 2007


Hi,
   
  Thanks for the help. It works now.
   
  My Observation are for HP-UX : 
  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.
  2. While in other OS like, AIX, Linux, Solaris message goes to both the file defined in  syslog.conf and syslog-ng.conf.
  3. So  to captured all message on HP-UX to syslog-ng, I need to stop HP-UX's syslog daemon?
   
   
  Please any further comment on my Observation. Am I correct?
   
  Thanks and Regards
  Shamimuddin
  CSC India
   
   
   
   
   
   
  
olivier rolland <madmax2010fr at yahoo.fr> wrote:
  Hi

You can use logger on HP-UX using priority and Tag option
For exemple logger -p local4.info -t WHATIHAVETOCATCH "My message "
and you create a match filter like
filter f_what {match (WHATIHAVETOCATCH);};
filter f_infolocal { level(info) and facility(local4);};

destination d_what { file(/place/fileyouwant.log);};

log { source(s_sys) ; filter(f_what); filter(infolocal) ; 
destination(d_what);};

Now you catch your regexp and you log messages into the file that you want.

Shamim a écrit :
> Hi
> 
> Please can anyone help me how to log message to syslog-ng manually.
> e.g. in Linux I can log message as # logger "test message" 
> ; and it goes to file defined in 
> syslog-ng.conf(/var/adm/messages),
> 
> However in case of HP-UX it is not working as describe above for 
> Linux. Is there any other method to log message manually in HP-UX?
> Or messages are dropping?
> 
> Please suggest.
> 
> Thanks
> Shamimuddin
> CSC Noida
>
> */olivier rolland /* wrote:
>
> You have to put the log device with the pad_size into your system
> source.
> source s_sys {pipe("/dev/log" pad_size(2048));
> internal(); };
> It's working on my system so you can try.
> You can also add the klog device (/dev/klog) with same options than
> /dev/log.
>
> Shamim a écrit :
> >
> > Hi,
> > I've compile syslog-ng-2.0.2 on HP-UX-11.11, however messages
> are not
> > going to desired destinations as defined in the syslog-ng.conf .
> >
> > my syslog-ng.conf
> > ---------------------------------------------
> > # syslog-ng configuration file.
> > #
> > # This should behave pretty much like the original syslog on
> HP-UX. But
> > # it could be configured a lot smarter.
> > #
> > # See syslog-ng(8) and syslog-ng.conf(8) for more information.
> > #
> > # 20000925 gb at sysfive.com
> > options { sync (0);
> > time_reopen (10);
> > log_fifo_size (1000);
> > long_hostnames (off);
> > use_dns (no);
> > use_fqdn (no);
> > create_dirs (no);
> > keep_hostname (yes);
> > };
> > source s_sys {internal();pipe("/dev/log"); };
> > destination d_cons { file("/dev/console1"); };
> > destination d_mesg { file("/var/adm/syslog/syslog-ng.log"); };
> > destination d_mail { file("/var/adm/syslog/mail-ng.log"); };
> > destination d_mlrt { usertty("root"); };
> > destination d_mlal { usertty("*"); };
> > filter f_filter1 { facility(mail) and level(debug); };
> > filter f_filter2 { (facility(mail) and level(debug)) or
> > level(info); };
> > filter f_filter3 { level(alert); };
> > filter f_filter4 { level(emerg); };
> > log { source(s_sys); destination(d_mail); };
> > log { source(s_sys); destination(d_mesg); };
> > log { source(s_sys); destination(d_cons);destination(d_mlrt); };
> > log { source(s_sys); destination(d_mlal); };
> > #
> > --------------------------------------------
> > Now If I generate message using "logger" utility on system, message
> > should go to "/var/adm/syslog/syslog-ng.log", though they are
> not going...
> > Is there anything wrong with .conf file?
> >
> > What should be the conf file for central server and client on HP-UX?
> >
> >
> > syslog-ng daemon is running like:
> >
> -------------------------------------------------------------------------------
> > syslog-ng service starting.
> > # ps -eaf |grep syslog-ng
> > root 14437 1 0 10:22:30 ? 0:00
> > /opt/soe/local/syslog-ng-2.0.2/sbin/syslog-ng -f /opt/soe/local
> > #
> >
> ------------------------------------------------------------------------------
> >
> > Thanks
> > Shamim

 		
---------------------------------
 What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20070227/9c9321cd/attachment.htm


More information about the syslog-ng mailing list