A software company analyst builds a CQL query to calculate the percentage of failed VPN logins per office, but the denominator includes routine health-check and disconnect events, making failure rates look artificially low. How should the analyst fix the query?
Select an answer to reveal the explanation.
Short Explanation
Calculating a failure rate across every VPN log type is like judging a store's sales conversion by counting everyone who walked past the window. You need to narrow to login-attempt categories/actions first, then you can use success/failure outcomes for your ratio so routine noise does not bury the signal.
Full Explanation
The accurate approach is to Filter to authentication-attempt event categories/actions, then use normalized success/failure outcomes for the numerator and denominator. Isolating actual authentication attempts ensures the denominator reflects real login tries rather than unrelated disconnect or keepalive records, producing an accurate failure percentage per office. Outcome alone is not an event-type selector: disconnect or health-check events can also have a success/failure outcome. Validate category/action/type in each source before computing the ratio. Choosing to Switch the time window from relative to absolute without changing which event types enter the calculation stabilizes the date range but leaves all the routine disconnect and health-check noise in the denominator. Choosing to Increase the maximum displayed row limit in the results table so more disconnect events appear only changes how many rows render on screen without correcting the aggregation math. Choosing to Remove the groupBy clause and inspect individual raw VPN log lines manually across all offices abandons summary analytics and cannot scale to multi-office ratio calculations. For an operational check, inspect a sample of raw parsed events for each office to confirm that only login-attempt events are included in both numerator and denominator.
Prefer to study offline? Printable PDF study book + test engine ($7.50, unofficial). These questions stay free here.