Monitor Auth0

If you are using the public cloud version of Auth0, we recommend subscribing to Auth0 Status for notifications regarding Auth0 service availability. The Auth0 DevOps team uses Auth0 Status for reports on current incidents.

Current and historical uptime is available at Auth0 Uptime.

Monitor Your Auth0 Account

You can add Auth0 health probes to your monitoring infrastructure with the following endpoints:

The test Endpoint

The test endpoint checks the status of the core Auth0 authentication service. If the status is up, the endpoint returns a 200 status code; if is is not, it will return a 5xx status code.


curl --request GET \
  --url 'https://YOUR_AUTH0_DOMAIN/test'
var client = new RestClient("https://YOUR_AUTH0_DOMAIN/test");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://YOUR_AUTH0_DOMAIN/test"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://YOUR_AUTH0_DOMAIN/test")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://YOUR_AUTH0_DOMAIN/test",
  "method": "GET",
  "headers": {}
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var request = require("request");

var options = { method: 'GET', url: 'https://YOUR_AUTH0_DOMAIN/test' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
#import <Foundation/Foundation.h>

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://YOUR_AUTH0_DOMAIN/test"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://YOUR_AUTH0_DOMAIN/test",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("")

conn.request("GET", "/YOUR_AUTH0_DOMAIN/test")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://YOUR_AUTH0_DOMAIN/test")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import Foundation

var request = NSMutableURLRequest(URL: NSURL(string: "https://YOUR_AUTH0_DOMAIN/test")!,
                                        cachePolicy: .UseProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.HTTPMethod = "GET"

let session = NSURLSession.sharedSession()
let dataTask = session.dataTaskWithRequest(request, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    println(error)
  } else {
    let httpResponse = response as? NSHTTPURLResponse
    println(httpResponse)
  }
})

dataTask.resume()

Additionally, this endpoint returns a JSON object:

{
  "clock": 1417220191640
}

The testall Endpoint

The /testall endpoint checks the status of the core Auth0 authentication service, as well as supporting services such as those for the Dashboard and documentation.


curl --request GET \
  --url 'https://YOUR_AUTH0_DOMAIN/testall'
var client = new RestClient("https://YOUR_AUTH0_DOMAIN/testall");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://YOUR_AUTH0_DOMAIN/testall"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://YOUR_AUTH0_DOMAIN/testall")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://YOUR_AUTH0_DOMAIN/testall",
  "method": "GET",
  "headers": {}
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var request = require("request");

var options = { method: 'GET',
  url: 'https://YOUR_AUTH0_DOMAIN/testall' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
#import <Foundation/Foundation.h>

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://YOUR_AUTH0_DOMAIN/testall"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://YOUR_AUTH0_DOMAIN/testall",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("")

conn.request("GET", "/YOUR_AUTH0_DOMAIN/testall")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://YOUR_AUTH0_DOMAIN/testall")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import Foundation

var request = NSMutableURLRequest(URL: NSURL(string: "https://YOUR_AUTH0_DOMAIN/testall")!,
                                        cachePolicy: .UseProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.HTTPMethod = "GET"

let session = NSURLSession.sharedSession()
let dataTask = session.dataTaskWithRequest(request, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    println(error)
  } else {
    let httpResponse = response as? NSHTTPURLResponse
    println(httpResponse)
  }
})

dataTask.resume()

If all services are up, the endpoint returns the 200 HTTP response code and a simple text message saying, OK. If any service is down, the response code from /testall will be 5xx.

If you've extended Auth0 through rules or a custom database connection, you can build a synthetic transaction that exercises these capabilities using the Resource Owner Password Grant.

We recommend using an authentication flow that doesn't require a user interface (such as the Resource Owner Password Grant) so that you don't have to use a monitoring tool that is capable of mimicking the actions of a user. Many monitoring tools exist using this approach, including:

Monitor External Services Associated with Your Auth0 Account

If you are seeing issues with your Auth0 service, but the monitoring endpoints aren't returning information on errors, check the status of any external services that you use via Auth0.

Monitoring a Dedicated Deployment

Please see the PSaaS Appliance pages for information on monitoring a dedicated deployment.

Configure SCOM

Auth0 can be monitored as a standard web application using System Center Operations Manager (SCOM) or any tool that supports synthetic transactions.

We recommend adding SCOM probes for the test and testall endpoints, in addition to one for a synthetic login transaction that includes the extensions your applications rely on (such as rules that execute custom code for integration with your company's other services).

To set up SCOM:

  1. Add a new SCOM instance using the Add Monitoring Wizard:
  • Name: a descriptive name for the SCOM instance
  • Description: a description of what this SCOM instances monitors
  • Select destination management pack: Default Management Pack

ss-2014-11-21T15-44-34.png

Click Next to continue.

  1. Click Add to enter the URLs you want SCOM to monitor.

ss-2014-11-21T16-31-15.png

Click Next to continue.

  1. You will be asked where you want to monitor from. Click Add to set up a location. In the pop-up dialog, search for Internal location - Agent. Select the appropriate address and click Add. Click Ok to finish selecting the location.

ss-2014-11-21T16-32-25.png

Click Next to continue.

  1. Set the frequency with which SCOM collects data from each endpoint:
  • Test frequency: 60 seconds
  • Performance data collection interval: 60 seconds
  • Test time-out: 30 seconds

Additionally, under the Alerts section, check the box next to HTTP status code and set that to Great than or equals 400.

ss-2014-11-21T16-33-51.png

Click Next to continue.

  1. Click Run Test to test each endpoint and ensure that the connection settings provided are correct.

ss-2014-11-21T16-34-25.png

Once you have finished configuring your SCOM instance, you can activity through the Monitoring tab:

ss-2014-11-25T17-20-47.png

Click Web Application Status to bring up the information SCOM has gathered.

ss-2014-11-25T17-22-10.png