feat(inspur): source-PRI timezone timeline, PPIN serial, NVMe fault storage status
Event ingestion now uses the source syslog PRI and an explicit-offset timezone timeline instead of assuming host-local time. CPU PPIN is exported as the source-backed CPU serial, and an active NVMe fault SEL event promotes the matching drive's storage status. See ADL-056, ADL-057. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
07c270cda2
commit
e7b8a8badc
+9
-2
@@ -164,6 +164,12 @@ func parseCPUInfo(text string, hw *models.HardwareConfig) {
|
||||
if strings.TrimSpace(hw.CPUs[idx].Status) == "" {
|
||||
hw.CPUs[idx].Status = status
|
||||
}
|
||||
if strings.TrimSpace(hw.CPUs[idx].PPIN) == "" {
|
||||
hw.CPUs[idx].PPIN = strings.TrimSpace(proc.PPIN)
|
||||
}
|
||||
if strings.TrimSpace(hw.CPUs[idx].SerialNumber) == "" {
|
||||
hw.CPUs[idx].SerialNumber = models.ResolveCPUSerialNumber("", proc.PPIN)
|
||||
}
|
||||
} else {
|
||||
hw.CPUs = append(hw.CPUs, models.CPU{
|
||||
Socket: proc.ProcID,
|
||||
@@ -176,7 +182,8 @@ func parseCPUInfo(text string, hw *models.HardwareConfig) {
|
||||
L2CacheKB: proc.L2Cache,
|
||||
L3CacheKB: proc.L3Cache,
|
||||
TDP: proc.TDP,
|
||||
PPIN: proc.PPIN,
|
||||
PPIN: strings.TrimSpace(proc.PPIN),
|
||||
SerialNumber: models.ResolveCPUSerialNumber("", proc.PPIN),
|
||||
Status: status,
|
||||
})
|
||||
}
|
||||
@@ -243,7 +250,7 @@ func parseMemoryInfo(text string, hw *models.HardwareConfig) {
|
||||
Slot: mem.MemModSlot,
|
||||
Location: mem.MemModSlot,
|
||||
// status=1 with a known serial/part is definitely present even if BMC reports size=0
|
||||
Present: mem.MemModStatus == 1 && (mem.MemModSize > 0 || strings.TrimSpace(mem.MemModSerial) != "" || strings.TrimSpace(mem.MemModPartNum) != ""),
|
||||
Present: mem.MemModStatus == 1 && (mem.MemModSize > 0 || strings.TrimSpace(mem.MemModSerial) != "" || strings.TrimSpace(mem.MemModPartNum) != ""),
|
||||
SizeMB: mem.MemModSize * 1024, // Convert GB to MB
|
||||
Type: mem.MemModType,
|
||||
Technology: strings.TrimSpace(mem.MemModTechnology),
|
||||
|
||||
Reference in New Issue
Block a user