Add LOGPile BMC diagnostic log analyzer

Features:
- Modular parser architecture for vendor-specific formats
- Inspur/Kaytus parser supporting asset.json, devicefrusdr.log,
  component.log, idl.log, and syslog files
- PCI Vendor/Device ID lookup for hardware identification
- Web interface with tabs: Events, Sensors, Config, Serials, Firmware
- Server specification summary with component grouping
- Export to CSV, JSON, TXT formats
- BMC alarm parsing from IDL logs (memory errors, PSU events, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-25 04:11:23 +03:00
parent fb800216f1
commit 512957545a
29 changed files with 4086 additions and 1 deletions

46
cmd/logpile/main.go Normal file
View File

@@ -0,0 +1,46 @@
package main
import (
"flag"
"fmt"
"log"
"os"
"git.mchus.pro/mchus/logpile/internal/parser"
_ "git.mchus.pro/mchus/logpile/internal/parser/vendors" // Register all vendor parsers
"git.mchus.pro/mchus/logpile/internal/server"
"git.mchus.pro/mchus/logpile/web"
)
var (
version = "dev"
commit = "none"
)
func main() {
port := flag.Int("port", 8080, "HTTP server port")
file := flag.String("file", "", "Pre-load archive file")
showVersion := flag.Bool("version", false, "Show version")
flag.Parse()
if *showVersion {
fmt.Printf("LOGPile %s (commit: %s)\n", version, commit)
os.Exit(0)
}
// Set embedded web files
server.WebFS = web.FS
cfg := server.Config{
Port: *port,
PreloadFile: *file,
}
srv := server.New(cfg)
log.Printf("LOGPile starting on http://localhost:%d", *port)
log.Printf("Registered parsers: %v", parser.ListParsers())
if err := srv.Run(); err != nil {
log.Fatalf("Server error: %v", err)
}
}