View Source

h6. Contents
{toc:minLevel=5|maxLevel=5|printable=false}

h5. Description

This update is for all GroundWork customers. The notification manager (NoMa) does not natively implement long-term retention control for the logging of outgoing notifications. Over time, that can cause the {{noma}} database to grow quite large at a site that makes extensive use of NoMa notifications. It might also slow down the processing of such notifications.

h6. What is in this update?

This Technical Bulletin provides a NoMa retention-control script along with a companion configuration file ({{/usr/local/groundwork/config/noma_retention.conf}}), and installs a cron job to run the script on a daily basis. The default setting in the config file will retain NoMa notification-log data for 90 days, which should be sufficient for typical operational usage.


h5. Prerequisites

* You need to be running GroundWork Monitor Core or Enterprise, version 7.2.1
* This technical bulletin does not depend upon prior technical bulletins
* There is no need to schedule a downtime to apply this technical bulletin

h5. Installation Steps


{attachments:patterns=TB7.2.1-05-notification-logs.tgz}

# As the {{root}} user, copy the attached tarball to an empty directory on the server to be patched.
# Unpack the tarball using the command:
{noformat}
tar xf TB7.2.1-05-notification-logs.tgz
{noformat}
# Change into the directory created by untarring:
{noformat}
cd TB7.2.1-05-notification-logs
{noformat}
# Run the installer script:
{noformat}
./TB7.2.1-05_install.sh
{noformat}
The install script will test that you are on a 7.2.1 system (which is required), that you have not already installed this patch, and that you want to go ahead.
# Respond to the install-confirmation prompt when it appears.
# New files will be copied into place. A new cronjob will be added to impose retention control on NoMa log data. Monitoring in general can continue while this patch is installed.

h5. Usage

The retention will be adjusted at 12:50 am daily. If there are a lot of old notification records when you install this patch, the first run will take a minute or two, and there will be some inefficiency in the {{noma}} database even after the retention script runs.

You can optionally run the retention script by hand immediately if you want to get the performance benefit right away. You can also do a vacuum operation on the database to regain lost disk space and make things more efficient.
First consider adjusting the default setting in:{noformat}/usr/local/groundwork/config/noma_retention.conf {noformat} from 90 days to what you want to have the retention be. Just edit the file and adjust the number as necessary.

To run the script by hand, log in and become the {{nagios}} user, then type:
{noformat}
/usr/local/groundwork/tools/noma_retention --logs
{noformat}
To run a vacuum operation afterwards, also as the {{nagios}} user, type:
{noformat}
/usr/local/groundwork/postgresql/bin/psql -U noma -d noma -c 'vacuum (full, analyze) notification_logs'
{noformat}
The disk space will then be freed, and the table optimized.

h5. Uninstalling

Reversal of this patch will remove the new files, and remove the new cron job. Monitoring in general can continue while this happens.

# As the {{root}} user, navigate to the patch-unpack directory you created when installing the patch, (if that directory no longer exists, first unpack the patch again).
{noformat}
cd TB7.2.1-05-notification-logs
{noformat}
# Run the uninstall command:
{noformat}
./TB7.2.1-05_uninstall.sh
{noformat}