Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Photo Editng software

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion
Register FAQ Community Calendar

Free website monitoring agent?
Reply
 
Thread Tools
Old 07-07-2010, 20:29   #1
Xaccers
Inactive
 
Join Date: Jun 2003
Location: Milling around Milton Keynes
Age: 48
Posts: 12,969
Xaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny stars
Xaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny stars
Free website monitoring agent?

I used to use sitescope (way before HP got their hands on it) and they released a version which was free for non-commercial use, but it appears to be no more.

Can anyone suggest a free website monitoring agent?
It just needs to check for a specific word and fire off an email if it doesn't find it.
Xaccers is offline   Reply With Quote
Advertisement
Old 09-07-2010, 23:13   #2
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 46
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Free website monitoring agent?

Nagios is pretty much the industry standard, but it's a behemoth and you can easily lose a day just configuring it.

But actually, if you can run PHP (on command line) then a script like this will work:

PHP Code:
<?php

$url 
'http://www.example.com/'// This can be a full URL if you like
$word 'hello'// Word to search for

// If we have a URL passed on the command line then use it
if (count($argc) > 1) {
    
$url $argv[1];
}

// Email variables
$mailTo 'your@email.com';
$mailSubject 'Website Monitoring for ' $url;
$mailMessage "Epic fail\n\nThe site is not working properly!";

// Grab the page
$page file_get_contents(urlencode($url));

// Search for the word in the page
if (!stristr($page$word)) {
    if (!
mail($mailTo$mailSubject$mailMessage)) {
        echo 
"Could not send the email, make sure Postfix or Sendmail is installed and running!\n";
        exit(
1);
    }
} else {
   exit(
0); // Do nothing and exit with a Posix success code
}
Save the above as whatever.php and run it like:

Code:
php whatever.php '<URL>'
The URL is optional and defaults to whatever is set inside the script.

You can set this via CRON, Google it or use whatever control panel you have on your webhost if applicable.
If you need a version modified that you can use on a webpage, let me know.
Richard M is offline   Reply With Quote
Old 10-07-2010, 10:23   #3
Kymmy
Inactive
 
Join Date: Dec 2007
Posts: 18,385
Kymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny stars
Kymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny stars
Re: Free website monitoring agent?

Something missing??

Code:
?>
?????
Kymmy is offline   Reply With Quote
Old 10-07-2010, 21:46   #4
Xaccers
Inactive
 
Join Date: Jun 2003
Location: Milling around Milton Keynes
Age: 48
Posts: 12,969
Xaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny stars
Xaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny stars
Re: Free website monitoring agent?

Quote:
Originally Posted by Richard M View Post
Nagios is pretty much the industry standard, but it's a behemoth and you can easily lose a day just configuring it.

But actually, if you can run PHP (on command line) then a script like this will work:
If you need a version modified that you can use on a webpage, let me know.

I'm getting:

PHP Warning: file_get_contents(webaddress): failed to open stream: No such file or directory in monitor.php on line 17

Running this on a W2K3 server.


Line 17 is:
$page = file_get_contents(urlencode($url));
Xaccers is offline   Reply With Quote
Old 10-07-2010, 22:14   #5
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 46
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Free website monitoring agent?

Quote:
Originally Posted by Kymmy View Post
Something missing??

Code:
?>
?????
No, Zend recommend that you don't use the closing ?> to stop newlines from messing with debugging.

Quote:
For files containing only PHP code, the closing tag must always be omitted (See General standards).
http://framework.zend.com/manual/en/...ing-style.html

---------- Post added at 21:14 ---------- Previous post was at 21:13 ----------

Quote:
Originally Posted by Xaccers View Post
I'm getting:

PHP Warning: file_get_contents(webaddress): failed to open stream: No such file or directory in monitor.php on line 17

Running this on a W2K3 server.


Line 17 is:
$page = file_get_contents(urlencode($url));
Your $url must be incorrect.
I haven't tested this code, but it should work with a correct URL.

You're not using "webaddress" (literal) as the URL, right?
Richard M is offline   Reply With Quote
Old 10-07-2010, 22:22   #6
Xaccers
Inactive
 
Join Date: Jun 2003
Location: Milling around Milton Keynes
Age: 48
Posts: 12,969
Xaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny stars
Xaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny stars
Re: Free website monitoring agent?

No I'm using http://www.frenchcarforum.co.uk/forum/viewforum.php?f=3
Xaccers is offline   Reply With Quote
Old 10-07-2010, 22:39   #7
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 46
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Free website monitoring agent?

Ok, going to test it.

EDIT: Actually I can't test atm because I need to use Windows - can you try using this line:

PHP Code:
// Grab the page
$page file_get_contents('http://www.frenchcarforum.co.uk/forum/viewforum.php?f=3'); 
Richard M is offline   Reply With Quote
Old 10-07-2010, 23:21   #8
Xaccers
Inactive
 
Join Date: Jun 2003
Location: Milling around Milton Keynes
Age: 48
Posts: 12,969
Xaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny stars
Xaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny starsXaccers has a pair of shiny stars
Re: Free website monitoring agent?

That's done the trick!
Thanks Richard you're a star!
Xaccers is offline   Reply With Quote
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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:00.


Server: osmium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum