cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2214
Views
4
Helpful
11
Replies

FTP, Completed Abnormally and Email notifications

Kimberly Platt
Level 1
Level 1

We currently have our email notifications set to email us for when all jobs complete abnormal which works perfectly.  I am having trouble with this one group of jobs that is supposed to run every 2 hours.  It starts with an Put FTP job and sometimes there is a file and sometimes there is not.  A user puts files out there when needed.  When there is no file it a completes abnormally.  There are about 8 jobs out there so we end up getting bombarded with emails and no one will pay attention if we leave it like this.  I know we can change the complete abnormal by having it scan output but then the next job which does a copy kicks off. If there is no file out there that one would then fail and send email and then the delete would fail and so on.  I have tried setting up a file dependency but had issues with the delete because it was saying it was still being used.  I just don't know if someone has had a work around or any ideas on how to make this work for us.  We don't want to get 25 emails a day and file dependency is just not working for this group.  Any ideas?

11 Replies 11

bluehouseinc
Level 1
Level 1

Kim, there are a few ways to handle this but can you let me know if you have an agent on the server that the file(s) are being put to via FTP? I am going to assume so.

1. Use a file dep on the group for the file your ftp'ing up to the ftp server

2. Set rerun each time dep's are met

3. Simply schedule the group to run once and each time a file is dropped into the directory your job group will rerun

Doing this eliminates the need to rerun every x hours, removes all the false negative email events and should solve the issue your having.

If I am missing something please let me know.

Yes, there is an agent on the servers.  I have actually tried this and it did not work correctly.  Files were being left out there, missed, or jobs began to skip.  Problem was that the delete file wouldn't work because of the file dependency.  It acted like the file was being used by another program.  I did put the file dependency on the first job in the group.  Should I have put it on the entire job group?

What type of agent, version and OS are you working with?

Joe Fletcher
Level 1
Level 1

Hi,

Could you not trigger the job using a file event? That way the job gets fired only when a file is present and you can have the file watcher pass the filename as a variable to ensure complete precision.

An alternative might be to use an MPUT in which case trasnferring zero files still counts as a normal completion.

Cheers

Here is the way I set up some of my groups: I have 1 job that is scheduled and checks if a file exists; if the file exists, it will trigger, on normal completion, a group (which is not scheduled). If the file does not exist, it will complete abnormally and it will not trigger anything because I don't see why I should have a group scheduled to run if there is a possibility that a file might not be present. So on your job you can set up 2 kinds of events: one, completed abnormally if the file is not found - I normally set the status to Skipped when that happens and here you can set up an email notification; two, completed normally then submit your group.

Lumi Mihalcea
Level 1
Level 1

Actually, because you mentioned FTP, there is a nice playbook from 5.3.1 called Monitoring Files on remote FTP servers. I have groups which I set up to monitor if a file is available on a remote FTP server, and if it is, then I trigger another group which will do the processing. It's very simple to set up and use, if you need a copy I can send it to you, just reply with an email address.

Lumi

Rogelio Cuevas
Level 1
Level 1

Hey Kimberly,

Not totally related but, since I am new to tidal this is close enough. 

I need to set a tidal job to send e-mail notifications. Being a newbie, I wonder if you could provide any guidance how to get started. 

Thanks for your time

Hi Rogelio,

You can use Email Action to send e-mail notifications to the CWA users (individual user(s) or all users of WorkGroup(s)) as well as other email addresses. 

Steps are below:

1. Under Mail tab of System Configuration window, choose the 'Internet Mail(SMTP)' option in "Mail System" field, configure the "SMTP server address" and "Return Address" as dummy email id or admin email id which will be used as from email id in the email notification. 

2. Create an Email Action and configure the email addresses, Subject and Message. CWA variables can be used to print the concerned filed names pertaining to concerned objects (like 'Job name' from Job object) in the subject or email body.

3. Create an Event like Job Event and associate this email action created in step 2. Also, choose required option in "Event Trigger" drop down menu which is suitable for your requirement like 'Job completed abnormally'. Associate the required job(s) with this event according to event trigger selected.

Now, if any of the jobs associated with this event met the trigger condition, this event will be triggered and hence email notification will be sent to the configured recipients. 

Please let us know if you need any further clarification.

Hello there,

Thanks for your very prompt assistance. I will take a closer look at this.

I have another question in the meantime through. It is my understanding there is a way to write a Tidal config XML file to set such e-mail notifications and then push the XML file to the REST API; examples of that are given in the REST API reference guide. If so, could you point me to an example/resource where I can get started to write such XML? 

Thanks again for your time!

Hi Rogelio,

You can refer the "REST api reference guide" in the below link. This document have details on different REST api operations and sample xml payload to create different objects using required attributes pertaining to each object and its values.

http://www.cisco.com/c/dam/en/us/td/docs/net_mgmt/datacenter_mgmt/Tidal_Enterprise_Scheduler/6-2-3/rest_api_reference/guide/Cisco_TES_6-2_REST_API_Reference_Guide.pdf

Also, from Web Client UI, you can navigate to "Help menu -> API Docs" to know different REST api objects, its supported methods and also its attributes. Based on this information, you can create different xml payloads using supported methods and attributes for each object. 

For your requirement, you need to create two different xml payloads. One is for Email Action, another is for Event & its association with action. If you want to associate event with set of jobs, you can update the payload for its association too. 

I have created sample xml payloads and attached here. You can create same kind of xmls according to your requirement and post it to CWA REST api portal.

Hope this helps. Please feel free to ask for any further clarification. 

Hello again,

Many thanks!

I have not had the chance to test them but the files certainly look like a great start!

I will for certain let you know if something else comes up.

thanks again for your help; greatly appreciated!

Rogelio

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: