Operating System - HP-UX
1753792 Members
7586 Online
108799 Solutions
New Discussion юеВ

Re: How to setup an email alert notification for failed SFTP jobs?

 
SOLVED
Go to solution
James R. Ferguson
Acclaimed Contributor

Re: How to setup an email alert notification for failed SFTP jobs?

Hi (again) Jan:

> I got an idea. How about comparing the check sum of the data files before and after the sftp transfer? If they are the same, then the sftp upload is OK, if the check sum is different, then it is failed. What do you think?

That's OK _as_long_as_ your not moving a text file from UNIX to WINDOWS or vice versa using the ASCII mode of transfer. When you do that, a carriage return character will helpfully be added or subtracted from each "line" rendering the checksums different.

Regards!

...JRF...
Jan Shu
Regular Advisor

Re: How to setup an email alert notification for failed SFTP jobs?

Hi James,

Thanks for the reply. The sftp server is a UX server (not sure Sun or HPUX) and I will make sure we use binary mode to upload. Thanks again.

Jan
OldSchool
Honored Contributor

Re: How to setup an email alert notification for failed SFTP jobs?

JRF said: "That's OK _as_long_as_ your not moving a text file from UNIX to WINDOWS or vice versa using the ASCII mode of transfer. When you do that, a carriage return character will helpfully be added or subtracted from each "line" rendering the checksums different."


while correct for ascii mode transfers in conventional FTP, some of the SFTP stuff, especially early open-source, don't make to dos2ux / ux2dos conversions. I won't go into how I happen to know about this ;)
Jan Shu
Regular Advisor

Re: How to setup an email alert notification for failed SFTP jobs?

Thank you all for your helpful inputs on this.

Jan