Introduction
The Aura console provides basic monitoring capabilities, but external monitoring platforms offer advanced features like custom alerting, long-term metric retention, and integration with your broader infrastructure.
In this lesson, you will learn how to configure metrics integration with Prometheus and other monitoring tools.
Why External Monitoring?
External monitoring platforms enable you to combine Aura metrics with other system metrics in custom dashboards. This provides a unified view of your entire infrastructure alongside your Neo4j database performance.
Automated alerting notifies you when metrics exceed configured thresholds, allowing you to respond to issues proactively. You can also retain metrics beyond Aura’s retention period for historical analysis and capacity planning.
These platforms facilitate team collaboration through shared dashboards and integrate with incident management tools for streamlined operations.
Accessing Metrics Integration Settings
To configure metrics integration:
-
Navigate to your project in Aura
-
Click Settings in the project menu
-
Select Metrics Integration
You’ll see configuration options for scraping metrics from your Aura instances.
Metrics Endpoint
Aura provides a Prometheus-compatible metrics endpoint for each project.
Endpoint URL
The URL format:
Example:
Copy this URL from the Metrics Integration settings page.
Authentication
Metrics endpoints require OAuth2 authentication using credentials from your Aura settings. You’ll need a Client ID and Client Secret, both provided in the Metrics Integration settings page.
The token URL for authentication is https://api.neo4j.io/oauth/token.
Keep credentials secure
Your API credentials provide access to the Aura API for your entire organization.
Make sure to keep your client secret secure and never share it with anyone.
Prometheus Configuration
Prometheus is a popular open-source monitoring system.
Prometheus Job Configuration
Add this job to your Prometheus configuration:
Replace placeholders with your actual values from Aura settings.
Scrape Interval
Configure your scrape interval based on monitoring requirements. The recommended scrape interval is between 30 seconds and 2 minutes. A 30-second interval provides real-time monitoring, while a 1-minute interval works well for most standard monitoring needs.
For less critical monitoring, a 2-minute interval reduces load on both Prometheus and the metrics API. The metrics endpoint caches metrics for 30 seconds, so scraping more frequently provides no additional benefit.
Available Metrics
The endpoint exposes all Aura metrics including CPU usage, memory usage (heap and page cache), and storage metrics. You can also access query rates and latency, transaction metrics, connection metrics, and garbage collection statistics.
All metrics you’ve monitored in previous lessons are available through this endpoint.
Grafana Dashboards
Grafana is a popular visualization platform that works with Prometheus.
Setting Up Grafana
-
Install Grafana
-
Add Prometheus as a data source
-
Create dashboards or import Neo4j templates
Example Dashboard Panels
CPU Usage Panel:
Page Cache Hit Ratio:
Query Rate:
Creating Alerts
Set up automated alerts for critical conditions:
Many monitoring platforms support Prometheus-compatible endpoints. Datadog can scrape Prometheus endpoints using its Prometheus integration. New Relic supports Prometheus data through its OpenMetrics integration.
For AWS environments, you can use the Prometheus CloudWatch exporter to send Aura metrics to CloudWatch and configure alarms there.
Best Practices
-
Performance
-
Set appropriate scrape intervals between 30 seconds and 2 minutes for most use cases. Scraping more frequently than 30 seconds provides no benefit as the metrics endpoint caches data for 30 seconds.
-
Monitor your monitoring system’s resource usage to ensure it scales with your needs.
-
Alerting
-
Start with critical alerts only to avoid alert fatigue. Set appropriate thresholds based on your instance’s normal operating ranges.
-
Use alert grouping and suppression to reduce noise.
-
Include runbooks or remediation steps in alert descriptions to help responders take action quickly.
-
Dashboard Design
-
Group related metrics together in logical panels.
-
Use consistent time ranges across dashboards and add context with annotations for deployments or incidents.
-
Include threshold indicators to show when metrics approach warning or critical levels.
Troubleshooting
If you receive a 401 Unauthorized error, verify your client ID and secret are correctly configured in your Prometheus configuration. Also check that the token URL is set to https://api.neo4j.io/oauth/token and that your OAuth2 configuration follows proper YAML formatting.
When the metrics endpoint returns empty or no data appears, first verify the endpoint URL matches your Aura settings exactly. Increase the scrape timeout to at least 30 seconds and confirm your instance is running.
For intermittent scraping failures, increase your scrape timeout and check network connectivity between your monitoring system and Aura. Review any rate limits that might be affecting your requests.
Check Your Understanding
Authentication Method
What authentication method does the Aura metrics endpoint require?
-
❏ Basic authentication with username and password
-
✓ OAuth2 with client ID and secret
-
❏ API key authentication
-
❏ No authentication required
Hint
Check the Authentication section for the required credentials.
Solution
OAuth2 with client ID and secret is correct.
The Aura metrics endpoint requires OAuth2 authentication using a client ID and client secret generated in your Aura settings. The token URL is https://api.neo4j.io/oauth/token.
Basic authentication - Aura does not support basic authentication for the metrics endpoint. API key authentication - The endpoint uses OAuth2, not API keys. No authentication - Authentication is required to access metrics.
Summary
In this lesson, you learned how to integrate Aura metrics with external monitoring tools.
Aura provides a Prometheus-compatible metrics endpoint that you can integrate with external monitoring platforms like Prometheus and Grafana. The endpoint requires OAuth2 authentication using a client ID and secret from your Aura settings.
External monitoring enables custom dashboards, automated alerting, and long-term metric retention beyond what the Aura console provides. This allows you to monitor multiple instances, create custom alerts, and integrate Neo4j metrics with your broader infrastructure monitoring.
Congratulations! You’ve completed the Aura Administration course and are now equipped to effectively monitor and manage Neo4j Aura databases in production environments.