Highlighted
Super Contributor.
Super Contributor.
1097 views

NNMi 9.23 and SNMP trap logging.

Jump to solution

Hello all,

We are running NNMi 9.23 on Windows 2008 servers. Last week we had a situation where we needed to research what traps were actually received the previous few days. What we found is that trap.csv and trap.csv.old rotate pretty quickly and we had no history for research.

Does NNMi allow any configuration and control on SNMP log files? I have looked through the help and so far all I see is enable/disable and those 2 log files, which appear to roll when they hit 5 MB.

I would rather keep 5 or 10 files at 5 or 10 MB each if possible.

Thanks in advance,

JJacques

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: NNMi 9.23 and SNMP trap logging.

Jump to solution

Jacques,

  I don't think this change should require a restart.  Let me check this out on 10.0.  Unfortunately we probably won't fix this on 9.2x if it does not work as this version will be out of support in August.  I'll post what I find for 10.0

 All the best

Dave Y

MicroFocus Support
Viewed the Support tips? Search for "(NNMi) Support Tips" and order by Date to get the list
The views expressed in my contributions are my own and do not necessarily reflect the views and strategy of MicroFocus
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution.

View solution in original post

0 Likes
7 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: NNMi 9.23 and SNMP trap logging.

Jump to solution

Jacques,

  The tool to use is nnmtrapconfig.ovpl.   You will find the following two parameters that can help control the amount of data collected:

  trapLoggingMaxFileSize <size>: Maximum file size in MB that the trap log file can grow to, minimum 1Mb.
  trapLoggingRollAttempts <count>: Maximum number of attempts the trap logger will try to roll a log file internally. 1 to 10 attempts.

Remember to use the -persist option as well so that the changes are saved over restarts !

  All the best

Dave Y

 

MicroFocus Support
Viewed the Support tips? Search for "(NNMi) Support Tips" and order by Date to get the list
The views expressed in my contributions are my own and do not necessarily reflect the views and strategy of MicroFocus
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: NNMi 9.23 and SNMP trap logging.

Jump to solution

Thanks for the help Dave.

I ran this command:

      nnmtrapconfig.ovpl -setProp -persist trapLoggingMaxFileSize 10 trapLoggingRollAttempts 10

 So now if I run nnmtrapconfig.ovpl -showProp it shows the trapLoggingMaxFileSize at 10MB and trapLoggingRollAttempts set to 10.

Now the traps.csv correctly grows to 10MB and rolls when it hits that size, but I am only getting 1 history file.  The file just rolled and started a new log, so on a hunch I moved the trap.csv.old to a different folder and I'll let it run over night and see if it creates history files.

Does this config change require a restart?

Thanks again.

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: NNMi 9.23 and SNMP trap logging.

Jump to solution

Jacques,

  I don't think this change should require a restart.  Let me check this out on 10.0.  Unfortunately we probably won't fix this on 9.2x if it does not work as this version will be out of support in August.  I'll post what I find for 10.0

 All the best

Dave Y

MicroFocus Support
Viewed the Support tips? Search for "(NNMi) Support Tips" and order by Date to get the list
The views expressed in my contributions are my own and do not necessarily reflect the views and strategy of MicroFocus
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution.

View solution in original post

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: NNMi 9.23 and SNMP trap logging.

Jump to solution

Dave,

After letting things run overnight I still only have 1 history file, so for now I think we will have to live with that.    I do see a large number of authentication errors (from monitor tools) in the log, so if I can eliminate those the log will not roll very often and will be more useful.

Regarding NNMi 10.x, we are planning our upgrade.  In fact, our QA server is already at 10.10, but we have so little volume there that the traps.csv file does not even roll.

Thanks again for the help!

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: NNMi 9.23 and SNMP trap logging.

Jump to solution

Jacques,

  I ran some tests on my machine and even after a restart it still looks like you will only get the ".old" log file.  I checked out the code and it looks to me like multiple roll files have not been implemented here.   I will open a defect for this issue.  But for now you have just 2 files so set the file size to be large enough for 2 files.

  All the best

Dave Y

MicroFocus Support
Viewed the Support tips? Search for "(NNMi) Support Tips" and order by Date to get the list
The views expressed in my contributions are my own and do not necessarily reflect the views and strategy of MicroFocus
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
Highlighted
Regular Contributor.
Regular Contributor.

Re: NNMi 9.23 and SNMP trap logging.

Jump to solution

Since they do not expose a normal log4j property file for us to use the answer is to just look at the options your OS gives you.

For example, I have NNMi installed on Windows so I use powershell to get my desired result.

get-content -path "<datadir>\log\nnm\trap.csv" -wait | out-file -filepath "<datadir>\log\nnm\trap_stream.csv"

Wrap that up into a proper script and have it get invoked whenever the trap receiver is started.

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: NNMi 9.23 and SNMP trap logging.

Jump to solution

 

Along similar lines, in the past we have written a simple perl script that monitors for the creation of the ".old" log file and simply renames it to a file name appended with an incrementing number.  In this way the files are automatically backed up as soon as they are created.  In the script just sleep for a few seconds once the file is detected in order to allow for the file to be ready to be renamed.

  All the best

Dave Y

MicroFocus Support
Viewed the Support tips? Search for "(NNMi) Support Tips" and order by Date to get the list
The views expressed in my contributions are my own and do not necessarily reflect the views and strategy of MicroFocus
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.