Add debug logging for interval values in monitor creation
All checks were successful
Build and Push Container / build (push) Successful in 34s
All checks were successful
Build and Push Container / build (push) Successful in 34s
This helps trace the interval values at each step: - Claude agent logs what interval it suggested - Monitor service logs the interval when creating and deploying 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
import logging
|
||||
from typing import Optional
|
||||
from dataclasses import dataclass
|
||||
|
||||
@@ -6,6 +7,8 @@ from anthropic import Anthropic
|
||||
|
||||
from config import get_config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
SYSTEM_PROMPT = """You are an intelligent monitoring configuration assistant for Uptime Kuma. Your role is to analyze system information from hosts and recommend what should be monitored.
|
||||
|
||||
@@ -270,6 +273,13 @@ Respond with JSON as specified in your instructions."""
|
||||
)
|
||||
)
|
||||
|
||||
# Log what Claude suggested
|
||||
for mon in monitors:
|
||||
logger.info(
|
||||
f"Claude suggested monitor: {mon.name}, type={mon.type}, "
|
||||
f"interval={mon.interval}s, push_metric={mon.push_metric}"
|
||||
)
|
||||
|
||||
commands = []
|
||||
for c in data.get("additional_commands", []):
|
||||
commands.append(
|
||||
|
||||
Reference in New Issue
Block a user