Eu tenho essa loja em uma variável
sCellEventTrap-03-28 TRAP-TYPE -- CAC Code: 00
ENTERPRISE compaq
VARIABLES { scellNameDateTime,
scellSWComponent,
scellECode,
scellCAC,
scellEIP}
DESCRIPTION
"Severity: Normal -- informational in nature. A physical disk drive has experienced an ID block inconsistency during a periodic drive check."
--#TYPE "StorageCell Event"
--#SUMMARY "SCellName-TimeDate %s : SWCID %d : ECode: %d : CAC %d : EIP %d."
--#ARGUMENTS {0,1,2,3,4,}
--#SEVERITY INFORMATIONAL
--#TIMEINDEX 136
--#STATE WARNING
::= 13600808
Eu devo cortar tudo até a segunda ocorrência de "
. Então isso me daria:
sCellEventTrap-03-28 TRAP-TYPE -- CAC Code: 00
ENTERPRISE compaq
VARIABLES { scellNameDateTime,
scellSWComponent,
scellECode,
scellCAC,
scellEIP}
DESCRIPTION
"Severity: Normal -- informational in nature. A physical disk drive has experienced an ID block inconsistency during a periodic drive check."
Outro exemplo
genericSanEvent TRAP-TYPE
ENTERPRISE hpSanManager
VARIABLES { severityLevel, category, id,
msgString, contactName, contactEmail,
contactWorkPhone, contactHomePhone,
contactPager, contactFax }
DESCRIPTION
"A generic SAN event has occurred. The variables are:
severityLevel - the event severity level;
category - Category of the event being reported;
code - ID of the event in the given category;
msgString - the message string describing
the event;
contactName - the name of the individual
to be notified of the event;
contactEmail - the e-mail address of the
individual referred to in contactName;
contactWorkPhone - the work phone number
of the individual referred to in
contactName;
contactHomePhone - the home phone number
of the individual referred to in
contactName;
contactPager - the pager number of the
individual referred to in contactName;
contactFax - the FAX number of the individual
referred to in contactName"
-- The following are attributes used by xnmloadmib for improved formatting
--#TYPE "OV SAM SAN Event"
--#SUMMARY "OV SAM SAN Event, Category/Id: %d/%d, Msg: %d Severity: %d Contact: %d"
--#ARGUMENTS {1,2,3,0,4}
--#SEVERITY CRITICAL
--#GENERIC 6
--#CATEGORY "Application Alert Events"
--#SOURCE_ID "T"
::= 1
A saída para este exemplo deve ser:
genericSanEvent TRAP-TYPE
ENTERPRISE hpSanManager
VARIABLES { severityLevel, category, id,
msgString, contactName, contactEmail,
contactWorkPhone, contactHomePhone,
contactPager, contactFax }
DESCRIPTION
"A generic SAN event has occurred. The variables are:
severityLevel - the event severity level;
category - Category of the event being reported;
code - ID of the event in the given category;
msgString - the message string describing
the event;
contactName - the name of the individual
to be notified of the event;
contactEmail - the e-mail address of the
individual referred to in contactName;
contactWorkPhone - the work phone number
of the individual referred to in
contactName;
contactHomePhone - the home phone number
of the individual referred to in
contactName;
contactPager - the pager number of the
individual referred to in contactName;
contactFax - the FAX number of the individual
referred to in contactName"