Skip to content

Instantly share code, notes, and snippets.

View ChristianKrausse's full-sized avatar

Christian Krausse ChristianKrausse

View GitHub Profile
@earino
earino / script.js
Created November 23, 2012 22:42
Poor Man's Nagios
/**
* This function fetches a url and gets some of the instrumentation data.
*
* @param url the Url to fetch and instrument
* @return an object which contains the status code, latency, and contentLength.
*/
function fetchUrl(url) {
try {
var start = new Date().getTime();
var resp = UrlFetchApp.fetch(url);