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:
30
internal/parser/interface.go
Normal file
30
internal/parser/interface.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"git.mchus.pro/mchus/logpile/internal/models"
|
||||
)
|
||||
|
||||
// VendorParser interface for vendor-specific parsers
|
||||
type VendorParser interface {
|
||||
// Name returns human-readable parser name
|
||||
Name() string
|
||||
|
||||
// Vendor returns vendor identifier (e.g., "inspur", "supermicro", "dell")
|
||||
Vendor() string
|
||||
|
||||
// Detect checks if this parser can handle the given files
|
||||
// Returns confidence score 0-100 (0 = cannot parse, 100 = definitely this format)
|
||||
Detect(files []ExtractedFile) int
|
||||
|
||||
// Parse parses the extracted files and returns analysis result
|
||||
Parse(files []ExtractedFile) (*models.AnalysisResult, error)
|
||||
}
|
||||
|
||||
// FileParser interface for parsing specific file types within vendor module
|
||||
type FileParser interface {
|
||||
// CanParse checks if this parser can handle the file
|
||||
CanParse(file ExtractedFile) bool
|
||||
|
||||
// Parse parses the file content
|
||||
Parse(content []byte) error
|
||||
}
|
||||
Reference in New Issue
Block a user