Database metrics missing from OCI Monitoring dashboard after enabling custom namespace

We enabled a custom metric namespace in OCI Monitoring to track application-specific database metrics, and now our standard database metrics have disappeared from the monitoring dashboard. This is causing loss of visibility into database performance and health.

The custom namespace was set up to collect application-level metrics from our database using the OCI Monitoring API. After enabling it, the custom metrics appear correctly, but all the standard OCI database metrics (CPU utilization, storage, connections, etc.) are no longer visible on the dashboard.

We verified the database is still running and healthy, and the metrics are being collected (we can query them via CLI), but they don’t show up in the console dashboard anymore. The custom metric namespace configuration seems to have interfered with the default metric visibility.

Has anyone experienced this issue where custom metric namespaces affect standard OCI service metrics? I’m particularly concerned about the IAM policies for metrics and whether there’s a conflict in how the monitoring service is accessing different metric sources.

This sounds like a dashboard filtering issue rather than a metrics collection problem. When you added the custom namespace, did you update the dashboard query filters? OCI Monitoring dashboards can filter by namespace, and if your dashboard is now filtering only for the custom namespace, it won’t show the default OCI metrics.

Check your dashboard widget configurations - they might be set to show only metrics from your custom namespace instead of ‘all namespaces’ or the specific OCI service namespaces.

Let me provide a complete solution for restoring your metric visibility:

Root Cause: The issue isn’t that custom namespaces interfere with standard metrics - they coexist independently. What happened is your dashboard widgets were reconfigured (manually or automatically) to filter by the custom namespace, hiding the default OCI service metrics. This is a common mistake when first implementing custom metrics.

Solution Steps:

1. Understanding Custom Metric Namespace Setup Custom namespaces are isolated from OCI service namespaces:

  • Custom namespace: Your application metrics (e.g., custom_app_metrics)
  • OCI service namespace: Standard database metrics (e.g., oci_autonomous_database, oci_database)
  • These don’t conflict - they’re queried separately

2. OCI Monitoring Configuration - Dashboard Restructure

Navigate to Observability & Management → Monitoring → Dashboards → Your Dashboard

Create Widget for Standard Database Metrics:


Widget Type: Line Chart
Query:
  Namespace: oci_autonomous_database (or oci_database)
  Metric: CpuUtilization
  Interval: 1 minute
  Statistic: Mean
Dimensions:
  resourceId: <your-database-ocid>

Create Widget for Custom Application Metrics:


Widget Type: Line Chart
Query:
  Namespace: custom_app_metrics (your custom namespace)
  Metric: <your-custom-metric-name>
  Interval: 1 minute
  Statistic: Mean
Dimensions:
  resourceId: <your-resource-id>

3. Comprehensive Dashboard Layout: Organize your dashboard with clear sections:

Section 1: Standard Database Health (oci_autonomous_database namespace)

  • Widget 1: CPU Utilization
  • Widget 2: Storage Utilization
  • Widget 3: Current Connections
  • Widget 4: Failed Connections

Section 2: Custom Application Metrics (custom_app_metrics namespace)

  • Widget 5: Application Query Response Time
  • Widget 6: Transaction Volume
  • Widget 7: Custom Business Metrics

4. IAM Policy for Metrics Verification

Verify your monitoring group has proper permissions:


# Pseudocode - IAM Policy Structure:
1. Navigate to Identity → Policies → Your Monitoring Policy
2. Verify statements include:
   - Allow group MonitoringUsers to read metrics in tenancy
   - Allow group MonitoringUsers to read alarms in tenancy
   - Allow group MonitoringUsers to use metric-family in tenancy
3. Ensure policy is in root compartment or covers target compartments

If policies are too restrictive, add:


Allow group MonitoringUsers to read metrics in tenancy where any {
  request.namespace = 'oci_autonomous_database',
  request.namespace = 'oci_database',
  request.namespace = 'custom_app_metrics'
}

5. Verify Metrics Collection via CLI

Test that both metric types are being collected:

Standard OCI metrics:


oci monitoring metric-data summarize-metrics-data \
  --namespace oci_autonomous_database \
  --query-text "CpuUtilization[1m].mean()" \
  --compartment-id <compartment-ocid>

Custom metrics:


oci monitoring metric-data summarize-metrics-data \
  --namespace custom_app_metrics \
  --query-text "YourCustomMetric[1m].mean()" \
  --compartment-id <compartment-ocid>

If either query returns no data, the issue is collection, not visualization.

6. Troubleshooting Missing Standard Metrics

If standard OCI metrics still don’t appear:

Check metric namespace:


oci monitoring metric list \
  --compartment-id <compartment-ocid> \
  --namespace oci_autonomous_database

This lists all available metrics in the namespace.

Verify database is emitting metrics:

  • Database must be in AVAILABLE state
  • Metrics have 5-minute delay (standard collection interval)
  • Check database isn’t in a stopped or maintenance state

7. Dashboard Query Best Practices

Use MQL (Monitoring Query Language) for complex queries:


CpuUtilization[1m]{resourceId="<db-ocid>"}.mean()

Combine multiple metrics in one widget: Create separate widgets - you cannot mix namespaces in a single widget, but you can create composite dashboards with multiple widgets showing related metrics from different sources.

8. Alarm Configuration for Both Metric Types

Ensure alarms work for both:

Standard metric alarm:


# Pseudocode - Alarm Definition:
1. Create Alarm → Metric namespace: oci_autonomous_database
2. Metric: CpuUtilization
3. Trigger: Mean > 80% for 5 minutes
4. Destination: Your notification topic

Custom metric alarm:


# Pseudocode - Alarm Definition:
1. Create Alarm → Metric namespace: custom_app_metrics
2. Metric: YourCustomMetric
3. Trigger: Mean > threshold for duration
4. Destination: Your notification topic

9. Long-term Dashboard Management

Create dashboard templates:

  • Standard Database Health Dashboard (OCI metrics only)
  • Application Performance Dashboard (custom metrics only)
  • Unified Operations Dashboard (both metric types)

Use dashboard groups:

  • Group related dashboards by service or application
  • Share dashboards with appropriate teams
  • Export dashboard JSON for version control

Verification Checklist:

  • [ ] Can query standard OCI metrics via CLI
  • [ ] Can query custom metrics via CLI
  • [ ] Dashboard has separate widgets for each namespace
  • [ ] IAM policies allow reading both namespaces
  • [ ] All widgets show data (no “No data” messages)
  • [ ] Alarms configured for critical metrics in both namespaces

Common Mistakes to Avoid:

  • Don’t try to query multiple namespaces in one widget
  • Don’t use overly restrictive IAM policies that block namespace access
  • Don’t forget the 5-minute collection delay for OCI service metrics
  • Don’t mix custom and service namespaces in alarm queries

This comprehensive approach addresses all three focus areas: proper custom metric namespace setup with isolated collection, correct OCI Monitoring configuration with namespace-specific widgets, and appropriate IAM policies that grant access to both custom and service metric namespaces. Your monitoring visibility should be fully restored with both standard database metrics and custom application metrics visible on properly configured dashboards.

Good point. I checked the dashboard configuration and it does seem to be filtering by namespace. However, I’m not sure how to modify it to show both the custom namespace metrics and the standard OCI database metrics simultaneously. Can a single dashboard widget show metrics from multiple namespaces?

I reviewed the IAM policies and they do seem broad enough - we have read metrics permission at the tenancy level. So it’s likely a dashboard configuration issue. I’ll try creating separate widgets for each namespace and see if that resolves the visibility problem.