Integration with AWS EC2
This guide provides step-by-step instructions to integrate AWS EC2 with OpenObserve.
Overview
Stream system metrics and logs from EC2 Linux instances to OpenObserve using the OpenObserve Collector (based on OpenTelemetry).
Steps to Integrate
Prerequisites
- OpenObserve account (Cloud or Self-Hosted)
- AWS EC2 Linux instance with SSH access
Step 1: Connect to EC2 Instance
Step 2: Install OpenObserve Collector
- In OpenObserve: Data Sources → Linux → Copy curl command
- Execute the command on your EC2 instance.
Step 3: Configure the OpenTelemetry Collector
The OpenObserve Collector is pre-configured during installation, but you can customize it for your specific needs.
- View the current configuration:
- To include additional log files, modify the
filelog
receiver: - Restart the collector:
Step 4: Generate Test Data (Optional)
Run stress-ng
or logger
to create test metrics and logs if needed:
Step 5: Verify Ingestion
Logs:
Go to Logs in Openobserve → select stream → set time range → Run Query to check for EC2 logs.
Metrics
Go to Metrics in Openobserve → select stream → set time range → Run Query to check for EC2 metrics.
Troubleshooting
Otel Misconfiguration Issues
- If you're not seeing logs or metrics in OpenObserve, check the collector logs for errors:
- Look for issues such as misconfigurations, permission problems, or connectivity errors.
File Permission Issues
The collector may encounter "permission denied" errors when trying to access specific system logs:
- Check the permissions of the log files:
sudo ls -l /var/log/
- If you see permission issues, update the permissions:
Restart the Collector Service
- After making configuration changes or adjusting file permissions, restart the collector:
sudo systemctl restart otel-collector
- Verify that the collector is running without issues:
sudo systemctl status otel-collector
No Data Appearing in OpenObserve
- Verify that the OpenObserve endpoint and authentication token are correct in the configuration file.
- Check that the EC2 instance has internet connectivity to reach the OpenObserve API.
- Ensure the collector service is running and not reporting any errors in the logs.
- Verify that the log files specified in the configuration exist and are readable by the collector.