turbot/guardrails_insights

Query: policies_summary

Usage

powerpipe query guardrails_insights.query.policies_summary

Steampipe Tables

SQL

select
'Count' as "Policy Values",
sum((output -> 'total' -> 'metadata' -> 'stats' -> 'total')::int) as "Total",
sum((output -> 'error' -> 'metadata' -> 'stats' -> 'total')::int) as "Error",
sum((output -> 'invalid' -> 'metadata' -> 'stats' -> 'total')::int) as "Invalid",
sum((output -> 'tbd' -> 'metadata' -> 'stats' -> 'total')::int) as "TBD"
from
guardrails_query
where
query = '{
total: policyValues {
metadata {
stats {
total
}
}
}
error: policyValues(filter: "state:error") {
metadata {
stats {
total
}
}
}
invalid: policyValues(filter: "state:invalid") {
metadata {
stats {
total
}
}
}
tbd: policyValues(filter: "state:tbd timestamp:<=T-1h") {
metadata {
stats {
total
}
}
}
}';

Dashboards

The query is used in the dashboards: