Shout to Program
Posted: 18 Jan 2010 10:44
Hi guys,
I want to set up shouts to a program, the idea being that the program will then update a database of job failures and overruns, which we can use for automation and trend analysis.
I think i have a good idea of what is required, i will outline the steps i plan to take, please correct if needed!
1) run ctmsys and add a shout destination like the following
Destination = P
Adr = S
Logical Name = myName
Physical Name = /bin/myprogram.sh
note: i assume the only difference between Adr = S and A is the server the physical Name points at, if it's S it's on the ctm server if its A then it will point to the server specified in the node ID/Group, please confirm if this is correct.
2) Add a shout to the job as follows (I don't remember the exact options)
WHEN: NOTOK
Destination: myName
Severity: Urgent
Message: "Jobname: %%JOBNAME RUN: %%RUNCOUNT DESCRIPTION: %%DESCRIPTION STATUS: NOTOK command: %%COMMAND PARM1: %%PARM1 Date:$$ODATE"
Is this kind of message valid? I assume this is how it will work!
What will my program see, i assume it will be eqivelant to
/bin/myprogram.sh <Message> <Urgency>
What happens if the program fails, and returns a non 0 exit code?
Is there any parameter that include the SYSOUT (or the path to the sysout?)location
I want to set up shouts to a program, the idea being that the program will then update a database of job failures and overruns, which we can use for automation and trend analysis.
I think i have a good idea of what is required, i will outline the steps i plan to take, please correct if needed!
1) run ctmsys and add a shout destination like the following
Destination = P
Adr = S
Logical Name = myName
Physical Name = /bin/myprogram.sh
note: i assume the only difference between Adr = S and A is the server the physical Name points at, if it's S it's on the ctm server if its A then it will point to the server specified in the node ID/Group, please confirm if this is correct.
2) Add a shout to the job as follows (I don't remember the exact options)
WHEN: NOTOK
Destination: myName
Severity: Urgent
Message: "Jobname: %%JOBNAME RUN: %%RUNCOUNT DESCRIPTION: %%DESCRIPTION STATUS: NOTOK command: %%COMMAND PARM1: %%PARM1 Date:$$ODATE"
Is this kind of message valid? I assume this is how it will work!
What will my program see, i assume it will be eqivelant to
/bin/myprogram.sh <Message> <Urgency>
What happens if the program fails, and returns a non 0 exit code?
Is there any parameter that include the SYSOUT (or the path to the sysout?)location