Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
| Search for | Example | Results |
|---|---|---|
| A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
|
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
| Search for | Operator | Example |
|---|---|---|
|
Two or more words in the same topic |
|
|
| Either word in a topic |
|
|
| Topics that do not contain a specific word or phrase |
|
|
| Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
| A combination of search types | ( ) parentheses |
|
Name
nnmtrimincidents.sh — delete and (optionally) archive incidents
SYNOPSIS
nnmtrimincidents.sh [
[ [-age age -incr incr] |
-date date | -trimOldest numberToTrim ]
[-nature nature]
[-lifecycle lifecycleState]
[-severity severity]
[-origin origin]
[-name name]
[-family family]
[-sysobjectid sysobjectid]
[-path path]
[-archiveOnly]
[-trimOnly]
[-trimAndArchive]
[-batch batchSize]
[-u username]
[-p password]
[-quiet]
]
DESCRIPTION
nnmtrimincidents.sh is used to delete incidents from the incident table.
The deleted incidents are (optionally) saved in a compressed archive file:
data_dir\tmp\incidentArchive.ISO 8601 Date.Time Ms.txt.gz
The default behavior is to delete incidents without archiving.
ARCHIVE-FORMAT
Incidents will be archived using a csv format. The column names are ordered as follows:
TimeStamp(LastOccurance),Name,SourceNodeName,SourceObjectName,SysObjectID(ALWAYS_EMPTY),FormattedMessage,LifeCycleState,Severity,Priority,AssignedTo,JournalNotes,Category,Family,Nature,Origin,IncidentNotes,DuplicateCount,FirstOccuranceTime,OriginOccuranceTime,PayLoad,ElementOID
TimeStamp - Last time this incident occurred, as a human readable time string.
Name - Incident Name
SourceNodeName - Source Node Short Name
SourceObjectName - Sorce Object Name
SysObjectID - Always empty this field has been kept for backwards compatibility
FormattedMessage - Formatted string describing the incident
LifeCycleState - Incident lifecycle state
Severity - Incident severity
Priority - Incident priority localized label
AssignedTo - Account/Person holding this incident
JournalNotes - Incident journal notes
Category - Incident category localized label
Family - Incident family localized label
Nature - Incident nature
Origin - Incident origin
IncidentNotes - Incident notes
DuplicateCount - # of times the incident has occured in the system
FirstOccuranceTime - In the case of duped incidents this is the first one
OriginOccuranceTime - Timestamp for when the trap/syslog arrived into the system (if any)
PayLoad: All CIAS, "Name[Type]=Value" seperated by | (In the case of multiple CIA)
Name - Name of CIA (50 chars max)
Type - Value type of the CIA
Value - Value of the CIA (2000 chars max)
ElementOID - OID for the incident if it exists
Parameters
-ageage-
Specifies the age of incidents to trim. You should use this option in conjunction with the
incroption. If specified, the value foragemust be greater than0. -incrincrement-
Specifies the increment for
ageoption. Supported increments includedays,weeks, andmonths. -trimOldestnumberToTrim-
Specifies a number of incidents to delete from the database. The oldest
numberToTrimincidents will be selected from all incidents in the database based on the options specified. -datedate-
Specifies the date from which older incidents are trimmed. The date is specified in ISO 8601 standard format:
yyyy-mm-ddThh:mm:ss[+ or -]hh:mm. -archiveOnly-
Creates an archive file. Does not trim incidents. This option requires you to specify the
ageordateoption. -trimOnly-
Trims incidents without archiving the deleted incidents. This is the default behavior.
-trimAndArchive-
Trims incidents with archiving the deleted incidents.
-batchbatchSize-
Specifies the batch size when trimming incidents. If specified, the value for
batchmust be greater than0and less than or equal to1000. -pathpath-
Specifies the archive file name with a complete path. This path overrides the default archive file:
data_dir\tmp\incidentArchive.txt.gz -jndiHosthostname-
Server
jndihost. Default islocalhost. -jndiPortport-
Server
jndiport. Default is1099. -lifecyclelifecycle-
Specifies the lifecycle state of incidents matching the
age|dateto trim.Example
lifecyclestates include:RegisteredInProgressCompletedClosed -severityseverity-
Specifies the severity of incidents matching the
age|dateto trim.Example
severitystates include:CriticalMajorMinorWarningNormal -namename-
Specifies the name of incidents matching the
age|dateto trim. -familyfamily-
Optionally specify the family of incidents matching
age|dateto trim. -sysobjectidsysobjectid-
Optionally specify the device system object id of incidents matching
age|dateto trim. -naturenature-
Specifies the nature of incidents matching the
age|dateto trim.Examples of
natureinclude:RootCauseSecondaryRootCauseSymptomServiceImpactStreamCorrelationNoneInfoDedup_Stream_CorrelationRate_Stream_Correlation -originorigin-
Specifies the origin of incidents matching the
age|dateto trim.Example
originstates include:ManagementSoftwareManuallyCreatedRemotelyGeneratedSnmpTrapSyslogOther -u <username>-
Supply the NNMi administrator username to run the script.
-p <password>-
Supply the NNMi administrator password to run the script.
-quietquiet-
Specifies non-prompt mode.>
EXAMPLES
Trim incidents older than 6 days:
nnmtrimincidents.sh -age 6 -incr days
Trim incidents older than 6 weeks with a nature of Symptom:
nnmtrimincidents.sh -age 6 -incr weeks -nature Symptom
Trim incidents older than 6 months with a lifecycle state of Closed:
nnmtrimincidents.sh -age 6 -incr months -lifecycle Closed
Trim incidents older than 6 months with a severity of Normal:
nnmtrimincidents.sh -age 6 -incr months -severity Normal
Trim incidents older than the specified date:
nnmtrimincidents.sh -date 2007-07-16T19:20:30
Trim incidents older than the specified date with a nature of Symptom:
nnmtrimincidents.sh -date 2007-07-16T19:20:30+01:00 -nature Symptom
Trim incidents older than the specified date with a lifecycle state of Closed:
nnmtrimincidents.sh -date 2007-07-16T19:20:30-01:00 -lifecycle Closed
Trim incidents older than 6 days using the specified filename for the archive:
nnmtrimincidents.sh -age 6 -incr days -path "C:\BkupDir\saveIncidents.gz"
Trim incidents older than 6 days (without archiving):
nnmtrimincidents.sh -age 6 -incr days
Trim the oldest 10,000 SNMP traps with Symptom nature:
nnmtrimincidents.sh -trimOldest 10000 -nature Symptom -origin SnmpTrap
Trim incidents older than 6 days (without archiving):
nnmtrimincidents.sh -trimOnly -age 6 -incr days
Archive incidents older than 6 days (without trimming):
nnmtrimincidents.sh -archiveOnly -age 6 -incr days
Trim and archive incidents older than 6 days:
nnmtrimincidents.sh -trimAndArchive -age 6 -incr days
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to network-management-doc-feedback@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback:

