How to proactively handle problem management in your IT environment.

How to proactively handle problem management in your IT environment.

This post describes the use of a python script to analyze the nature of the requests and alarms the technicians about frequently raised requests' category, and sub-category. This may help the technicians to proactively start their investigation in finding the underlying root cause, and take necessary precautionary measures to ensure that others are not affected further.

This script works with the 'custom schedules' feature released in ServiceDesk Plus version 9300.You can find more information about what custom schedules are in the link here.

UseCase: A query is used to get the list of requests created from a specific category , sub-category and item.When the script triggers, it will invoke the report and fetch the category, subcategory, and item of the requests raised and email the details to the configured email address.

Execution steps:
1. Go to Reports--> New Query Report and run the below query and save this report with the name "Requests by Category" under any of the available report folders.

For MSSQL database:
select top 1 cd.categoryname 'category', scd.name 'subcategory', i.name 'item', count(wo.workorderid) 'count' from workorder wo left join workorderstates wos on wo.workorderid=wos.workorderid left join categorydefinition cd on wos.categoryid=cd.categoryid left join subcategorydefinition scd on wos.subcategoryid=scd.subcategoryid left join itemdefinition i on wos.itemid=i.itemid where wo.createdtime >= <from_today> and wo.createdtime <= <to_today> and wo.IS_CATALOG_TEMPLATE='0' group by cd.categoryname, scd.name, i.name order by 4 desc

For PgSQL database:
select cd.categoryname "category", scd.name "subcategory", i.name "item", count(wo.workorderid) "count" from workorder wo left join workorderstates wos on wo.workorderid=wos.workorderid left join categorydefinition cd on wos.categoryid=cd.categoryid left join subcategorydefinition scd on wos.subcategoryid=scd.subcategoryid left join itemdefinition i on wos.itemid=i.itemid where wo.createdtime >= <from_today> and wo.createdtime <= <to_today> and wo.IS_CATALOG_TEMPLATE='0' group by cd.categoryname, scd.name, i.name order by 4 desc limit 1

2. Download and place the script file in the ManageEngine/ServiceDesk/integration/custom_scripts folder.
3. Edit the scheduleNotify.py file and update your SMTP server details, mail server name, username and password.
4. Go to Admin--> Custom Schedules and set up the schedule as shown below.



Here's a sample of the email which the user will receive.


So do you still think firefighting IT issues going to help your IT? We are open to your suggestions or requirements for similar intelligent notifications that will yield great values to your IT team.

A short guide on setting up python is available here.
                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • How to email pending requests list to technician periodically

                        This post describes the use of a python script to email pending requests to each technician in a periodic interval using Custom Schedules.This showcases the use of a feature called 'Custom Schedules' that was released in the build 9300 of ServiceDesk ...
                      • Auto-create problem request based on certain criteria.

                        This is a sample script that triggers the creation of a Problem Request in ServiceDesk Plus using the Problem API.  Use Case:  ​ All incident requests with Priority = High will create a problem ticket with the request's default field values. ...
                      • Request Problem association.

                        This Report is used to find the request, problem association. To make any changes to a query, refer to the KB article below. https://pitstop.manageengine.com/support/manageengine/ShowHomePage.do#Solutions/dv/24000633501275 SELECT wo.WORKORDERID ...
                      • Time elapsed analysis

                        This Report gives a clear picture of, how long the request was handled by each technician, stayed in each group and stayed in different statuses. Capturing each action performed on the request can be helpful for the request management team to assess ...
                      • Deluge Custom Function - Custom Schedules

                        Sample Scripts for custom schedule. Steps to configure: 1. Copy the respective query and save the query report with a name. 2. Update the query report name in the custom schedule function script. 3. Configure a custom schedule with the custom ...