Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Ask the analyzer to capture service control + key files

rcourtmanbc864074d6e1
diff --git a/internal/servicediscovery/service.go b/internal/servicediscovery/service.go
index fc070ddbc2..2009db05bf 100644
--- a/internal/servicediscovery/service.go
+++ b/internal/servicediscovery/service.go
@@ -2593,6 +2593,7 @@ Based on all available information, determine:
6. What ports are in use?
7. Any special hardware (GPU, TPU, etc.)?
8. Any dependencies (databases, message queues, etc.)?
+9. How is the service managed — what restarts or reloads it (systemd unit, or container restart)?
Respond in this exact JSON format:
{
@@ -2616,6 +2617,8 @@ Important:
- Extract version numbers from package lists, process output, or config files
- Identify config and data paths from mount points and file listings
- Identify log paths (e.g., /var/log/, application-specific logs) for troubleshooting
+- In config_paths, include the specific key files a user edits (e.g. configuration.yaml, automations.yaml, postgresql.conf), not just the parent config directory
+- Capture how the service is managed as a fact with category "service" (e.g. the systemd unit "home-assistant.service", or a reload command) so it can be restarted or reloaded
- Note any special hardware like Coral TPU, NVIDIA GPU
- For LXC/VM, the CLI access should use pct exec or qm guest exec
- For Docker, use docker exec
diff --git a/internal/servicediscovery/service_test.go b/internal/servicediscovery/service_test.go
index 1462b209f0..0b04478223 100644
--- a/internal/servicediscovery/service_test.go
+++ b/internal/servicediscovery/service_test.go
@@ -1116,6 +1116,14 @@ func TestService_PromptsAndDiscoveryLoop(t *testing.T) {
if !strings.Contains(deepPrompt, "Limit output to at most 12 facts") {
t.Fatalf("expected deep prompt to limit response size")
}
+ // The analyzer must capture what the context pack now surfaces (iter 5):
+ // how to restart/reload the service, and the specific key files a user edits.
+ if !strings.Contains(deepPrompt, "systemd unit") {
+ t.Fatalf("expected deep prompt to ask how the service is restarted/reloaded")
+ }
+ if !strings.Contains(deepPrompt, "specific key files") {
+ t.Fatalf("expected deep prompt to ask for specific key files, not just config dirs")
+ }
hostPrompt := service.buildDeepAnalysisPrompt(AIAnalysisRequest{
ResourceType: ResourceTypeAgent,