---
title: DO Query Actions
description: Execute SQL queries against databases and report success/failure
breadcrumbs: Docs > Integrations > DO Query Actions
---

# DO Query Actions
Supported OS Integration version1.1.0
{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="info" %}
To find out if this integration is available in your organization, see your [Datadog Integrations](https://app.datadoghq.com/integrations) page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [support@ddog-gov.com](mailto:support@ddog-gov.com).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

The DO Query Actions check executes SQL queries against PostgreSQL and reports success/failure metrics. This check is designed to receive configuration via Remote Config and execute queries on demand.

## Setup{% #setup %}

### Installation{% #installation %}

The DO Query Actions check is included in the Datadog Agent package.

### Configuration{% #configuration %}

1. Edit the `do_query_actions.d/conf.yaml` file in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting metrics. See the sample `do_query_actions.d/conf.yaml.example` for all available configuration options.

1. Restart the Agent.

### Validation{% #validation %}

Run the Agent's status subcommand and look for `do_query_actions` under the Checks section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **do\_query\_actions.query\_execution\_time**(gauge) | The time taken to execute the query.*Shown as second*                  |
| **do\_query\_actions.query\_status**(gauge)          | Indicates the query execution status. 1 for success and 0 for failure. |

### Service Checks{% #service-checks %}

No service checks are provided by this integration.

### Events{% #events %}

Query results are sent as events via the `do-query-results` event track type, containing query output, execution metadata, and entity information.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
