Skip to main content

Agent monitoring and privacy

Data privacy and security

What DBtune collects

The agent collects only the metrics necessary for performance optimization:

  • Performance metrics - Query runtime, throughput, cache hit ratios
  • System metrics - CPU utilization, memory usage, I/O statistics
  • Database statistics - Connection counts, wait events, vacuum activity
  • Configuration parameters - Current database configuration settings
  • Hardware information - CPU count, memory size, disk type, instance type

All collected data consists of numeric metrics, system statistics and obfuscated query text for query indentification on our platform.

Query text

Query text collection is optional and a user can control its inclusion by using the environment variable DBT_POSTGRESQL_INCLUDE_QUERIES of their dbtune-agent.

If this is enabled, information about your table names may be collected as per pg_stat_statements.query. Please refer to the PostgreSQL documentation for more on what is included in the query field.

Your query text is not used for optimization purposes, and its primary purpose is to allow you to identify queries for use in a Workload Fingerprint. DBtune can function without access to query text, although your user experience using our platform may be hindered. If this is the case, we provide a query_id which can be correlated with pg_stat_statements manually to identify queries.

note

If you've previously enabled this feature and then disabled it, your old query text is still retained. Please reach out to support@dbtune.com if you wish to have all of your obfuscated query text data deleted.

What DBtune does NOT collect

The DBtune agent is designed with privacy as a core principle. It never accesses or transmits:

  • Database contents - No table data, row contents, or stored values
  • Query parameters - Obfuscated by pg_stat_statements or disabled entirely via DBT_POSTGRESQL_INCLUDE_QUERIES
  • Credentials - No passwords, API keys, or authentication tokens
  • Personal data - No user information or identifiable data

Detailed metrics collected

The DBtune agent collects system and database metrics at regular intervals to optimize your database configuration.

System monitoring (posted every 5 seconds)

Below is the data DBtune collects and sends to the DBtune server every 5 seconds:

Collected data
CategorySubcategory
CPU statscpu_util
Memory statsfree
slab
used
total
active
cached
shared
buffers
percent
inactive
available
IO statsbusy_time
read_time
read_bytes
read_count
write_time
write_bytes
write_count
read_merged_count
write_merged_count
DB StatsThroughput
Query runtime

System information (posted every minute)

In less frequent intervals DBtune fetches the following data to understand the specifications of the system:

Collected data
CategorySubcategory
HardwareNumber of CPUs
Total memory
Available memory
Cloud provider
Instance type
Disk type
SoftwareDatabase version
Operating system type
Maximum connections
Database size

Platform specific monitoring

Different hosting platforms provide metrics through different APIs and monitoring systems. Check your database-specific documentation for details:

  • Self-hosted PostgreSQL - Collects detailed system metrics directly from the host
  • AWS RDS/Aurora - Uses CloudWatch and Performance Insights APIs
  • Google Cloud SQL - Uses GCP Monitoring API
  • Aiven - Uses the metric API from Aiven (30-second resolution)

Collection frequency

  • Standard interval: Metrics are collected every 5 seconds for most platforms
  • Aiven: Metrics are collected every 30 seconds (due to API limitations)
  • System information: Hardware and configuration details are collected every minute

Data transmission

All data is transmitted securely to the DBtune server using encrypted HTTPS connections. The agent authenticates using your API key, which should be kept secure and rotated regularly.

Additional information

For a complete list of all metrics collected, including technical details about specific system tables and statistics views, visit the DBtune collected metrics public documentation.

For information about how specific tuning targets are computed, see our tuning targets page.

Compliance and trust

  • Open source agent - The agent code is publicly available at github.com/dbtuneai/dbtune-agent
  • Transparent collection - You can audit exactly what data is collected by reviewing the source code
  • Network isolation - The agent runs within your network and only transmits metrics to the DBtune server
  • Production safety - The agent includes guardrails to prevent unsafe configurations (e.g., memory usage thresholds)