Skip to content
Ric Lister edited this page May 24, 2013 · 3 revisions

Pingdom exposes data on downtime events and response times.

Metric options

  • measure: responsetime or uptime
  • headers: will need to set HTTP headers for auth, see example below
  • proxy: will probably need to be set true to get around same-origin policy
  • target: should be set to the url with your check number /results/12345?, plus any desired result parameters (such as status)

Information on constructing /results urls can be found in the Pingdom API docs.

Example

Dash.stats()
  .config({
    type:   'pingdom',
    source: 'https://api.pingdom.com/api/2.0',
    proxy:  true,
    headers: {
      'App-Key': 'abcde1fghij2klmnop3qrstuv4w5xyz6',
      'Authorization': 'Basic ' + btoa('admin@foobar.com:mysecret')
    }
  })
  .add(
    {
      title:   'Landing page uptime',
      measure: 'uptime',
      target:  '/results/123456?',
      display: 'sum'
    },
    {
      title:   'Landing page response time',
      measure: 'responsetime',
      target:  '/results/123456?status=up,down,unconfirmed,unknown',
      display: 'last',
      format:  Dash.Format.Microseconds
    }
  );
Clone this wiki locally