LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-05-2011, 05:41 AM   #1
villagemanduo
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Rep: Reputation: Disabled
Talking Feedstop


Hi all,
A data feed from my proxy is broadcasted to my consumers outside my datacenter at remote locations through http connection. This feed suddenly times out and there is currently no way to determine when the feed actually stops until my clients mail in with a complaint.
I have thought about using a crontab to set a MAILTO if the cron job tests the connection to the proxy. can anybody guide me on how to achieve this task? i want to know when the feed goes down so i can react before my clients mail in a complaint...
Thanks
 
Old 08-07-2011, 12:57 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
What you want to do can be broken down into several components. Which of the following do you know how to do already?
  1. Check connection to the proxy.
  2. Mail to yourself.
  3. Run the proxy connection check repeatedly. You mentioned cron but this could also be done with a script which has a delayed loop.
 
Old 08-09-2011, 08:15 AM   #3
villagemanduo
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thumbs up Feedstop

Thanks for your reply catkin, i know how to do all the three of them but cannot determine how to unify them into a single cron job... What is this other method you're talking about?
 
Old 08-09-2011, 09:42 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
You could write a script to do all three things and either call it from cron (would fill the cron log if run very often) or the script could have something like:
Code:
while true
do
    sleep 5 # or whatever is appropriate delay
    <do whatever you need>
done
The script could normally be started at boot either from the boot scripts or cron; to start it without having to boot you could use
Code:
nohup your_script.sh &
 
Old 09-01-2011, 10:09 AM   #5
villagemanduo
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
hi catkin, saw your post. great idea... my problem is the logs growing. I tried this:
MAILTO="myemail"
* * * * * / sbin / ping -c 1 192.168.100.2> /dev /null

It is supposed to move all standard output to a black hole and mail standard errors to me.... i have run it into the proxy machine and i didn't get an email.... maybe its because the system didn't time out as usual...

Last edited by villagemanduo; 09-01-2011 at 10:14 AM.
 
Old 09-03-2011, 01:06 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Do yo have something set up to send mail from the computer? Maybe sendmail or postfix.
 
Old 09-13-2011, 09:49 AM   #7
villagemanduo
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
No as a matter of fact i don't... this is what the problem is. I pulled the rj45 from the proxy to see if it will trigger the mails and it didn't so i guess it didn't have a mail server instance running on the machine. i know there would be a mail script that can do this... can you recommend any?
 
Old 09-16-2011, 09:02 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
exim, postfix and sendmail are popular choices. All are powerful programs with what can be a bewildering array of configuration options. postfix was intended to be a simpler alternative to sendmail but it grew and is almost as complex now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration