Documentation
Everything you need to get started with Sonar FinOps monitoring.
Quick Start
Get up and running with Sonar in under 2 minutes. Follow these simple steps to start monitoring your AWS and OpenAI costs in real-time.
Step 1: Sign Up
Create your account at getsonar.dev. No credit card required.
Step 2: Connect AWS
Navigate to Settings → API Keys and add your AWS credentials. We'll guide you through the IAM setup.
⚡ Setup takes less than 2 minutes. We only need read-only permissions.
Step 3: Connect OpenAI (Optional)
Add your OpenAI API key in Settings → API Keys to track AI usage and costs.
You're all set!
Your dashboard will start showing real-time cost data within seconds. No configuration needed.
Connecting AWS
Connect your AWS account to start monitoring costs in real-time. Sonar uses read-only permissions, so your infrastructure remains secure.
Prerequisites
- An AWS account with billing enabled
- Access to create IAM users/roles (or ask your AWS admin)
- Your AWS Access Key ID and Secret Access Key
Connection Steps
- Navigate to Settings
Go to Dashboard → Settings → API Keys tab
- Click "Connect AWS Account"
This opens the AWS connection wizard
- Follow the IAM Setup
We'll show you exactly which permissions to grant
- Enter Your Credentials
Add your AWS Access Key ID and Secret Access Key
- Start Monitoring
Your dashboard will update automatically within seconds
⚠️ Security Note
Sonar only requests read-only permissions. We never modify, create, or delete any AWS resources. Your credentials are encrypted and stored securely.
IAM Setup
Sonar needs specific IAM permissions to read cost and usage data. Here's the exact policy you need.
Required IAM Policy
Create a new IAM user or attach this policy to an existing user. Then generate Access Keys for that user.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ce:GetCostAndUsage",
"ce:GetDimensionValues",
"ce:GetUsageReport",
"cloudwatch:GetMetricStatistics",
"cloudwatch:ListMetrics"
],
"Resource": "*"
}
]
}Step-by-Step IAM Setup
1. Create IAM User
- Go to AWS Console → IAM → Users
- Click "Create user"
- Name it "sonar-monitoring" (or any name you prefer)
- Click "Next" without selecting any policies yet
2. Attach Policy
- Click "Add permissions" → "Create inline policy"
- Switch to JSON tab
- Paste the policy above
- Name it "SonarReadOnly" and save
3. Generate Access Keys
- Go to the "Security credentials" tab
- Click "Create access key"
- Select "Application running outside AWS"
- Copy both Access Key ID and Secret Access Key
- ⚠️ Save these immediately - you won't see the secret again!
✅ Quick Test
After adding credentials in Sonar, check your dashboard. If you see cost data, everything is working correctly!
OpenAI Setup
Connect your OpenAI account to track API usage, token consumption, and model costs in real-time.
Getting Your API Key
- Go to OpenAI Platform → API Keys
- Click "Create new secret key"
- Give it a name (e.g., "Sonar Monitoring")
- Copy the key immediately - you won't see it again
Adding to Sonar
- Navigate to Settings
Dashboard → Settings → API Keys tab
- Paste Your API Key
Enter the key in the "OpenAI API Key" field
- Save
Click "Save API Keys" - we'll start tracking immediately
What We Track
- API calls per endpoint and model
- Token usage (prompt + completion)
- Cost per request and model
- Usage trends and anomalies
🔒 Security
Your API key is encrypted at rest and only used to read usage data. We never make API calls on your behalf.
Creating Alerts
Set up alerts to get notified when costs spike, anomalies are detected, or budgets are exceeded. Never be surprised by your cloud bill again.
Setting Up Your First Alert
- Go to Settings
Dashboard → Settings → Alerts & Notifications section
- Click "Create Alert"
Choose from AWS Cost Spike, AI Usage Anomaly, or Budget Warning
- Set Your Threshold
Enter the amount (e.g., $500) that triggers the alert
- Configure Cooldown
Set how often you want to be notified (e.g., once per hour)
- Choose Notification Channel
Email notifications are enabled by default. Slack integration coming soon.
Alert Types
AWS Cost Spike
Triggers when your daily AWS spend exceeds the threshold. Perfect for catching runaway instances or unexpected usage.
AI Usage Anomaly
Detects unusual patterns in OpenAI API usage (e.g., 10x increase in calls). Helps identify bugs or inefficient code.
Budget Warning
Warns when you're approaching your monthly budget limit (e.g., 80% of $10K). Prevents overspending.
💡 Best Practices
- Start with a higher threshold and adjust based on your actual usage
- Set cooldowns to avoid alert fatigue (1-4 hours recommended)
- Create separate alerts for different environments (prod vs staging)
- Review alert history regularly to fine-tune thresholds
Data Privacy
Your data security and privacy are our top priorities. Here's how we handle your information.
What We Store
- Cost data: Aggregated spending metrics from AWS Cost Explorer and CloudWatch
- Usage data: API call counts, token usage, and model information from OpenAI
- Credentials: Encrypted AWS keys and OpenAI API keys (AES-256 encryption)
- User data: Email, name, and subscription information
What We Never Store
- Raw AWS resource names or identifiers
- OpenAI prompt or completion content
- Personal data beyond what's necessary for the service
- Payment card details (handled by Stripe)
Security Measures
- Encryption at rest: All data encrypted with AES-256
- Encryption in transit: TLS 1.3 for all connections
- Access control: Row-level security (RLS) in Supabase
- Read-only permissions: AWS credentials only have read access
- Regular audits: Security reviews and penetration testing
Your Rights
Under GDPR and CCPA, you have the right to:
- Access your personal data
- Request deletion of your data
- Export your data in a portable format
- Opt out of data processing
To exercise these rights, contact us at hello@getsonar.dev
🔒 Data Retention
Cost and usage data is retained for 30 days on Pro plans and 90 days on Scale plans. You can request immediate deletion at any time.
For more details, see our Privacy Policy.