cancel
Showing results for 
Search instead for 
Did you mean: 

Veritas cluster query on windows

YOP
Level 3

Hello,

I am fresh with Veritas cluster and need to find a way to query a machine and find out whether it is active in the cluster.

Is it by SNMP? some CLI command?

Would appreciate a specific solution...

 

Thanks in advance

 

Yaniv

1 ACCEPTED SOLUTION

Accepted Solutions

joseph_dangelo
Level 6
Employee Accredited

Yaniv,

The easiest way to determine if a host is active in a cluster is to run the following command:

#> hasys -state

That being said, this will only tell you whether the HAD service is running and what nodes are "seeded."  If you are more interested in the status of service groups, you will want to run the follwing command:

#> hastatus -sum

or

#> hastatus

These commands are platform agnostic.

Hope this helps,

Joe D

View solution in original post

13 REPLIES 13

joseph_dangelo
Level 6
Employee Accredited

Yaniv,

The easiest way to determine if a host is active in a cluster is to run the following command:

#> hasys -state

That being said, this will only tell you whether the HAD service is running and what nodes are "seeded."  If you are more interested in the status of service groups, you will want to run the follwing command:

#> hastatus -sum

or

#> hastatus

These commands are platform agnostic.

Hope this helps,

Joe D

YOP
Level 3

Joe, that seems to be what I needed - thanks for your quick response.

Just one more thing - is there a way to retrieve this data remotely? (SNMP? SOAP?)

 

Thanks

 

Yaniv

joseph_dangelo
Level 6
Employee Accredited

Yaniv,

The SNMP trap option is designed more for notifications rather than execution. There a multiple severity levels that will trigger when a notification is to be sent. If It were set to "information" that will send any and all cluster event log info which would include leaving and joining the cluster.  However, this would not be something you would necessarily launch yourself.

In terms of SOAP support, I was led to believe that was EOL'd from Microsoft in favor of .NET, either way though I am not all that familiar with the implementing this feature.

One other option is the MOM integration with VCS. Please take a look at the following document. https://sort.symantec.com/public/documents/sfha/5.1sp2/windows/productguides/pdf/SFW_VCS_MOM_2005_51...

Starting on page 33, you can review what information is available via the MOM Pack for VCS.

Lastly,  Storage Foundation and VCS are both available to managed from the Veritas Operations Manager Console (VOM).  This is a free tool that can manage and report the status on VCS clusters irrespective of the OS platform.  This may be your best option if you are trying to avoid logging directly into a cluster to determine its status.

Hope this helps,

Joe D

Wally_Heim
Level 6
Employee

Hi Yaniv,

In addition to what Joe mentioned, since this is windows you can always perform a registry check for the following registry key and value:

HKLM\SOFTWARE\VERITAS\VCS\Base\ClusterNodeMode

If ClusterNodeMode is set to 2 then the node is configured in a cluster.  If the value is not a 2 then it is not configured in a cluster.

You can also query other keys in that same location to get more details about the cluster if it is in one.

Thanks,

Wally

YOP
Level 3

Joe, Wally,

thanks for helping out.

 

From what i've checked so far:

