-2

I m using putty on windows server to login into remote server. I need to monitor some jobs on that remote linux box. I need some script or binary file, that will send me notification on windows server/pc as soon as job fails on remote server.

Notify-send is not working there. I m using redhat linux.

  • 1
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Sep 23 '17 at 15:47

1 Answers1

0

You can set a cron job in your Linux machine, which will will mail you if any failure occurs or any detail you needed. Example, I am using this service to monitor dump copy process.

This script will take backup and after completion notify me on my mail.

#!/bin/bash
date=`date -d '1 hour ago' "+%Y-%m-%d-%H"`

#/usr/bin/svnadmin dump /abc/xyz/ > /home/server1/backup/dump_$date.dump
/usr/bin/svnadmin dump /abc/xyz/ > /root/svn/dump_$date.dump    

mail -s "SVN DUMP" abc@xyz.com < /opt/body.txt

Here, the body.txt file will contain the mail body.

cron will execute this file as below:
1 1 * * * sh dump.sh 

This may help.

jww
  • 97,681
  • 90
  • 411
  • 885
Aman
  • 1