HertzBeat AI Agent User Guide
HertzBeat AI Agent is an intelligent monitoring AI Agent that helps you manage monitors, configure alerts, and optimize your infrastructure monitoring through natural language conversation.
Overview
The HertzBeat AI Agent feature provides an interactive chat interface where you can:
Monitor Management:
- 🔍 Query and filter existing monitors by status, type, host, and labels
- ➕ Add new monitors for websites, APIs, databases, and services
- 📊 Get detailed information about available monitor types and their parameters
- ⚡ Check monitor status and troubleshoot monitoring issues
Alert Management:
- 🚨 Query active alerts with comprehensive filtering (type, status, search)
- 📈 Get alert summary statistics and distribution
- 🔔 View both single and grouped alerts
- 📋 Analyze alert patterns and trends
Metrics Analysis:
- 📊 Retrieve real-time metrics data for any monitor
- 📈 Access historical metrics with customizable time ranges
- 💾 Check warehouse storage system status
- 🔍 Query specific metric fields and labels
Alert Rule Management:
- ⚙️ Configure alert rules and thresholds
- 📝 Manage alert definitions for different monitor types
- 🎯 Set up custom alerting criteria
Prerequisites
Before using the AI Agent, ensure:
1 OpenAI Configuration: Valid OpenAI API key must be configured. Optionally, you can change the model in application.yml under spring.ai.openai.chat.options.model (default is gpt-4.1-nano).
2 Database Connection: HertzBeat database must be accessible for monitor operations
Configuration
OpenAI API Key Setup
The AI Agent uses OpenAI's GPT models. You need to configure an OpenAI API key in this ways:
Database Configuration via UI
- Navigate to the AI Agent interface
- If no API key is configured, you'll see a configuration dialog
- Enter your OpenAI API key
- Click Save Configuration
Configuration Priority
- Database configuration takes priority over YAML configuration
- Configuration changes are applied immediately without restart
- Invalid API keys are automatically validated before saving
Using the AI Agent
Accessing the Chat Interface
- Navigate to the AI Agent section in HertzBeat web interface
- You'll see the HertzBeat Monitoring AI Agent welcome screen
- Start typing your questions in the chat input field
Sample Conversations
Adding a New Monitor
You: Add a new HTTP monitor for my website https://example.com
AI Agent: I'll help you add an HTTP monitor for https://example.com.
Let me create that monitor with the following configuration:
- Name: example.com Website Monitor
- Type: HTTP
- Host: example.com
- Port: 443 (HTTPS)
- Path: /
- Interval: 60 seconds
Monitor created successfully with ID: 12345
Listing Existing Monitors
You: Show me all my current monitors
AI Agent: Here are your current monitors:
1. **Linux Server** (ID: 1001)
- Status: ✅ Online
- Host: 192.168.1.100
- Last Check: 2 minutes ago
2. **MySQL Database** (ID: 1002)
- Status: ⚠️ Warning
- Host: db.example.com
- Last Check: 30 seconds ago
3. **Website Monitor** (ID: 1003)
- Status: ✅ Online
- Host: https://example.com
- Last Check: 1 minute ago
Would you like details on any specific monitor?
Getting Monitor Type Information
You: What parameters do I need to monitor a PostgreSQL database?
AI Agent: To monitor a PostgreSQL database, you'll need these parameters:
**Required Parameters:**
- **Host**: Database server IP/hostname
- **Port**: PostgreSQL port (default: 5432)
- **Database**: Database name to connect to
- **Username**: Database username
- **Password**: Database password
**Optional Parameters:**
- **Timeout**: Connection timeout (default: 6000ms)
- **Query Timeout**: SQL query timeout (default: 3000ms)
- **SSL**: Enable SSL connection (default: false)
Would you like me to help you add a PostgreSQL monitor?
Alert Management
You: Show me all critical alerts from the last 24 hours
AI Agent: Here are the critical alerts from the last 24 hours: