Versions Compared

Key

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

...

Step 2. Move and adapt NMIS files

There are a couple of options to move configuration files: 

  • (Option 1): Adapt just needed configuration files in the destination server (Cleaner option).
  • (Options 2): Move all configurations from origin server and adapt in the new server. 

Configuration Files: Option 1

Copy

Copy - just - the configuration files customised from the source server:

Code Block
rsync -r root@myserver.com:/usr/local/nmis8/conf/Config.nmis /usr/local/nmis9/conf
rsync -r root@myserver.com:/usr/local/nmis8/conf/users.dat /usr/local/nmis9/conf
...

Configure

We need to make some adjustments to the Config file. 

  • Review important parameters, as the number of workers (workers parameter in config). We can use this rule to get a starter number, but this will depend on the server resources, the amount of data collected by the node, etc. If the server is too slow we would need to decrease the number. If there are nodes with more than 3x late collects (Check the polling summary), the number should be increased: 
Code Block
(Number of nodes x AVG Collect time) / 300

300 _ Default polling time.

  • There is a script to use in opCommon (From opCharts 4.2.5) that compares configuration items from a configuration file missing from another. 
Code Block
/usr/local/omk/bin/opcommon-cli.pl act=compare_configs nmis8=/tmp/nmis8.nmis nmis9=/tmp/nmis9.nmis
    This will compare the keys. But if we want to compare the values (To compare, the default configuration file and the customised, to see want has changed):


Code Block
/usr/local/omk/bin/opcommon-cli.pl act=compare_custom default=/usr/local/nmis9/conf-default/Config.nmis custom=/usr/local/nmis9/conf/Config.nmis


  • Then, fix files permissions:
Code Block
/usr/local/nmis9/bin/nmis-cli act=fixperms


Configuration Files: Option 2

Copy

Copy the configuration directory from the source server.

...

Code Block
rsync -r root@myserver.com:/usr/local/nmis8/conf /usr/local/nmis9

Configure

We need to make some adjustments to the file. This is:

...

  • There is a script to use in opCommon (From opCharts 4.2.5) that compares configurations item in configuration items from a configuration file missing from another. 

...

Step 1. Move and adapt OMK files

Configuration Files

Copy

Copy the configuration directory from the source server.

...

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


Configure

Update opCommon.json:

Code Block
"database": {
   "db_name": "omk_shared",
   ...
    "nmis": {
        "<nmis9_dir>": "/usr/local/nmis9",
        "<nmis9_logs>": "/usr/local/nmis9/logs",
        "nmis9_cgi_url_base": "/cgi-nmis9",
        "nmis9_dir": "/usr/local/nmis9",

...