Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Uptime calculation via Hudson + SiteMonitor Plugin

Digital Innovation Partner

Uptime calculation via Hudson + SiteMonitor Plugin

Hi,

The uptime is the percentage of time that one site is reachable, sometime uptime is a measure regulated by a contracts, in that case is important to track it.

We need Hudson up and running with the SiteMonitor plugin installed.
Every builds the site monitor checks if a site is up, if it is the build is succesfull otherwise it fails.
This info is tracked in the build logs, so with a script we can calculate the number of succesfull builds over the total builds.
Here is the shell script

 cd ../builds
cat `find . -name log -mtime -30`  | grep Finished >m$$
mtot=$( cat m$$ | grep -c Finished );
msuc=$( cat m$$ | grep -c SUCCESS );
mper=$(echo "scale = 3; $msuc/$mtot" | bc)

echo UPTIME
echo Last 30 days = $mper

Tags: , , ,

Lascia un commento