cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an application under VCs

mokkan
Level 6
Certified

Hi,

If I need to create a script and need to run under VCS.  Do I need to follow any format? Or can I create the resource under application and just run  it  like below? Or do I need to follow VCS framework?

 

 

Here is the sample main.cf

 

Application   App_Testing (
         StartProgram = "/etc/VRTSvcs/app_online"
         StopProgram = "/etc/VRTSvcs/app_offline"

 

Here are the script.       

cat /etc/VRTSvcs/app_online

#!/bin/bash

#Start daemon
/opt/app/script/appscript start


cat /etc/VRTSvcs/app_offline
#!/bin/bash

#Start daemon
/opt/app/script/appscript stop

4 ACCEPTED SOLUTIONS

Accepted Solutions

mikebounds
Level 6
Partner Accredited

You also must use at least one of the following attributes:
MonitorProgram
MonitorProccesses
PIDFiles

If you application doesn't have any processes, then you can just create and remove a file in StartProgram and StopProgram and check file exists in MonitorProgram

Exit values for StartProgram and StopProgram should be 0 and:

MonitorProgram can return the following VCSAgResState values:
OFFLINE value is 100 or 1; ONLINE values range from 101 to 110 or
0 (depending on the confidence level); 110 equals confidence level of
100%. Any other value = UNKNOWN.
 
Mike

View solution in original post

Gaurav_S
Moderator
Moderator
   VIP    Certified

You can look at using Process Agent as well

https://sort.symantec.com/public/documents/sfha/6.1/solaris/productguides/html/vcs_bundled_agents/ch05s05.htm

You can look at entry points for process agent here

https://sort.symantec.com/public/documents/sfha/6.1/solaris/productguides/html/vcs_bundled_agents/ch05s05s04.htm

 

G

View solution in original post

Setu_Gupta
Level 3
Accredited

Also, please check that the start and stop scripts return after starting/stopping the application. If that is not done, then the online and offline operations of the application resource will timeout.

And as mentioned by Mike, specify atleast one of the 3 monitoring attributes: MonitorProgram, MonitorProcesses or PidFiles, depending on what is convenient for your application.

View solution in original post

Marianne
Level 6
Partner    VIP    Accredited Certified

Process Agent may be a better choice for your requirement.

Please locate the Documentation for your OS and SF/HA combination on https://sort.symantec.com/documents and download the Bundled Agent Guide for detailed config info for Process and Application agents.

View solution in original post

6 REPLIES 6

mikebounds
Level 6
Partner Accredited

You also must use at least one of the following attributes:
MonitorProgram
MonitorProccesses
PIDFiles

If you application doesn't have any processes, then you can just create and remove a file in StartProgram and StopProgram and check file exists in MonitorProgram

Exit values for StartProgram and StopProgram should be 0 and:

MonitorProgram can return the following VCSAgResState values:
OFFLINE value is 100 or 1; ONLINE values range from 101 to 110 or
0 (depending on the confidence level); 110 equals confidence level of
100%. Any other value = UNKNOWN.
 
Mike

Gaurav_S
Moderator
Moderator
   VIP    Certified

You can look at using Process Agent as well

https://sort.symantec.com/public/documents/sfha/6.1/solaris/productguides/html/vcs_bundled_agents/ch05s05.htm

You can look at entry points for process agent here

https://sort.symantec.com/public/documents/sfha/6.1/solaris/productguides/html/vcs_bundled_agents/ch05s05s04.htm

 

G

Setu_Gupta
Level 3
Accredited

Also, please check that the start and stop scripts return after starting/stopping the application. If that is not done, then the online and offline operations of the application resource will timeout.

And as mentioned by Mike, specify atleast one of the 3 monitoring attributes: MonitorProgram, MonitorProcesses or PidFiles, depending on what is convenient for your application.

Marianne
Level 6
Partner    VIP    Accredited Certified

Process Agent may be a better choice for your requirement.

Please locate the Documentation for your OS and SF/HA combination on https://sort.symantec.com/documents and download the Bundled Agent Guide for detailed config info for Process and Application agents.

mokkan
Level 6
Certified

Thank you guys.  I  looked at the guide and still have some questions.

 I just want to run the script and I don't want to monitor it. Is there a way to do without selecting application as type?

For an example, I want run few simple scripts using VCS, but I don't want to do like startProgram or stopProgram or monitor.

LIke trigger or some thing ...

 

 

mikebounds
Level 6
Partner Accredited

You can use triggers - see VCS admin section "VCS event triggers" for a list of triggers and how to use them.

Mike