nnmtrimincidents.ovpl — delete and (optionally) archive incidents
nnmtrimincidents.ovpl [
[ [-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]
]
nnmtrimincidents.ovpl 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.
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
-age
age
Specifies the age of incidents to trim. You should use this option in conjunction with the incr option. If specified, the value for age must be greater than 0.
-incr
increment
Specifies the increment for age option. Supported increments include days, weeks, and months.
-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 or date 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 than 0 and less than or equal to 1000.
-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 is localhost.
-jndiPort
port
Server jndi port. Default is 1099.
-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. This script requires
the NNMi administrator username unless you use an nnm.properties file.
See the nnm.properties.4 reference page for more information.
-p <password>
Supply the NNMi administrator password to run the script. This script requires
the NNMi administrator password unless you use an nnm.properties file.
See the nnm.properties.4 reference page for more information.
-quiet
quiet
Specifies non-prompt mode.>
Trim incidents older than 6 days:
nnmtrimincidents.ovpl -age 6 -incr days
Trim incidents older than 6 weeks with a nature of Symptom:
nnmtrimincidents.ovpl -age 6 -incr weeks -nature Symptom
Trim incidents older than 6 months with a lifecycle state of Closed:
nnmtrimincidents.ovpl -age 6 -incr months -lifecycle Closed
Trim incidents older than 6 months with a severity of Normal:
nnmtrimincidents.ovpl -age 6 -incr months -severity Normal
Trim incidents older than the specified date:
nnmtrimincidents.ovpl -date 2007-07-16T19:20:30
Trim incidents older than the specified date with a nature of Symptom:
nnmtrimincidents.ovpl -date 2007-07-16T19:20:30+01:00 -nature Symptom
Trim incidents older than the specified date with a lifecycle state of Closed:
nnmtrimincidents.ovpl -date 2007-07-16T19:20:30-01:00 -lifecycle Closed
Trim incidents older than 6 days using the specified filename for the archive:
nnmtrimincidents.ovpl -age 6 -incr days -path "C:\BkupDir\saveIncidents.gz"
Trim incidents older than 6 days (without archiving):
nnmtrimincidents.ovpl -age 6 -incr days
Trim the oldest 10,000 SNMP traps with Symptom nature:
nnmtrimincidents.ovpl -trimOldest 10000 -nature Symptom -origin SnmpTrap
Trim incidents older than 6 days (without archiving):
nnmtrimincidents.ovpl -trimOnly -age 6 -incr days
Archive incidents older than 6 days (without trimming):
nnmtrimincidents.ovpl -archiveOnly -age 6 -incr days
Trim and archive incidents older than 6 days:
nnmtrimincidents.ovpl -trimAndArchive -age 6 -incr days