Operating System - HP-UX
1833059 Members
2629 Online
110049 Solutions
New Discussion

syslog for serviceguard cluster

 
Aaron Bush
Occasional Contributor

syslog for serviceguard cluster

I am setting up a serviceguard cluster of two nodes in an active-active configuration to replace two existing systems.

The existing systems /etc/syslog.conf are setup like this (where HP2 is a central syslog host):

HP1:
local0.info @HP2

HP2:
local0.info /var/adm/syslog/local0.info

(currently this local0.info data is forwarded via a shell script which does a 'tail -f /var/adm/syslog/local0.info | netcat ' on HP2; where printserver only supports one TCP connection so only one box can send data to it)

In the new cluster there will be a package for each, HP1 and HP2. I would like to maintain a central syslog host and have this as a service in the HP2 package. The problem is that I would like to keep the /etc/syslog.conf files identical on each node and make them look like this: "local0.info @HP2". However when the cluster is running both package HP1 and HP2 on the same physical node (failed-over) the local0.info syslog messages will be forwarded to itself and then to itself and then to itself, again and again.

I have thought about doing some /etc/syslog.conf file modifications as part of the package control scripts but would rather not edit system files on the fly like this. Another option is to move the syslog host to a system out of the cluster but this is a function that we need to be highly available.

Does anyone have any suggestions?

Thanks,
-ab
1 REPLY 1
Geoff Wild
Honored Contributor

Re: syslog for serviceguard cluster

I think you are going to have to write some "checking" code in your server that "check" to see which node the other package is running on.

test1 = `cmviewcl |grep packagename |awk '{print $5}'`
if test1=`uname -n`
then

service is....

else

service is....

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.