Panther API user data for measuring ingestion and alert metrics
Overview
The Panther API provides the following user metric operations:
Total number of bytes and events that Panther ingested and/or processed over a specific time period
Breakdown of alerts that were generated for each Severity type over a specific time period
You can invoke Panther's API by using your Console's API Playground, or the GraphQL-over-HTTP API. Learn more about these methods on Panther API.
See the sections below for GraphQL queries, mutations, and end-to-end workflow examples around core metrics operations.
Common metrics operations
Below are some of the most common GraphQL metrics operations in Panther. These examples demonstrate the documents you have to send using a GraphQL client (or curl) to make a call to Panther's GraphQL API.
Metrics Query
# `GetMetrics` is a nickname for the operation. You can omit any of the # fields/info you're not interested in & only query for what you're afterqueryGetMetrics { metrics(input: { fromDate: "2021-01-01T00:00:00Z"toDate: "2021-12-31T23:59:59Z" }) { alertsPerSeverity { label value breakdown } alertsPerRule { label value entityId } eventsProcessedPerLogType { label value breakdown } bytesProcessedPerSource { label value breakdown } latencyPerLogType { label value } bytesIngestedPerSource { label value } bytesQueriedPerSource { label value breakdown } totalAlerts totalBytesIngested totalBytesProcessed totalBytesQueried totalEventsProcessed }}
The breakdown field is only useful for charts that use time as their X-axis. It produces a map of timestamps -> values as a "breakdown" of the value field to its constituents.
End-to-end examples
Below, we build on the operations from the Common Operations examples to showcase an end-to-end use case flow.