Home >  User Guide - UPLINX Report Tool > Generating Reports from the Command Line for Scripting and Scheduling > Example 6 - Automatically Monitor CUCM Configuration Changes and Trigger Alert Emails

  Example 6 - Automatically Monitor CUCM Configuration Changes and Trigger Alert Emails

 

 

 

 

The following is a quick step by step guide on how to automatically monitor CUCM changes and trigger email alerts when configuration objects have been changed. This script can be scheduled to automatically run to monitor specific CUCM configuration objects such as device pools, CSS, partitions and translation patterns. It can monitor of few specific configuration objects or all changes to the CUCM configuration. With this script in place, you do not have to worry that someone might accidentally change some of your critical configuration items, such as route patterns or voice gateways, without the change being approved. If something changes, you will now automatically receive an email alert that includes any configuration changes.

Once a change has been detected, an email will be sent to you and the HTML attachment contains the detailed changes to the configuration objects. If Cisco Audit logging has (optionally) been setup, the notification will also contain the CUCM userid and the time of this change. To manually perform an audit report from the GUI and to configure Cisco Audit logging, please see the chapter Comparison (Audit) of CUCM Configuration Reports.  This script automates this manual process, so that you automatically receive an email if your trigger rule (which can be defined in the script) has been matched.

Sample script code is provided in <Report Tool installation folder>\scripts\auditcucm.bat. This script only reads the output of a comparison, which is performed in the script webreport.bat as outlined in Example 5 - Publish Scheduled Reports to a Web Server. The script auditcucm.bat checks the CSV file diffsummary.csv which contains the output of the comparison and then generates an HTML report file containing the changes and optionally emails this report as an attachment as a notification.

The script auditcucm.bat implements the following features:

Checks the CSV file diffsummary.csv for changed objects.

Counts how many configuration items have changed.

Sendd a notification email if something fails.

Sendd a notification email if a configuration item changes. For example, send the changes applied to CSS and partitions (only) if there were changes to a CUCM admin for review.

This script should be customized to your needs. The following are some hints to get you started:

The current script adds any change of all configuration objects to the generated report file out.htm. If you want to only include two configuration items, you would need to change the following in auditcucm.bat:
 

set doprocess=0  (Note: this changes the default to only include thesetags)
if "%%A"=="cm_devicepool" (
  set doprocess=1
 )if "%%A"=="cm_callingsearchspace" (
set doprocess=1
)
 

Note: The name of tags for CUCM can be seen in the folder C:\Program Files (x86)\UPLINX Report Tool\templates\en\descriptions. They start with cm. The filename (without the ending .txt) is the tag name.

Alternatively, you can just include the desired object names in the report tool by performing the following:

Step 1: Setup Report Tool in GUI Mode

Start Report Tool and configure:

MUST DO: No timestamp option in profile (Start GUI, tick 'No timestamp', close application).

Disable Word, CHM, Excel generation unless required.

Select some configuration objects in the configuration tree in Report Tool > Report Generation tab > small silver cog > select CUCM version tree > select items to be included. Only items which are present in the base and changed report will be compared.

After closing Report Tool, these settings will be stored in the default profile and the default profile settings will be used when Report Tool is run from the command line without the /profile option. Alternatively, you can create a specific profile in GUI mode to use its settings by calling ReportTool.exe /profile "myprofile".

 

  

Do you need a professional solution for change management on CUCM?

Check out our product Track and Audit Configurations or contact us.  

 

 

 

 

Copyright © 2024 UPLINX - Last updated 26 Feb 2024