Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Server: uburnto (ubuntu 18) →  deb-n-burn (debian 10) 
  • nmis 8.7.2 → nmis 9.2.2
  • opCharts 2.5.1 → opCharts 3
  • opConfig 3.5.2 → opConfig 4
  • opEvents 2.6.3 → opEvents 3
  • opHA 2.2.2  → opHA 3 
  • opReports 3.4.2 → opReports 4 

...

Code Block
rsync -r root@uburnto.opmantek.net:/usr/local/omk/conf /usr/local/omk

Convert to JSON

It can be done with the following command: 

Code Block
/usr/local/omk# /usr/local/omk/bin/opcommon-cli.exe act=convert_json_dir dir=conf


Configure

Status
colourRed
titleTODO

Step 4. Copy RRDs

This can be done really easy with rsync:

Code Block
rsync -r root@uburnto.

...

opmantek.net:/usr/local/nmis8/database/nodes /usr/local/nmis9/database

Then fix permissions:

Code Block
/usr/local/nmis9/bin/nmis-cli act=fixperms

Run script to adapt names

This script will adapt nmis8 rrd names to nmis9 (From nmis 9.2.1):

Code Block
/usr/local/nmis9/admin/node_admin.pl act=move-nmis8-rrd-files {node=nodeX|ALL|uuid=nodeUUID} [remove_old=1] [force=1]

Step 5.

...

 Import Nodes

We have copied the nodes file from nmis8 using rsync. We would need to import the nodes now:

Code Block
/usr/local/nmis9/admin/node_admin.pl act=import_bulk nodes=/usr/local/nmis9/conf/Nodes.nmis debug=true

Step 6. Move OMK Database

  • Stop services in origin server
  • Generate mongodump:
Code Block
mkdir /data/mongodump
mongodump -u=opUserRW -p=op42flow42 --out=/data/mongodump


  • copy the data with rsync:
Code Block
rsync -r root@uburnto.opmantek.net:/data/mongodump /data
  • Restore:


Code Block
mongorestore -u opUserRW -p op42flow42 mongodump/

...

Step 6. Import Nodes

...


Step 7. OMK Applications considerations

...

NMIS8 opReports and NMIS9 opReports work the same way:

Report Schedules are stored in /usr/local/conf/schedule

Reports caching is stored in /usr/local/omk/var/opreports

Reports are stored in /data/omk/var/reports (unless otherwise specified by the user)

If you followed the instructions above, your Report Schedules are back in place, as you've copied over the entire omk-old/conf directory in step five. The /data/omk/var reports directory should still be where it was at the beginning of the upgrade, as it was never changed.

...

Move aside the omk directory and install the new NMIS9 compatible application. Once the installation has finished rename the new omk/conf folder and copy over the old omk/conf folder. Convert the .nmis files in omk/conf/ directory into .json using the opcommon-cli tool. Edit the new omk/conf/opCommon.json file replacing any "nmis_dir" and "nmis8" entries for "nmis9_dir" and "nmis9". Lastly ensure the "load_applications" entry in this file shows only the new NMIS9 application previously installed and restart the omk daemon. We recommend starting this upgrade process with either opCharts or opConfig.

In detail

Install NMIS9, should install without any issues

Rename the omk directory


Code Block
mv /usr/local/omk /usr/local/omk-old


Run the installer for the new NMIS9 application, e.g. opCharts

Rename the new omk/conf directory


Code Block
mv /usr/local/omk/conf /usr/local/omk/conf-original


Copy the omk-old/conf directory into the new omk/


Code Block
cp -rf /usr/local/omk-old/conf /usr/local/omk


Convert the .nmis files in omk/conf/ directory into .json using the opcommon-cli tool


Code Block
/usr/local/omk/bin/opcommon-cli.exe act=convert_json_dir dir="/usr/local/omk/conf/"


Change any "nmis_dir" and "nmis8" entries to "nmis9_dir" and "nmis9" in the omk/conf/opCommon.json file. You can do this manually or by using the following Perl regex


Code Block
perl -p -i -e 's/nmis_dir/nmis9_dir/g' /usr/local/omk/conf/opCommon.json
perl -p -i -e 's/nmis8/nmis9/g' /usr/local/omk/conf/opCommon.json
perl -p -i -e 's/nmis_logs/nmis9_logs/g' /usr/local/omk/conf/opCommon.json


Change the "load_applications" entry in the opCommon.json file to only show the NMIS9 application recently installed. You can do this manually or by running the required patch_config commands to delete each application from the "load_applications" entry, except for the one that was recently installed.


Code Block
# E.g.: Previously installed applications: opConfig, opCharts, opEvents, opHA, opReports and Open-AudIT
#		Recently installed application: opConfig

/usr/local/omk/bin/patch_config.pl -b /usr/local/omk/conf/opCommon.json /omkd/load_applications-=opCharts # -b = Creates backup (opCommon.json.prepatch)
/usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications-=opEvents
/usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications-=opHA
/usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications-=opReports
/usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications-=Open-AudIT

# If the recently installed application (eg.: opConfig) is deleted by mistake, you can add it back by running the follow patch_config command
/usr/local/omk/bin/patch_config.pl /usr/local/omk/conf/opCommon.json /omkd/load_applications+=opConfig


Restart omkd


Code Block
systemctl restart omkd.service


Install the rest of the NMIS9 required applications


About opReports

NMIS8 opReports and NMIS9 opReports work the same way:

Report Schedules are stored in /usr/local/conf/schedule

Reports caching is stored in /usr/local/omk/var/opreports

Reports are stored in /data/omk/var/reports (unless otherwise specified by the user)

If you followed the instructions above, your Report Schedules are back in place, as you've copied over the entire omk-old/conf directory in step five. The /data/omk/var reports directory should still be where it was at the beginning of the upgrade, as it was never changed.

...