Skip to main content

An official website of the United States government

Here’s how you know

Logs and metrics

Cloud.gov Logs automatically ingests application logs, service logs, and telemetry from the platform.

This data supports observability, troubleshooting, and compliance reporting across the platform.

Index patterns

All logs are only available within the logs-app* index pattern.

All metrics are only available within the logs-metrics-* index pattern.

Application logs

Any logs emitted to STDOUT or STDERR by your application will be ingested automatically.

Common filters

Common filters for application log types:

PurposeFilter
Application logs only@source.type: APP
Staging logs@source.type: STG
Router request logs@source.type: RTR

Router logs

Fieldsdescription
rtr.*Request information, such as rtr.staus for the HTTP response status code
geoip.*Geolocation information for the request, such as the country name

Structured logging

If your application logs are emitted as JSON, their contents will be parsed into the app field, which is a flat_object field. You can query individual JSON keys using dot notation.

Example log:

{ "event": "login", "status": "success" }

Query:

app.event: "login" AND app.status: "success"

Some supported libraries to produce JSON logs include:

Audit events

Platform audit events record administrative actions such as app restarts, org creation, and credential updates.

FieldDescription
@typeAlways audit_event.
actor.*Information about the user or process performing the action.
target.*Resource acted upon.
typeAudit event category per Cloud Foundry spec.

To filter for all audit events:

@type: audit_event

To view specific event types:

type: audit.app.stop

Note: Cloud.gov Logs ingests audit events every 15 minutes, so there could be up to a 15-minute delay before any audit event logs appear in the system.

Brokered service logs

Currently available for brokered database services.

FieldDescription
cloudwatch_logs.log_typeAlways rds.
@cf.serviceSpecific database instance name

To filter for all brokered database logs:

cloudwatch_logs.log_type: rds

To filter for a specific database service:

@cf.service: <your-service>

Application metrics

All application metrics are derived from Diego container telemetry, excluding network byte counters (rx_bytes and tx_bytes).

MetricFieldUnit
CPU usagecontainermetric.cpu_percentagepercent
Disk usagecontainermetric.disk_bytesbytes
Disk quotacontainermetric.disk_bytes_quotabytes
Memory usagecontainermetric.memory_bytesbytes
Memory quotacontainermetric.memory_bytes_quotabytes

To filter for all application metrics:

@type: app_metric

To filter for a specific metric:

containermetric.name: cpu

Brokered service metrics

Cloud.gov Logs collects AWS CloudWatch metrics for brokered services.

S3 buckets

MetricFieldDescription
BucketSizeBytesmetric_nameTotal object size within bucket

To filter for S3 metrics:

@cf.service_offering: s3

RDS databases

MetricFieldDescription
CPUUtilizationmetric_namePercent of CPU used
DatabaseConnectionsmetric_nameNumber of active connections
FreeStorageSpacemetric_nameFree storage remaining
ReadLatency / WriteLatencymetric_nameLatency metrics for I/O operations

To filter for brokered database metrics:

@cf.service_offering: aws-rds

OpenSearch / Elasticsearch domains

MetricFieldDescription
CPUUtilization / MasterCPUUtilizationmetric_nameCPU usage
FreeStorageSpacemetric_nameRemaining storage
JVMMemoryPressure / MasterJVMMemoryPressuremetric_nameJVM heap utilization
OldGenJVMMemoryPressure / MasterOldGenJVMMemoryPressuremetric_namePercentage of JVM heap used for old generation
ThreadpoolSearchRejected / ThreadpoolWriteRejectedmetric_nameQueuing rejections
ThreadpoolSearchQueue / ThreadpoolWriteQueuemetric_nameInformation about queued tasks

See the AWS documentation for more precise definitions of these metrics.

To filter for OpenSearch/Elasticsearch metrics:

@cf.service_offering: aws-elasticsearch

ElastiCache clusters

MetricFieldDescription
BytesUsedForCachemetric_nameBytes used for cache storage
CacheHitRatemetric_nameCache hit rate percentage
DatabaseMemoryUsagePercentagemetric_nameDatabase memory usage as percentage
DatabaseCapacityUsagePercentagemetric_nameDatabase capacity usage as percentage
FreeableMemorymetric_nameAvailable freeable memory
MemoryFragmentationRatiometric_nameMemory fragmentation ratio
CPUUtilizationmetric_nameCPU utilization percentage
EngineCPUUtilizationmetric_nameEngine CPU utilization percentage

To filter for ElastiCache metrics:

@cf.service_offering: aws-elasticache-redis

Field reference

All logs and metrics

FieldDescription
@cf.org / @cf.org_idOrganization name and ID
@cf.space / @cf.space_idSpace name and ID

Application logs and metrics

FieldDescription
@cf.app / @cf.app_idApplication name and ID
@cf.app_instanceIndex of the application instance (e.g. 0)
@cf.process_idProcess ID
@cf.process_instance_idID of the application instance for the process
@cf.process_typeType of process (e.g. web)

Application metrics

FieldDescription
containermetric.nameMetric name
containermetric.unitUnit for metric (e.g. bytes)
containermetric.valueMetric value

Brokered service logs and metrics

FieldDescription
@cf.service_offeringService offering (e.g. aws-rds)
@cf.service_planService plan name
@cf.plan_idService plan ID
@cf.instance_idService instance ID
@cf.instanceService instance name
brokerName of broker for service

Brokered service metrics

FieldDescription
metric_nameMetric name (e.g. BucketSizeBytes)
metric.averageAverage metric value during collection period
metric.minMinimum metric value during collection period
metric.maxMax metric value during collection period
metric.countCount of metric measurements during collection period
metric.unitUnit of measure for metric
namespaceCloudWatch namespace for the metric

Brokered Elasticsearch/OpenSearch metric fields

FieldDescription
metric.domain_nameName of Elasticsearch/OpenSearch domain
metric.node_idID of the domain node for metric

Brokered database metric fields

FieldDescription
metric.db_instance_identifierRDS database identifier
metric.node_idID of the domain node for metric

Additional fields for FreeStorageSpace metrics:

FieldDescription
metric.db_sizeDatabase size in GB at collection time
metric.usage_percentagePercent of allocated storage used

S3 metric fields

FieldDescription
metric.storage_typeStorage class used by the S3 bucket

GSA.gov

An official website of the U.S. General Services Administration

Looking for U.S. government information and services?
Visit USA.gov