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
-age
age
-
Specifies the age of incidents to trim. You should use this option in conjunction with the
incr
option. If specified, the value forage
must be greater than0
. -incr
increment
-
Specifies the increment for
age
option. Supported increments includedays
,weeks
, andmonths
. -trimOldest
numberToTrim
-
Specifies a number of incidents to delete from the database. The oldest
numberToTrim
incidents will be selected from all incidents in the database based on the options specified. -date
date
-
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
age
ordate
option. -trimOnly
-
Trims incidents without archiving the deleted incidents. This is the default behavior.
-trimAndArchive
-
Trims incidents with archiving the deleted incidents.
-batch
batchSize
-
Specifies the batch size when trimming incidents. If specified, the value for
batch
must be greater than0
and less than or equal to1000
. -path
path
-
Specifies the archive file name with a complete path. This path overrides the default archive file:
data_dir
\tmp\incidentArchive.txt.gz
-jndiHost
hostname
-
Server
jndi
host. Default islocalhost
. -jndiPort
port
-
Server
jndi
port. Default is1099
. -lifecycle
lifecycle
-
Specifies the lifecycle state of incidents matching the
age
|
date
to trim.Example
lifecycle
states include:Registered
InProgress
Completed
Closed
-severity
severity
-
Specifies the severity of incidents matching the
age
|
date
to trim.Example
severity
states include:Critical
Major
Minor
Warning
Normal
-name
name
-
Specifies the name of incidents matching the
age
|
date
to trim. -family
family
-
Optionally specify the family of incidents matching
age
|date
to trim. -sysobjectid
sysobjectid
-
Optionally specify the device system object id of incidents matching
age
|date
to trim. -nature
nature
-
Specifies the nature of incidents matching the
age
|
date
to trim.Examples of
nature
include:RootCause
SecondaryRootCause
Symptom
ServiceImpact
StreamCorrelation
None
Info
Dedup_Stream_Correlation
Rate_Stream_Correlation
-origin
origin
-
Specifies the origin of incidents matching the
age
|
date
to trim.Example
origin
states include:ManagementSoftware
ManuallyCreated
RemotelyGenerated
SnmpTrap
Syslog
Other
-u <
username
>-
Supply the NNMi administrator username to run the script.
-p <
password
>-
Supply the NNMi administrator password to run the script.
-quiet
quiet
-
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: