Receive Login Alerts On After-hours ConnectWise Login Attempts
A recent post on the ConnectWise Enhancement forums asks ConnectWise to add the ability to receive login alerts. Specifically, they wanted to be alerted if anyone was logging in at odd times in the middle of the night. While Manage doesn’t have a wizard for this, it’s easy enough to set up for yourself in Report Writer with this guide. All the necessary information is already included in the v_rpt_member view in the database.
Skip to the End?
If you’d rather skip the learning session and get right to the good stuff, search for “NexNow” in the Marketplace Partner Exchange and import the “NexNow – Alert on Wee Hours logins” Report. Then, all you need to do is create an hourly alert with your email address in the Misc tab.
Report Setup
Data Source
The only item you need to check here is v_rpt_Member
Fields
Member_Full_Name
Last_Login_UTC – Set Function to Maximum. You may also want to sort on this field (to sort with latest logins first, go to Advanced Field Properties and choose Z-A sort).
Board_Name (or any text field). Change the field name to something useful like IsAfterHours and then click the gear icon for Advanced Field Properties and add the following code. This will alert on logins between 12am-4am but you can adjust that to whichever hours you want to be alerted on.
CASE WHEN CAST(MAX(udf_GetLocalTimeFromUTC([Last_Login_UTC], 1, ”)) AS TIME) BETWEEN ’00:00′ and ‘4:30’ THEN ‘Wee Hours’ ELSE ‘Daytime’ END
Filters
Now, create a Filter on your calculated field so that only “Wee Hours” items show and not “Daytime.” You may also want to change the member types that are being looked at.
Alert Setup
Finally, go to the Misc tab and set up your alert. You can set it to alert Hourly to make the alerts more timely but keep in mind that if there is an after hours login you’ll keep getting alerted every hour until they log on again at a normal time of day. Below, I have it set to alert once per day, right after the “wee hours” window.
Additional Resources
More information on working with UTC fields can be found in my earlier blog post on the subject.
Want to do more?
Do you want to do more of your own ConnectWise reporting in Report Writer, Power BI, or another reporting tool? Contact us for one-on-one help or connect with us on the ConnectWise subreddit or the ConnectWise University Forums.