Operating System - HP-UX
1825003 Members
2716 Online
109678 Solutions
New Discussion юеВ

Re: cant get messages with syslog-ng

 
SOLVED
Go to solution
Kenan Erdey
Honored Contributor

cant get messages with syslog-ng

hi;

i want to send syslog messages from hp-ux machines to a syslog-ng daemaon running in a linux machine(suse).

i wrote *.* [TAB]|@logserver in syslog conf file.

in syslog-ng.conf in logserver

source s_all {
# message generated by Syslog-NG
internal();
# standard Linux log source (this is the default place for the syslog()
# function to send logs to)
unix-stream("/dev/log");
# messages from the kernel
file("/proc/kmsg" log_prefix("kernel: "));
# use the above line if you want to receive remote UDP logging messages
# (this is equivalent to the "-r" syslogd flag)
udp(ip (0.0.0.0) port(514));
};

destination d_mysql {
pipe("/var/log/mysql.pipe"
template("INSERT INTO logs
(host, facility, priority, level, tag, datetime, program, msg)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC',
'$PROGRAM', '$MSG' );\n") template-escape(yes));
};


log {
source(s_all);
destination(d_mysql);
};

messages coming from clients are logged in mysql. but i can't get from hp-ux machines, linux and bsd machines are ok. what is the problem.

thanks.
Computers have lots of memory but no imagination
6 REPLIES 6
Peter Godron
Honored Contributor

Re: cant get messages with syslog-ng

Mustafa Gulercan
Respected Contributor

Re: cant get messages with syslog-ng

hi kenan;

could you post your client's syslog.conf under /etc.


regards;
mustafa
Ivan Krastev
Honored Contributor

Re: cant get messages with syslog-ng

Check for connection between HP-UX and syslog server on port 514 (udp). Also after changes in syslog on HP-UX don't forget to reload daemon.

regards,
ivan
Kenan Erdey
Honored Contributor

Re: cant get messages with syslog-ng

hi;

mustafa in syslog.conf file in client

i wrote *.* [TAB]|@logserver in syslog conf file.
Computers have lots of memory but no imagination
Mustafa Gulercan
Respected Contributor
Solution

Re: cant get messages with syslog-ng

sorry i didn't realize that.

pls try
*.debug [TAB]@logserver on the syslog.conf
and restart the syslogd with;
/sbin/init.d/syslogd stop
/sbin/init.d/syslogd start

but note that after syslogd retarted, syslog.log moved to OLDsyslog file and you lost ex OLDsyslog file.

regards;
mustafa
Kenan Erdey
Honored Contributor

Re: cant get messages with syslog-ng

thanks mustafa. it succeeded.
Computers have lots of memory but no imagination