In June of last year I threw together a monitoring solution for a very weird problem. This afternoon I fixed a glaring hole in my solution which prevented the value comparison script from ever, ever working properly.
The problem: Agents (managed computers) are wandering from client to client in ConnectWise Automate. Techs claim not to be moving agents around, and I believe them because this isn’t the sort of thing you can “oops!” and screw up with one wrong mouse click. It takes deliberate effort… and none of us are that bored. This might be merely a nuisance except that it’s also causing billing errors, with clients looking at their detailed invoice and asking, “What’s ComputerXYZ doing here? That’s not mine!”
The solution: A new custom data field on each computer logging the current Location identification number of that computer, populated initially by a one-time script. Every Client (customer) in the system contains one or more Locations (organizational units). Locations have display names but also identification numbers, which is good because most clients’ Locations are some variant of “Main Office.” Every night, a script runs which compares the computer’s current Location ID to the one “on file,” and emails me if there’s a discrepancy.
Easy peasy. It took me all of maybe 90 minutes to throw this together. And yet. It didn’t work, because I overlooked a value field in an “IF” check in the comparison script.
The lesson, here? Test everything, even if you’re doing something you’ve done dozens of times before, even if you think “I can do this in my sleep.” Had I checked the results just a bit more thoroughly after the solution went “live” I’d have caught the problem. Instead, I found out after months of frustration, wondering why the monitoring hadn’t ever caught anything. (And the “anything” is still definitely happening so it should have been caught!)