Welcome to the group and Happy New Year!
If you have local access to the Control-M Agent where the jobs are running then you can look in the folder or directory where the actual job output (which old Control-Mers call sysout) is kept (the default location is $HOME/ctm/sysout - or the equivalent location on other Agents, e.g. Windows). These files are usually automatically deleted after a few days (depending on your system setup and the settings defined by the Control-M guy).
An exception to this is if you define move/copy in the Output Handling option of the individual job definition (check the last tab on the job def for this). Also, the Control-M modules use specific directories for output, e.g. AFT on Windows goes (if left to default) to C:\Program Files\BMC Software\CONTROLM-Agent\Default\CM\AFT\sysout
So just use the standard searches on the folders/directories in these locations.
2 of 2 people found this helpful
Welcome to the Control-M community.
You can also use Control-M Workload Archiving Advanced Search to search all outputs for a specific string.
But for this you need to be licensed for and have installed the Workload Archiving solution.
If you're after an automatic way to scan all outputs of a specific job, you can add to the job definition an on/do statement.
This can tell Control-M to trigger an output scan when the job ends, search for a string, including wild cards but the search is line-by-line based, and if found can perform the DO action you've specified.
many thx for your answers.
At first, I forgot to tell you that I'm searching a solution for end users, which doesn't have access to the Application Servers.
@Mark: Searching the logs directly on the Agents Servers is a good idea, but unfortunately not possible for end users.
@Bentze: I also thought of the Control-M Workload Archiving first. Unfortunately we have not licensed this.
The Output scan via on/do Statement could be a possible automatical solution. I'll speak with the requestor about this.
In summary, it can probably be said that there is no other solution out of the box in the monitoring area ?
hmm, i think it's not possible because in Monitor domain the output are fetch from agent when requested.
from mine experience..
Alternatively, maybe you can share us why user has this request, maybe we can find you some other solution?
Happy New Year..
Looking at your response, looks like you need a solution for the end user, where they do not have to go to output folder and search a string
With out having full understanding of requirements, what you would like to do when string is found, I assume you want to know how many times string has found with out going through all cyclic output files.
I would take below approach
Create a Dummy job, then create action item to search a string, when string found copy output to staging directory\folder and order Dummy job instance
This way operation can see how many times string has found by counting dummy job instances, also they will have a copy of output saved in different folder for future reference.
The only down side to this is it will increase your task count, which can impact your over all cost, if you are on task based license model
Hope this will help..
thx for your ideas. Many helpful Information.
The main question was the following.
An Business Enduser Group has to search Control-M Jobouput for some special kewords.
The Job's in different chains are running cyclic every Day for some hours.
If you have a fast running cyclic, for example every minute, you get many Joboutputs.
The Enduser do not accept to search manually every output. They request a one-shot solution.
So, because we do not have the "Control-M Workload Archiving" under licence, the output scan via on/do with a following Mail, if keyword is found
is best solution for us.
Thx to Bentze for the hint.
Sending the output via email is probably your best alternative in this situation. There are various ways in which you can configure this, let us know if we can help.
2 of 2 people found this helpful
To meet your requirements of allowing user to scan through all outputs of a given job, I can think of using the Control-M automation api to achieve it. To avoid installation of additional development tools, I would suggest using powershell as it's available out of the box on Windows and it's capable of performing REST requests.
You will need to execute the following api in sequence:
- /session/login (to login and obtain token)
- /run/job/<jobId>/output?runNo=<runcount> (to get job output based on jobId and runcount)
- /session/logout (to logout)
JobId is actually <Control-M Name>:<Order ID>. Get the job's output starting from runcount 1 and increment it sequentially until error is returned indicating there's no more output. Scan the output for desired string when each output has been retrieved.
You can even simplify execution of the powershell script by integrating it with EM client. This can done by defining External Programs (File->Options). You can pass Control-M information like Control-M, Order Id etc. to your script. Only information that cannot be obtained from the job is the username & password to login to the EM. You have to prompt for username & password in your script.
Hope this helps.