cancel
Showing results for 
Search instead for 
Did you mean: 

Process Agent

KANSTANTSIN
Level 4
Partner

Hi all,

I have configured SQL service group. I need a restart 1C application server after failover accours. For this purpose I will use script. The script will done 1 time after service group become online.

I think process agent can help me.

For test and understand how work proces agent I create easy bat script:

{ echo Hello > File.txt

}

When I do online for agent I see script is done (file File.txt is created) but the agent do not became online.

I think script have to send any variable to VCS that VCS can know started programm is "UP".

Do I correct understand situation and if YES what script must return to VCS?

 

   

1 ACCEPTED SOLUTION

Accepted Solutions

mikebounds
Level 6
Partner Accredited

For what you want to do it sound likes it would be better to use postonline trigger script which involves

Creating postonline batch or perl file in cluster server triggers directory and the script will need an if statement to say only run for the required service group (service group is passed as an argument to postonline script).

To use process agent, you would need to create a lock file, so logic of scripts would be:

StartProgram - Create a lock file and restart 1C application server
MonitorProgram - Check log file exists and exit return code 110 if exists and 100 if it does not
Stop Program - Remove lock file

Mike

View solution in original post

6 REPLIES 6

mikebounds
Level 6
Partner Accredited

For what you want to do it sound likes it would be better to use postonline trigger script which involves

Creating postonline batch or perl file in cluster server triggers directory and the script will need an if statement to say only run for the required service group (service group is passed as an argument to postonline script).

To use process agent, you would need to create a lock file, so logic of scripts would be:

StartProgram - Create a lock file and restart 1C application server
MonitorProgram - Check log file exists and exit return code 110 if exists and 100 if it does not
Stop Program - Remove lock file

Mike

Wally_Heim
Level 6
Employee

Hi Kanstantsin,

I agree with Mike, the PostOnline trigger seems more of what you want to do.

Thank you,

Wally

KANSTANTSIN
Level 4
Partner

Thank you for respond,

I try to use postonline trigger. I added line to postonline.pl file add copy it to C:\Program Files\Veritas\cluster server\bin\Triggers

***

system("C:\script.bat");

***

but me script do not starting.

I saw somewere that in vcs 6.0 and above triggers should be enabled explicitly, I am wrong maybe.

What you can say about it, Do I must enable postonline trigger or it enabled by default?

 

Sunil_Yadav
Level 4
Employee

Hi KANSTANTSIN,

Triggers are disabled by default. TriggersEnabled attribute is used to enable/disable triggers. This attribute is available on Resource level and Service group level too. Postonline is service group level trigger. Thus, you have to enable it on service group level.

Enabling triggers using CLI

# hagrp -modify test_sg TriggersEnabled POSTONLINE 

# hagrp -display test_sg -attribute TriggersEnabled
#Group       Attribute             System                 Value
test_sg      TriggersEnabled       localclus              POSTONLINE

Enabling triggers using main.cf

group test_sg (
	.
	TriggersEnabled = { POSTONLINE }
	.
	)

Thanks & Regards,

Sunil Y

KANSTANTSIN
Level 4
Partner

Thanks all.

P. S. My postonline script didn't work before I changed line from system ("C:\script.bat"); to system("C:\\script.bat");

KANSTANTSIN
Level 4
Partner

Thanks, you very help me.