Old 23rd April 2007, 19:38   #1
uunox
Junior Member
 
Join Date: Apr 2007
Posts: 1
SC server monitor script?

Hi,

I am part of a team that develops web services for a no-profit organisation, which provides audio books

. Our shoutcast server runs on-demand - if one requests a book, a playlist is generated. All connections from winamp to server are directed through a linker script, which, if needed redirects a request either to a book or to a specific error message. Lately I have done quite a lot of thinking about implementing two methods:

- first, if a request is made, script should check, if the server itself is available (this I have achieved - one has to read http response). if it is down, alert staff and make a note about it. redirect next customers to error message.
- the really tough one is second method - if server is available, how to check if specific book or chapter is available by reading shoutcast ICY response? Since we have many books, there is no way to manually make sure, wether all books and chapters exist. By implementing this method, an automatic notification could be achieved.

BTW, since this service is offered for the blind, all processes must be as automatic as possible.

Thanks in advance,
Meelis
uunox is offline   Reply With Quote
Old 27th April 2007, 22:45   #2
fc*uk
Moderator
 
fc*uk's Avatar
 
Join Date: Dec 2005
Location: Atlantic Beach
Posts: 8,127
what about checking the repositories on the hard drive?

Why not use something like Tripwire run a scan of the directory, parse the log and check it for the files that should be in there. If no errors, then go; if errors, then die.
fc*uk is offline   Reply With Quote
Old 28th April 2007, 00:44   #3
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,491
Probably a beter idea to use an HTTPd to serve the audio -- use Apache, and you can also use rewriting rules to check client user-agent strings to prevent downloading.

If the PHP is also running on this HTTPd, it should also have access to the same filesystem as the HTTPd, so it can check directly and return a redirect to a "not found" audio file so that audio is always returned.

One thing about SHOUTcast is that it's OD feature is severely limited, and an HTTPd is always a better way (because you can control an HTTPd in many more ways), especially if you have the ability to script launch files (.pls, .m3u, .ram, etc...).
djSpinnerCee is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump