cancel
Showing results for 
Search instead for 
Did you mean: 

How do I setup application monitoring in VCS?

GeorgeC
Level 4
Hello All, I am very new to VCS and I'm wondering if somebody out there can provide some pointers on how I would go about setting up application monitoring to handle stop/starts/status etc of of application services groups. Here is my situation. I'm running Storage Foundation Cluster File System HA on a two node Solaris 10 cluster The application that I am trying to cluster is syslog-ng The cluster will serve as a HA syslog cluster. I will be setting up service group on each node with a VIP and storage resources. In addition, each SG will have 10 application resources, each of which controls a syslog-ng process. I have been able to setup the service group, with the vip, storage and 1 syslog-ng. However, If the syslog-ng process dies, (I.e I kill it off via kill -9 process-ID) the cluster does not restart it on the node it was running on, but, fails it over instead. For now, I have the cluster monitoring the /var/run/syslog-ng#.pid file. This sort of works for the initial setup/testing but, I need more in depth monitoring in place before I move the cluster into production. So I guess my question is, how do I set up application monitoring. TIA, George
1 ACCEPTED SOLUTION

Accepted Solutions

AHerr
Level 5
Employee Accredited Certified
Hi George,

There are three basic ways to configure an application within VCS.
You could use the process agent, the application agent or write your own custom agent.

1) The Process Agent will manage a single process.  It will run commands needed to start and stop the process as well as ensure that the process is currently running.

2) The Application Agent will run scripts to start/stop/clean your application.  It can use three different options for monitoring; It can monitor a process, you can execute a program to monitor your application or it will watch a pid file.

3) The Custom Agent is something created to manage an individual application.  There are four scripts necessary for a custom agent: start script, stop script, monitor script and the clean script.  They can be written in shell script or in perl.

In reviewing your question there are two things you might be looking for. 
First, if you would like to have the resource attempt to restart on the same system before it begins the failover to another system you should look at the RestartLimit attribute for the Application Agent.  This will have all of the Application Agents restart a number of times in a period of time before giving up and failing over to the next node in the cluster.  One note of caution on this as it affects all instances of the Application Agent.  If you would like unique variables then a Custom Agent is required.

Second, If you are looking for advanced monitoring for your Application Agent, you can write a script to perform certain actions to validate the resource is online.  It would need to be specific to the one instance of the Application Agent to ensure there is a time when it is online and offline.  If you look in the Bundled Agents Reference Guide specific to your version of VCS and OS on sfdoccentral.symantec.com, you will see a section for the Application Agent.  It mentions that if the monitor application should show that the app is offline, then it will exit with a value of 100.  If it is online, then it should exit with a value of 110.

Does this answer your question?

Anthony

View solution in original post

2 REPLIES 2

AHerr
Level 5
Employee Accredited Certified
Hi George,

There are three basic ways to configure an application within VCS.
You could use the process agent, the application agent or write your own custom agent.

1) The Process Agent will manage a single process.  It will run commands needed to start and stop the process as well as ensure that the process is currently running.

2) The Application Agent will run scripts to start/stop/clean your application.  It can use three different options for monitoring; It can monitor a process, you can execute a program to monitor your application or it will watch a pid file.

3) The Custom Agent is something created to manage an individual application.  There are four scripts necessary for a custom agent: start script, stop script, monitor script and the clean script.  They can be written in shell script or in perl.

In reviewing your question there are two things you might be looking for. 
First, if you would like to have the resource attempt to restart on the same system before it begins the failover to another system you should look at the RestartLimit attribute for the Application Agent.  This will have all of the Application Agents restart a number of times in a period of time before giving up and failing over to the next node in the cluster.  One note of caution on this as it affects all instances of the Application Agent.  If you would like unique variables then a Custom Agent is required.

Second, If you are looking for advanced monitoring for your Application Agent, you can write a script to perform certain actions to validate the resource is online.  It would need to be specific to the one instance of the Application Agent to ensure there is a time when it is online and offline.  If you look in the Bundled Agents Reference Guide specific to your version of VCS and OS on sfdoccentral.symantec.com, you will see a section for the Application Agent.  It mentions that if the monitor application should show that the app is offline, then it will exit with a value of 100.  If it is online, then it should exit with a value of 110.

Does this answer your question?

Anthony

GeorgeC
Level 4

Anthony,
    Thanks for the explanation. That clears things up a bit.  You have gotten the gist of what I am trying to do correct.Each syslog-ng instance is unique. The only this that are share are the file system and the vip for each node.
I need to be able to test an instance of syslog-ng to make sure it is online and to try and restart it on the same node if it isn;t.  I will try your suggestions and see how it works out.

Thank you for the explanation.
George