accounts_by_provideraccounts_by_workspaceaccounts_countaccounts_totalactive_controls_by_workspaceactive_controls_countalerts_totalcache_health_checkcontrols_summaryguardrails_control_alarm_countguardrails_control_alarm_total_countguardrails_control_alert_24_hours_countguardrails_control_alert_after_1_yearguardrails_control_alert_between_1_30_daysguardrails_control_alert_between_30_90_daysguardrails_control_alert_between_90_365_daysguardrails_control_alert_oldestguardrails_control_error_24_hours_countguardrails_control_error_after_1_yearguardrails_control_error_between_1_30_daysguardrails_control_error_between_30_90_daysguardrails_control_error_between_90_365_daysguardrails_control_error_countguardrails_control_error_oldestguardrails_control_error_total_countguardrails_control_invalid_24_hours_countguardrails_control_invalid_after_1_yearguardrails_control_invalid_between_1_30_daysguardrails_control_invalid_between_30_90_daysguardrails_control_invalid_between_90_365_daysguardrails_control_invalid_countguardrails_control_invalid_oldestguardrails_control_invalid_total_countguardrails_control_top_20_alertsinstalled_aws_mods_countinstalled_azure_mods_countinstalled_gcp_mods_countinstalled_mods_by_platformmod_auto_updatemod_health_benchmarkmod_installed_controls_errormod_installed_controls_error_listmod_process_monitor_benchmarkpolicies_summarypolicy_settings_totalresources_by_workspaceresources_countsmart_process_retentionsmart_retentionstacks_aggregatetype_installed_controls_errortype_installed_controls_error_listworkspace_account_detailworkspace_health_controlworkspace_statsworkspaces_count
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_querywhere 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: