Email Monitoring and Heartbeat

ServiceNow email is very reliable and has a low occurrence of downtime.  However, for some companies, email is crucial to their business.  They rely on email to meet SLAs and OLAs, and have contracts that might explicitly state that email must be received within a certain timeframe. 

In order to insure that ServiceNow email is functioning, here are a couple of monitoring methods for email.

1. Webservices

If you have an external monitoring application, this application could use ServiceNow web services and check for emails in send-ready status. If there are so many emails over a certain threshold, say 100, the monitoring system will flag an error. 



Example Webservice Request 

<soapenv:Envelope xmlns:soapenv="" xmlns:sys="">

2. Heartbeat Email

Another idea is for ServiceNow send emails to a monitoring system or person on a periodic basis.  Although not as reliable as web services in my opinion, it also is effective. Here is how to setup a heartbeat email in ServiceNow


Table: Email [sys_email]
Fired by: Email Monitoring Scheduled Job
Description: Email Heartbeat


Name: Email Heartbeat
Table: Email [sys_email]
When to send?
Send when: Event is fired
Event name:
Who will receive?
Users: <your user here>
What it will contain:
Subject: ServiceNow Email Heartbeat
Message: The ServiceNow email heartbeat sends email every 15 minutes. Note that network delay may affect this email. 

Scheduled Script

Name: SNElite Heartbeat Email
Trigger Type: Repeat
Repeat: Days 00 Hours 00:15:00
//Send HeartbeatEmail
function sendHeartbeatEmail() {

3. ServiceNow Incident

You can also use a scheduled script in ServiceNow to create an incident if email is not responding.  You would need to adjust for your ServiceNow system, but this can get you started.

Scheduled Script

Name: SNElite Email Check
Trigger Type: Repeat
Repeat: Days 00 Hours 00:15:00

//Create incident if over 100 pending emails
function checkEmailQueue() {
grEmail = new GlideRecord('sys_email');
if(grEmail.getRowCount() > 100) {
var gr = new GlideRecord("incident");
//gr.assignment = '';
gr.short_description = 'Check ServiceNow Email Queue';
gr.work_notes = 'ServiceNow Email Queue contains over 50 emails in send-ready status.Check ServiceNow email for proper operation';
//this._logDebug("Created incident " + gr.number);