Regaistry - does not contain the information I need (machine's ONLINE\OFFLINE mode).

SNMP - also, does not contain this info, only several traps.

SOAP - not relevant (?)

VOM - I tried installing (for some reason, found only the RU1 installation file, i'm not sure what this is). I still didn't understand if possible to draw my data using this tool and how. At any case, it seems like a heavy solution (also will require user\pass? I need to do everything automatically, hopefully w/o authentications...). I think i'll drop this alternative as well.

i am kind of left with the CLI option ('hastatus -sum') which might be quite enough for our needs. I just need to figure out how to remotely execute it and analyze the output.

I want to thank you again for your detailed explanations.

Yaniv

YOP
Level 3

Hi,

I have a few more questions...

On top of checking the OFFLINE\ONLINE node of a certain group.

how can I check (progamatically - by CLI or WMI, etc.):

1. If a machine is a virtual or a physical one.

2. Whether a certain group is visible on a certain virtual machine (I am using here terminology taken from CPQ cluster, sorry for that blush)

 

Thanks again

 

Yaniv

joseph_dangelo
Level 6
Employee Accredited

Yaniv,

VCS does not differentiate between Physical and Virtual hosts.  The HAD service, as long as the hearbeat connections are available, will function the same whether its a P to P, V to V or P to V cluster. That being said, there are numerous Virtualization technologies that VCS can manage as an application rather than an OS platform. Windows Virtual Servers for example.  In this case, VCS is not installed inside of the guest but rather controls the "Virtual Machine" from the base OS layer.

In terms of group visibility, there are commands that you can run to query the attribute "SystemList" which will indicate which nodes that a particular Service Group can run on.

For example:

hagrp -display servicgroup -attribute SystemList -sys systemname

Hope this helps,

Joe D

YOP
Level 3

Joe,

I think I misled you with my question. I did not mean VM.

What I meant is identifying whether a machine is a logical one (the machine which is always up, also during failovers, and that shows the reflection of the physical machine - which is the actual machine that holds the installations...).

In our case, one 'virtual' machine, 175, displays one of our two physical machines (DBSA or DBSB), depends which is currently active.

Since my role is to monitor all this system, I need to automatically detect if a certain machine is a virtual or a phisical one (I am given an IP address and should check on that machine and decide whether it is a virtual one). Perhaps the term 'virtual' is missleading.

Also, regarding the visibility -

Consider the following setup.

We have two physical machines P1 and P2. Both hold installations of two applications: DBSA and DBSB.

We have two virtual machines V1 and V2 which reftect the status of those applications.

V1 should show only DBSA (it can actually be active on P1 or P2) while DBSB is not visible there.

V2 should show only DBSB (it can actually be active on P1 or P2) while DBSA is not visible there.

So my monitoring tool should decide 3 things:

1. Is a certain machine (IP address) is virtual or physical

2. Is a certain application visible on a certain virtual machine

3. Is an application ONLINE on a certain physical machine

 

I tried the commands you have recommended.

Can you please be a bit more specific - how do I check the virtual & visible issues? (which fields exectly in the output?)

C:\Users\Hercules.DBSA>hagrp -display GSA_SG -sys DBSA
#Group       Attribute             System     Value
GSA_SG       AutoDisabled          DBSA       0
GSA_SG       Enabled               DBSA       1
GSA_SG       PreOnlining           DBSA       0
GSA_SG       Probed                DBSA       1
GSA_SG       ProbesPending         DBSA       0
GSA_SG       State                 DBSA       |OFFLINE|
GSA_SG       UserIntLocal          DBSA       0
GSA_SG       UserStrLocal          DBSA
GSA_SG       VCSi3Info             DBSA

C:\Users\Hercules.DBSA>hagrp -display GSA_SG -sys DBSB
#Group       Attribute             System     Value
GSA_SG       AutoDisabled          DBSB       0
GSA_SG       Enabled               DBSB       1
GSA_SG       PreOnlining           DBSB       0
GSA_SG       Probed                DBSB       1
GSA_SG       ProbesPending         DBSB       0
GSA_SG       State                 DBSB       |ONLINE|
GSA_SG       UserIntLocal          DBSB       0
GSA_SG       UserStrLocal          DBSB
GSA_SG       VCSi3Info             DBSB

 

Thanks
Yaniv

joseph_dangelo
Level 6
Employee Accredited

Yaniv,

Just for clarification of some concepts that are inherent to VCS:

In terms of how Service Groups (Association of Resources) are located within a cluster, it can be active on any one or more nodes at any given time.  That being said,  Service Groups operate at whatever layer VCS is installed in.  I.e. If VCS is installed on the base Windows OS, it will operate at the Physical layer of each host it is configured for in the cluster.  Conversely, if VCS is installed in a Virtual Machine, on ESX for example, it will exist entirely within the boundaries of that VM or any subsequent nodes it is assigned to.  Additionally however, a service group can failover between Physical and Virtual platforms (assuming all pre-reqs are met). Either way, VCS does not differentiate between the two.

In terms of the output you provided,  Service Group GSA_SG is currently active on System DBSB and offline on DBSA.  Therefore VCS has to be installed on the base Windows layer on both Nodes. Please provide the following output:

C:\>hagrp -state GSA_SG

I am not quite clear on what you mean by "certain application visible on certain virtual machine."  There appears to be a discrepancy with what you refer to as the Physical Host and what VCS is identifying as a cluster node. The -sys flag is meant to specify a specific cluster node.

In terms of Virtual Names/Computers and how they exist within AD and Windows, those actions are performed by the LanMan resource and as such when brought online it associates an IP address with a Virtual Name in whatever OU you would assign. 

VCS will only report back the status of an AD Computer Objects that assigned by the LANMAN resource.  That being said,  you mentioned V1 and V2 which I am presuming are Virtual Names/instances for your application. If you have properly configured your LANMAN resource, then whichever node the service group is active will correspond the where the IP address and virtual name are assigned.

I apologize for the long-winded explanation :o)

Joe D

YOP
Level 3

Hi Joe,

I am afraid I fail to explain myself since I wasn't familiar with your application's terminology.

Virtual machines have nothing to do with my need here, it's not what I meant.

I have a monitoring tool which gets IP addresses and should reflect the status of the installed applications on those machines.

How can I know by retrieving IP addresses from a specific segment if the Entity that was found is:

a physical node from the cluster

or

the global cluster IP?

(because, if I find it to be a physical node from the cluster, I present one thing in the monitoring tool GUI and if I find it to be the global cluster IP - I present something else in the GUI).

Sorry for the confusion, I hope I made it more clear now.

If not, how can I reach you over the phone?

Thanks

Yaniv

joseph_dangelo
Level 6
Employee Accredited

Yaniv,

I understand now what you are asking. However, without being familiar with the monitoring application that you are using I cannot say with much degree of certainty what the best course of action for you would be.

Keep in mind that the Physical address of the cluster nodes should not be changing, therefore in that regard you will always know what to expect from your monitoring app.  The Global Cluster IP however can move between hosts as you failover the ClusterService SG.  Are there multiple NIC's being used in this configuration?  My only thought would be to some how associate the IP's to a known MAC address within your monitoring app (if that's even an option). 

Are you more concerned with the uptime of your applications or which physical node is hosting them?  I only ask because if you were only concerned with uptime, then differentiating between physical or virtual shouldn't matter.  If the app is up then the app is up.

Joe D

YOP
Level 3

Hi Joe,

I have found two ways to identify whether the machine is virtual:

a. By programatically checking the network intefaces on the machine

b. By checking in the registry for the values under "HKEY_LOCAL_MACHINE\SOFTWARE\VERITAS\VCS\BundledAgents\IP"

I think address values under this location are of virtual machines.

 

I now need only to understand one more issue - regarding the visibility of a group under a certain virtual machine. Is it possible to have a virtual machine which is set to hide certain groups and display other groups?

If possible, how can I programatically check if a certain group should be visible on a certain machine?

 

Thanks

Yaniv

Wally_Heim
Level 6
Employee

Hi Yaniv,

I'm not sure I fully understand your question regarding group visability.

Fileshares and Printshares can be bound to respond to only a given virtual server name on certian OS versions. But I don't think this is exactly what you are asking about.

The HA commands provided should work regardless of what hostname (physical or virtual) or IP (physical or virtual that you connect to.  They should return the same cluster details including group details for the cluster node that you are connected to.

Thanks,

Wally