Quick Start
Get up and running with LogAI in under 5 minutes.
Step 1: Create an Account
Sign up for a free trial at logai.fun/signup
Step 2: Get Your API Key
After signing in, navigate to Settings → API Keys to generate your key.
Step 3: Install the Agent
curl -sSL https://get.logai.fun/install.sh | bash
Installation
Using Docker
docker run -d \
--name logai-agent \
-e LOGAI_API_KEY=your_api_key \
-v /var/log:/var/log:ro \
logai/agent:latest
Using Kubernetes
kubectl apply -f https://get.logai.fun/k8s/agent.yaml
Using npm
npm install @logai/agent
# or
yarn add @logai/agent
Configuration
Configure the LogAI agent using environment variables or a config file.
Environment Variables
LOGAI_API_KEY=your_api_key
LOGAI_REGION=us-east-1
LOGAI_LOG_LEVEL=info
LOGAI_BATCH_SIZE=1000
Config File (logai.yaml)
api_key: your_api_key
region: us-east-1
log_level: info
batch_size: 1000
filters:
- pattern: "ERROR"
- pattern: "WARN"
Kubernetes Integration
Deploy LogAI as a DaemonSet to collect logs from all nodes.
Prerequisites
- Kubernetes 1.19+
- kubectl configured
- LogAI API key
Deployment
# Create secret with API key
kubectl create secret generic logai-secret \
--from-literal=api-key=your_api_key
# Deploy agent
kubectl apply -f https://get.logai.fun/k8s/agent.yaml
Docker Integration
Collect logs from Docker containers automatically.
docker run -d \
--name logai-agent \
-e LOGAI_API_KEY=your_api_key \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /var/lib/docker/containers:/var/lib/docker/containers:ro \
logai/agent:latest
Cloud Platform Integration
AWS CloudWatch
aws logs create-subscription-filter \
--log-group-name /aws/lambda/my-function \
--filter-name logai-filter \
--filter-pattern "" \
--destination-arn arn:aws:lambda:region:account:function:logai-forwarder
Google Cloud Logging
gcloud logging sinks create logai-sink \
pubsub.googleapis.com/projects/PROJECT_ID/topics/logai-topic \
--log-filter='resource.type="gce_instance"'
Azure Monitor
az monitor diagnostic-settings create \
--resource /subscriptions/SUB_ID/resourceGroups/RG/providers/Microsoft.Compute/virtualMachines/VM \
--name logai-diagnostic \
--logs '[{"category": "Administrative","enabled": true}]'
Pattern Detection
LogAI automatically detects patterns in your logs using machine learning.
How It Works
- Logs are ingested and parsed
- ML models identify recurring patterns
- Anomalies are flagged in real-time
- Patterns are grouped and visualized
Custom Patterns
Define custom patterns using regex or Grok patterns:
patterns:
- name: "API Error"
pattern: "API request failed: (?<error_code>\\d+)"
severity: "high"
- name: "Slow Query"
pattern: "Query took (?<duration>\\d+)ms"
threshold: 1000
Alerting
Set up intelligent alerts to notify your team of critical issues.
Alert Channels
- Slack
- PagerDuty
- Webhooks
Creating an Alert
curl -X POST https://api.logai.fun/v1/alerts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "High Error Rate",
"condition": "error_rate > 10",
"channels": ["slack", "email"],
"severity": "critical"
}'
Dashboards
Create custom dashboards to visualize your log data.
Dashboard Types
- Time series charts
- Log volume graphs
- Error rate trends
- Pattern distribution
- Custom metrics
REST API
Integrate LogAI into your applications using our REST API.
Authentication
curl https://api.logai.fun/v1/logs \
-H "Authorization: Bearer YOUR_API_KEY"
Send Logs
POST /v1/logs
{
"timestamp": "2026-01-31T10:00:00Z",
"level": "error",
"message": "Database connection failed",
"metadata": {
"service": "api",
"host": "server-01"
}
}
Query Logs
GET /v1/logs?query=level:error&from=2026-01-30&to=2026-01-31
SDKs
Use our official SDKs for seamless integration.
Node.js
const LogAI = require('@logai/node');
const logger = new LogAI({
apiKey: 'your_api_key'
});
logger.error('Something went wrong', {
userId: '12345',
action: 'checkout'
});
Python
from logai import LogAI
logger = LogAI(api_key='your_api_key')
logger.error('Something went wrong', {
'user_id': '12345',
'action': 'checkout'
})
Go
import "github.com/logai/go-sdk"
logger := logai.New("your_api_key")
logger.Error("Something went wrong", map[string]interface{}{
"userId": "12345",
"action": "checkout",
})