Test to see active node in a cluster

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Gerhard
Posts: 26
Joined: Mon Oct 16, 2006 8:25 am

Test to see active node in a cluster

Post by Gerhard »

Dear all,

I was previously working on checking servers in a cluster (ping test) to see if the servers in the cluster are active. I also implemented the advanced actions so that we only receive a warning when more then 1 node in the cluster is down. This thanks to the great respons on my "clustered Ping tests" topic.

Now i want to have an other test to see which node is the active and passive node in the cluster.

I have a 2 node cluster and when deploying security patches i need to know which node is the active one so i can deploy the the passive one first and then switch to the other node and patch the other one.

Regards,

Gerhard
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

I think, you may try to use "Shell Script" test method and cluster.exe command line utility to retrieve necessary information (e.g. cluster.exe NODE [node-name] /status ). On the another hand, you may try "WMI" test method using "MSCluster_Node" class: http://msdn2.microsoft.com/en-us/library/aa371446.aspx

Regards,
Max
fishvict
Posts: 34
Joined: Tue Dec 16, 2003 10:47 am

Post by fishvict »

I use an "Active Script" test. This is run by the RMA, so the 'objCluster.Open' statement is blank (meaning it will be the local cluster)


const statusAlive = "Host is alive:"
const statusDead = "No answer:"
const statusUnknown = "Unknown:"
const statusNotResolved = "Unknown host:"
const statusOk = "Ok:"
const statusBad = "Bad:"
const statusBadContents = "Bad contents:"

FUNCTION PerformTest()
Dim objCluster
Dim strTestname
Set objCluster = CreateObject("MSCluster.Cluster")
objCluster.Open ""
strOwner = objCluster.ResourceGroups.Item("Cluster Group").OwnerNode.Name
Set objCluster = Nothing
PerformTest = statusAlive & strOwner
END FUNCTION

Then, in my action profile, I do "'%Reply%' <> '%LastReply%'" and alert based on that.
fishvict
Posts: 34
Joined: Tue Dec 16, 2003 10:47 am

Post by fishvict »

As a follow up to my last message, I have an RMA assigned to the Cluster Name, so I'm not checking each individual server, just the active node in the cluster.
Post Reply