Add debug logging for interval values in monitor creation
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:
Debian
2026-01-05 20:26:10 +00:00
parent 7ecb6e396e
commit a65997a391
2 changed files with 21 additions and 0 deletions

View File

@@ -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(