Monitor specific HTTP page response times

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Posts: 2
Joined: Tue Nov 29, 2005 1:21 pm

Monitor specific HTTP page response times

#1 Post by jcoppedge » Tue Nov 29, 2005 1:32 pm

I found a post regarding using echoping to monitor page response time - however the script didn't allow you to specify pages to monitor, so I set off to create that will take as input the domain and page to monitor - however Cacti simply gives partial result errors. The perl script and snippets from the log file are below. It seems there is simply no result - but running the script from command line all works fine. Any help would be greatly appreciated.

Cacti version 0.86g - CENT OS 4

@ARGV == 2 or die "Syntax : <HOST> <URI>\n";

$HOST = $ARGV[0];
$URI = $ARGV[1];

($Min,$Max,$Average) = (`echoping -n 2 -h $URI $HOST` =~ m/Min.*(\d+\.\d+).*\nMax.*(\d+\.\d+).*\nAverage.*(\d+\.\d+)/);

print $Average;

11/29/2005 12:29:02 PM - CMDPHP: Poller[0] Host[9] DS[137] WARNING: Result from CMD not valid. Partial Result:
11/29/2005 12:29:02 PM - CMDPHP: Poller[0] Host[9] DS[137] CMD: perl /var/www/html/cacti/scripts/ /advanced_search?hl=en, output: U

Posts: 2
Joined: Tue Nov 29, 2005 1:21 pm

Follow up

#2 Post by jcoppedge » Wed Nov 30, 2005 12:24 pm

Although there were a couple of issues - the main problem ended up being that the perl script when executed did not have the full path to echoping - for some reason when the poller ran from crontab, no path seems to be setup to /usr/local/bin - updating the echoping executable to include the full path finally resolved the issue.
Example graph now being generated.
http-response-time.png (23.66 KiB) Viewed 5641 times

Posts: 6
Joined: Wed Nov 09, 2005 9:28 am

#3 Post by remy74 » Thu Dec 01, 2005 10:15 am

Great graph.. :lol:
Can you give all files for doing monitor web page ?

User avatar
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany

#4 Post by gandalf » Thu Dec 01, 2005 2:38 pm

Moved to Scripts and Templates

There have already been scripts for this. Please search/google for them


Posts: 7
Joined: Tue Feb 01, 2005 3:59 am

#5 Post by akai » Mon Dec 12, 2005 7:59 am

Can you post the files?

Thanks. :wink:

Posts: 8
Joined: Sat Feb 11, 2006 11:50 am

#6 Post by macindy » Sat Feb 11, 2006 11:52 am

Please can you post this script/template

Post Reply