A question recently came up on the forums about how you would go about checking the current mail fetching status in ManageEngine ServiceDesk Plus. It was an interesting question that certainly got us thinking.

Details about the email operation of ManageEngine ServiceDesk Plus are held in two principal locations. First off if you take a look at the ‘errorlog’ table for Email Settings changes you will see an indication of the email service being started and stopped:

 
SELECT el.errorlogid, LONGTODATE(el.occurredtime), el.Message FROM errorlog el WHERE el.suberrormodule=’Email Settings’
 
(To run an SQL query copy the query and paste it into the Query Editor under the Reports Tab)
 
The report should hopefully work irrespective of the database you are using and the output looks a little like this:
 
 
The other alternative is to review the details of the ‘task_input’ table which will provide details of the execution times for the mail fetching service and whether mail fetching is enabled or not. A raw output is given by the following query:
 
select * from task_input where schedule_id in (select schedule_id from schedule where schedule_name=’MailFetchingSchedule’);
 
An example of the output is as follows with an Operation_Status of ‘3’ indicating mail fetching is up and a value of ‘4’ that it is down:
 
 
 

Taking this a stage further we decided to modify the query so we could add it to our ManageEngine Applications Manager, or ManageEngine OpManager with Applications Manager Plug-In, monitoring systems for continual monitoring and alerting if the mail fetching gets turned off.
 
The modified query is as follows:
 
SELECT task_input.schedule_time ‘Scheduled Time’, CASE WHEN task_input.operational_status=3 THEN ‘Up’ WHEN task_input.operational_status=4 THEN ‘Down’ ELSE ‘Unknown Status’ End as SDP_Mail_Status from task_input where schedule_id in (select schedule_id from schedule where schedule_name=’MailFetchingSchedule’)
 
In ManageEngine Applications Manager, or the Applications Manager Connector in ManageEngine OpManager, from the Monitor Tab we can add a new Database Query Monitor:
 
 
 
 
 
 
 
 
 
 

Simply add the connection details and paste in the Query:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

The monitor will require a Primary Key to be set. Choose SDP_Mail_Status as the Primary Key:
 
 
 
 
 


Then choose and enable the SQL query:
 
 
 
 
 
 
 

You are then monitoring the active status of the Mail Fetching in ManageEngine ServiceDesk Plus:
 
 
 
 
 
 
 
 
 
 
 
 
 
The final thing to do is to create a new threshold template to check for the ‘Up’, ‘Down’ and ‘Unknown’ states so that you get a correct presentation for the Health of the Mail Fetching.
 
 
This article is relevant to:
Service Desk

You may be interested in these other recent articles

Unmerging Requests in ServiceDesk Plus Cloud: Analysis

10 December 2024

Managing helpdesk systems like ServiceDesk Plus Cloud often brings complex scenarios that require in-depth analysis and tailored solutions. Recently, Set3 Solutions, the award-winning UK technology…

Read more

Latest Updates for ManageEngine ServiceDesk Plus On-Premise

9 December 2024

Discover the latest ServiceDesk Plus updates, including new features, fixes, and enhancements.

Read more

Latest Updates for ManageEngine ServiceDesk Plus Cloud

6 December 2024

Discover the latest ServiceDesk Plus Cloud updates, including new features, fixes, and enhancements.

Read more

Latest Updates for ManageEngine Endpoint Central

5 December 2024

Discover the latest Endpoint Central updates, including new features, fixes, and enhancements.

Read more

Improve Endpoint Security with Endpoint Central: Key Features and Benefits

28 November 2024

Endpoint Central (formerly Desktop Central) has undergone a name change and introduced Endpoint Security to help organisations better safeguard their endpoints. According to a study…

Read more