Name

nnmtrapconfig.ovpl — Configure HP NNM Trap service

SYNOPSIS

nnmtrapconfig.ovpl -u <user> -p <password> [-showProp] [-start] [-stop] [-readFilter] [-dumpBlockList] [-resetBlockCache]

nnmtrapconfig.ovpl -setProp -u <user> -p <password> [trapInterface <ip_addr>] [unsetTrapInterface] [trapPort <port>] [recvSocketBufSize <size>] [disallowV1V2] [allowV1V2] [loopbackAddrOverride <ip_addr>] [resetLoopbackAddrOverride] [blockTraps] [unblockTraps] [thresholdRate <rate>] [rearmRate <rate>] [overallThresholdRate <rate>] [overallRearmRate <rate>] [windowSize <time>] [updateSourcesPeriod <time>] [notifySourcesPeriod <time>] [minTrapCount <count>] [numSources <count>] [databaseQSize <count>] [pipelineQSize <count>] [databaseFileSize <size>] [databaseFileCount <count>] [hostedObjectTrapstorm <boolean>] [hostedObjectThreshold <rate>] [trapLoggingMode <log mode>] [trapLoggingCompression <boolean>] [trapLoggingMaxFileSize <size>] [trapLoggingRollAttempts <count>] [trapLoggingTaskInterval <time>] [trapLoggingBatchSize <size>] [trapReceiverNettyPort <port>] [trapReceiverJmsMemory <size bytes>] [trapReceiverJmsPage <size bytes>] [trapReceiverJmsTTL <time miliseconds>] [trapReceiverReplay <time miliseconds>] [-persist]

DESCRIPTION

nnmtrapconfig.ovpl can be used to display or modify the current properties of the Trap Service. In addition it can be used to start or stop the Trap Service. It also provides the following filter related functionalities: read filter configuration files, print out the current filter configuration and blocking caches or reset the blocking caches

Parameters

nnmtrapconfig.ovpl supports the following parameters:

-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.

-showProp

Show the properties associated with Trap Service and their current values.

-start

Start the Trap Service. NOTE this command only starts the TrapServer which is running in JBoss. Use nnmtrapreceiver to start the standalone TrapReceiver.

-stop

Stop the Trap Service. NOTE this command only stops the TrapServer which is running in JBoss. If the TrapReceiver is not stopped as well, your server will continue to receive and cache traps. Use nnmtraprecevier to stop the standalone TrapReceiver.

-readFilter

Cause Trap Service to read the filter configuration files.

-dumpBlockList

Print out the filter configuration and the blocking caches that the Trap Service creates.

-resetBlockCache

Reset the blocking caches in the Trap Service.

To set values for one or more properties, run nnmtrapconfig.ovpl with the following options

-u user

The name of a user with system or administrator roles.

-p password

The password for the specified user.

-setProp

Set values for properties associated with Trap Service.

trapInterface ip address

Set IP address on which the Trap Service listens for traps. By default it listens on all interfaces.

unsetTrapInterface

Set Trap Service to listen on all interfaces.

trapPort port

Set the port on which the Trap Service listens for traps. By default this is 162.

recvSocketBufSize size

Set the size of socket buffer, in kilobytes, on which Trap Service listens for traps.

disallowV1V2

Block all incoming SNMP v1 and v2 traps, forwarding only v3 traps. Disabled by default.

allowV1V2

Accept every incoming SNMP trap, including v1 and v2. This is the default.

loopbackAddrOverride ip address

Sets the IP Address to replace the source address of a trap if the source address is a loopback address before forwarding the trap.

resetLoopbackAddrOverride

Resets the loopback override address. When this options is executed, the user supplied loopback override address will be removed. In this case, NNM chooses one of the server's addresses as the loopback override address.

blockTraps

Block traps based on filter and threshold configurations.

unblockTraps

Do not block traps.

thresholdRate rate

Set the rate in traps/sec at which trap sources or trap oids are blocked.

rearmRate rate

Set the rate in traps/sec at which blocked trap sources or trap oids are unblocked. This rate should be less than or equal to the thresholdRate.

overallThresholdRate rate

Set the rate in traps/sec at which all incoming traps are blocked.

overallRearmRate rate

Set the rate in traps/sec at which all incoming traps are unblocked. This rate should be less than or equal to the overallThresholdRate

windowSize time

Set monitoring window size in seconds. This determines the window size in which trap sources are monitored. This means that whenever this time expires the counters keeping track of incoming traps are reset and a new window is started.

updateSourcesPeriod time

Set the time period in seconds after which the list of blocked traps and sources are updated.

notifySourcesPeriod time

Set the time period in seconds after which the list of blocked traps and sources are reported in the trapanalytics log file under the NNM_LOG directory. This is also the time period after which a trap storm incident is generated, in case a trap storm occurs and the overallThresholdRate is violated.

minTrapCount count

Set the minimum number of traps to be received from a source before it is considered for blocking. Also the minimum number of the same trap received before that trap is considered for blocking.

numSources count

