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

ManageEngine ServiceDesk Plus Cloud Build Release Information

7 July 2024

Summary details of the current Build Release information for ManageEngine ServiceDesk Plus Cloud Edition. All upgrades are performed by the Zoho Cloud team. Should you…

Read more

ManageEngine ADSelfService Plus Build Release Information

3 July 2024

The current build release information for ManageEngine ADSelfService Plus is summarised below. Scroll down for more information. You can download the latest service packs here.…

Read more

ManageEngine Analytics Plus Build Release Information

25 June 2024

Summary details of the current build release information for ManageEngine Analytics Plus. Scroll the above to view more release details. Download the latest service packs…

Read more

ManageEngine Password Manager Pro Build Release Information

21 June 2024

The current build release information for ManageEngine Password Manager Pro is summarised below. Scroll down for more information. You can download the latest service packs…

Read more

Security Advisory – Important Security Fix Released For ManageEngine Solutions

17 June 2024

Product Name Affected Version(s) Fixed Version Fixed on Password Manager Pro 12430 and below 12431 14/06/2024 PAM360 7000 and below 7001 14/06/2024 DetailsAn SQL injection…

Read more