Increase JMESPath Query Character Limit
under review
L
Lamont Largie
Submitted By: Lamont Largie
- The Challenge
The current 2000-character limit on JMESPath queries in the Metric builder is a significant constraint for creating advanced, high-value metrics. As our team and our partners strive to "work smarter, not harder," we are building increasingly sophisticated queries that consolidate multiple data points into a single, actionable insight.
A prime example is our comprehensive "Windows 11 Compatibility" metric. This query checks all hardware and software requirements in one go and, more importantly, generates a human-readable list of specific reasons for non-compliance. This allows an MSP to see why a machine is incompatible without running multiple reports, saving significant time. However, due to the number of checks and the logic required to generate detailed error messages, this metric is at the absolute edge of the character limit, forcing us to abbreviate heavily and preventing further enhancements.
- Proposed Solution
We request that the maximum character limit for JMESPath queries be substantially increased, for instance, to 4,000 or 8,000 characters. A higher limit would remove the current ceiling on metric complexity and empower users to build more powerful and efficient reports.
- Business Value & Justification
Increasing this limit directly aligns with Liongard's core value proposition of providing deep data visibility and automation:
Drives Efficiency: It allows for the creation of "all-in-one" metrics that reduce the number of individual reports a technician needs to run and correlate. This saves time and reduces the chance of human error.
Enhances Actionability: Complex queries can provide more than just raw data; they can deliver contextual, actionable insights. Our Windows 11 metric is a perfect example—it doesn't just say "fail," it says "fail because RAM is too low and Secure Boot is off." This level of detail is what our partners need.
Unlocks New Use Cases: Many other complex scenarios (e.g., detailed security posture audits, comprehensive configuration change reports) are currently difficult or impossible to implement because the necessary query logic exceeds the character limit.
Reduces "Metric Sprawl": Without the ability to build comprehensive metrics, users are forced to create numerous smaller, single-purpose metrics, which can clutter the system and make it harder to manage.
- Use Case Example
The "Windows 11 Compatibility Metric with Error Details" (the query we've just finalized) is our primary use case. It showcases the desire to perform multiple conditional checks and concatenate custom strings—both of which consume characters rapidly. Allowing this query to be expanded would enable us to add even more value, such as checking for specific CPU models or providing more detailed remediation advice directly within the metric's output.
Thank you for your consideration. This enhancement would be a significant quality-of-life improvement and would be greatly appreciated by my team and the partners we support.
E
Eric Diaz
under review
E
Eric Diaz
Merged in a post:
Increase 1000 character jmespath metric limit?
M
Mike Boteler
I have a metric that's hit the character limit, I know it's a big ask because this could increase latency and whatever but thought I'd ask.
E
Eric Diaz
Merged in a post:
Either Increase Metric result limitations or increase Query character limit
A
Adam Overberg
I use a lot of raw data to build reports in Power BI, however I am running into an issue with larger M365 Tenants where my base metric: "Users[?userType!=
Guest
]" returns the error: 'Metric failed to evaluate. Please update this metric to have a valid query.'. I have been informed by support to try to decrease the results from my query, which using filters defeats the point and attempting to only return needed columns results in: 'data.Queries[0].Query should NOT be longer than 1000 characters'. I would like for either metrics to return everything or for there to be some way to use the Power BI integration to pull the full Data Print.