Set the number of nosiest sources to monitor at any given time. These will be the sources that are sending the most traps as well as the traps that occur most frequently. This information is reported in the trapanalytics log file in the NNM_LOG directory.

databaseQSize count

Set the maximum number of traps that can be held in the queue that writes traps to the database.

pipelineQSize count

Set the maximum number of traps that can be held in the queues for each stage of the trap pipeline.

databaseFileSize size

Set the maximum size, in MB, for one file in the trap database. When the file size reaches this value a rollover happens.

databaseFileCount count

Set the maximum number of files in the trap database.

hostedObjectTrapstorm enabled

Enable or disable hosted object trap storm detection and suppression.

hostedObjectThreshold rate

If a hosted object's trap rate is greater than this threshold in seconds, its traps will be suppressed.

trapLoggingMode log mode

The mode that the trap logger will operate with, valid values are: OFF, CSV, TXT, BOTH. Default value: CSV

OFF: Turns off all trap logging
CSV: Traps will be logged in a CSV format
TXT: Traps will be logged in a txt format similiar to trapd.log
BOTH: Traps will be logged in both formats

trapLoggingCompression boolean

If true, traps will be logged in a gz compression, Default: false

trapLoggingMaxFileSize size

Maximum size in MB that the trap log files will grow to before being rolled archived to a .old file. Only 1 .old file is retained for each log format. Defaul: 5MB

trapLoggingRollAttempts count

Maximum number of attempts the trap logger will try to roll a log file internally. Default: 1

trapLoggingTaskInterval time

Time in seconds the trap logger will wait before writing traps to the filesystem. Defult: 6 seconds

trapLoggingBatchSize size

Maximum number of traps that will be written to the filesystem during each interval. Default: 256

trapReceiverNettyPort port

Set the port the TrapReceiver will monitor for connections from JBoss. Default: 5447

trapReceiverJmsMemory size bytes

Set the maximum amount of memory in bytes each JMS queue can consume, this value must be more than jms-page. Default: 128MB (134217728)

trapReceiverJmsPage size bytes

Set the maximum file size in bytes for JMS queue pages, this value must be more than 1,048,576 and less than jms-memory. Default: 10MB (10485760)

trapReceiverJmsTTL time miliseconds

Set the JMS message TTL in ms. Must be a non-negative long. This is the amount of time that traps will be cached by the TrapReceiver. If JBoss is down for longer than this time, data will be lost. Default: 5 Minutes (300000)

trapReceiverReplay time miliseconds

Set the time delta in ms, to use when replaying traps during startup after a failover. Must be a non-negative long. A value of zero guarantees no duplicate data, however a value of zero may lead to lost data. Default: 10 Seconds (10000)

-persist

Persist the current properties so that on future restarts these values will be used.

If you are persisting properties in a HA or application failover environment, HP suggests stopping and starting the TrapReceiver on the inactive server to ensure that both the active and inactive nodes are using the same properties.

EXAMPLES

Show the properties associated with the Trap Service and their values:

nnmtrapconfig.ovpl -u user -p pass -showProp

Start the Trap Service:

nnmtrapconfig.ovpl -u user -p pass -start

Set the trap port to 1162:

nnmtrapconfig.ovpl -u user -p pass -setProp trapPort 1162

Enable the hosted object trap storm detection and suppression stage, with a per device traps/second threshold of 50. This command will also persist the current values for future invocations of the Trap Service.

nnmtrapconfig.ovpl -u user -p pass -setProp hostedObjectTrapstorm true hostedObjectThreshold 50 -persist

Log recieved traps using both formats, with a maximum file size of 32MB, using a task interval of 30 seconds and a batch size of 1024. Also persist the current values for future invocations of Trap Service.

nnmtrapconfig.ovpl -u user -p pass -setProp trapLoggingMode BOTH trapLoggingMaxFileSize 32 trapLoggingTaskInterval 30 trapLoggingBatchSize 1024 -persist

Enable blocking and also persist the current values for future invocations of Trap Service

nnmtrapconfig.ovpl -u user -p pass -setProp blockTraps -persist

Persist the current values for future invocations of Trap Service

nnmtrapconfig.ovpl -u user -p pass -setProp -persist

FILES

The following file stores properties for NNM Trap Service:

Windows:data_dir\shared\nnm\conf\nnmtrapserver.properties

UNIX:/var/opt/OV/shared/nnm/conf/nnmtrapserver.properties

The blocking filters can be configured in the following file:

Windows:data_dir\shared\nnm\conf\nnmtrapd.conf

UNIX:/var/opt/OV/shared/nnm/conf/nnmtrapd.conf

The hosted object trap storm detection and suppression filter can be configured in the following file:

Windows:data_dir\shared\nnm\conf\hosted-object-trapstorm.conf

UNIX:/var/opt/OV/shared/nnm/conf/hosted-object-trapstorm.conf

SEE ALSO

hosted-object-trapstorm.conf(4), nnmtrapreceiver(1M).

AUTHOR

nnmtrapconfig.ovpl was developed by Hewlett Packard Enterprise.

Return to Reference Pages Index