Are the root causes to all your noisy alerts just a little evasive? Are you missing genuine problems because all of your level 1 technicians get a panic attack when they check the Service Board? This script might be for you.
- Scans multiple Service Boards for duplicate tickets
- Matches those tickets against macros (based on regular expressions)
- Creates a master ticket with an IA note referencing those tickets
- Master ticket can be reopened if closed - within timeframes
- Master ticket can list previously matched tickets in Internal Analysis
- Download the sourcecode (and pycw library this is based on)
- In ConnectWise
Setup Tables > Service Board
create a new service boardTesting/Alerts
with the following StatusesSilentNew
,SilentClose
,New (dedupe)
,Closed (dedupe)
,Reopened (dedupe)
- Make sure you have a
Catchall
company that is active (Service Tickets can be created against it) as well as two test companies (Yellow Systems, L.L.C
andPink Networks, L.L.C
) - Check the
rules.json
file - make sure there are Configurations that match the name (the type in the file is just for generation of test ticket data, actual Configuration type is unimportant) - Run
python alert-dedupe.py --setup
, you'll want to follow the prompts and supply it with an Integrator Login (set this up in ConnectWiseSetup Tables >> Integrator Logins
) - Run
python alert-dedupe.py --create-test-tickets
to create some test tickets in ConnectWise on your newTesting/Alerts
board. - Run it a few more times. Why not?
- Run
python alert-dedupe.py --loop
to process all of those tickets. You can also runpython alert-dedupe.py --once
to process only a few of these.
What you should see when you run --loop
or --once
is the tickets are compacted, you know, except where a configuration is invalid.
- Scans over Service Boards (
options[service_boards
) for tickets to process. - Matches these tickets using regular expressions (which return identifiable groups)
- Using the regular expressions, creates a new ticket (ideally, more readable)
- If that new ticket already exists, piles the duplicate onto the existing ticket
- Closes the original ticket
reopen_tickets
if set to 1 a closed master ticket will be reopened ifdate_crit
is metdate_crit
specifies within what time period, or what same time period to look for tickets forreopen_tickets
(within-year
,within-quarter
,same-month
,same-week
etc)include_previous
- how many entries (not matched to current master ticket) you would like to reference in Internal Analysissearch_limit
- how many tickets to search for at a timestatus_new
- status used to create new master ticketsstatus_close
- status used to close duplicate ticketsstatus_reopen
- status used to reopen a closed master ticketsearch_boards
- an array of boards to processsearch_status
- an array of statuses to process
Some of the above can also be applied under rules
which then apply for each subject
beneath it.
- pycw - Python ConnectWise library
- python-sqlite3 - for storing historical data
- python-suds - required by pycw
- If a configuration does not match, leave a note in original alert ticket
- Email alerts for tickets, ability to adjust ticket Impact/Severity
- Better
--help
- Cleanup of code
Code is offered without any form of warranty. You alone are liable for the data on your system.
No license is offered. Just be cool.
If you have any feedback, feel free to email them to me (alex -at- kbni -dot- net).