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

Get to building your business apps with the new AppCreator

9 June 2022

ManageEngine’s new low-code application development tool Creating an application, building one and deploying it can be expensive and time consuming as you have to make…

Read more

Endpoint Central’s Endpoint Security

31 May 2022

Endpoint Central (formerly Desktop Central) not only got a name change but has also introduced Endpoint Security to help organisations keep their endpoints secured. According…

Read more

Automation in ManageEngine ServiceDesk Plus

20 December 2021

Increasingly customers are looking to automate repetitive and mundane tasks in ServiceDesk Plus. Since the introduction of Deluge, Zoho’s online scripting language, as part of…

Read more

Update on the recent Apache Log4j2 vulnerability – Impact on ManageEngine on-premise and Zoho cloud products

14 December 2021

A high severity vulnerability (CVE-2021-44228) impacting multiple versions of the Apache Log4j2 utility was disclosed publicly on December 9, 2021. The vulnerability impacts Apache Log4j2…

Read more

Who do I contact for technical support for my ManageEngine product?

10 September 2021

When purchasing a ManageEngine product it will either have been supplied on a subscription basis or it would have included an initial Annual Maintenance and…

Read more