You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Introduction

Opmantek applications' released on or after 30 Sept 2020 will work on Opmantek's latest and fastest platform, however, earlier installed products are incompatible with this new platform.

This solution was needed as NMIS 8.6.7G1, opReports 3.2.0 and other Opmantek applications released prior to 30 September were installed on server(s).
However, opReports 3.4.1 was needed to overcome the issue in the  95th Percentile calculation in the WAN Utilisation Distribution Report and the WAN Utilisation Distribution Summary Report prior to opReports 3.4.1

opReports 3.2.0 and other Opmantek applications released prior to 30 September were installed on server(s) at /usr/local/omk/

opReports 3.4.1 was then installed at /opt/omk/ as follows:

  • opReports-3.4.1-standalone.tar.gz was created as follows
    (provided for informational purposes as opReports-3.4.1-standalone.tar.gz was provided to the Customer):
    • Install NMIS8 at /usr/local/nmis8 on a new VM with desired operating system created for the purpose of assembling opReports-3.4.1-standalone.tar.gz
    • Install the needed version of opReports at the default install directory /usr/local/omk
    • Create our custom install of opReports at /opt/omk

      /opt/
      cd /opt
      sudo cp -rf /usr/local/omk /opt
      sudo chown -R root:nmis /opt/omk
      
      cd /opt/omk/
      # make sure we are in /opt/omk/
      pwd
      /opt/omk
      
      # clean up
      sudo rm -rf ./{bin/*,log/*,var/*,lib/,script/,manifest,install.log}
      
      # check the files we are going to edit (change direcvtory from /usr/local/omk to /opt/omk)
      sudo grep -arRnF "/usr/local/omk" /opt/omk/
      /opt/omk/install/opconfigd.service.bak:20:ExecStart=/usr/local/omk/bin/opconfigd.pl
      /opt/omk/install/cron.d/opreports:4:*/5 * * * *   root /usr/local/omk/bin/opreports-scheduler.exe
      /opt/omk/install/cron.d/oplicense:4:8 5 * * *	root	/usr/local/omk/bin/oplicense-cli.pl act=refresh_bundle_licenses quiet=1
      /opt/omk/install/opeventsd.service.bak:20:ExecStart=/usr/local/omk/bin/opeventsd.pl
      /opt/omk/install/opCommon.nmis:27:    '<omk_base>' => '/usr/local/omk',
      /opt/omk/install/omkd.init.d.bak:26:DAEMON=/usr/local/omk/script/opmantek.pl
      /opt/omk/install/omkd.service:20:ExecStart=/usr/local/omk/script/opmantek.pl -f -p /var/run/opmantek.exe.pid -r
      /opt/omk/install/omk-rotate.conf:8:/usr/local/omk/log/*.log
      /opt/omk/install/omk-rotate.conf:27:/usr/local/omk/log/snow_api.log
      /opt/omk/install/opflowd.service.bak:20:ExecStart=/usr/local/omk/bin/opflowd.pl
      /opt/omk/install/opchartsd.service.bak:20:ExecStart=/usr/local/omk/bin/opchartsd.pl
      /opt/omk/install/schedule/example_snapshot.json:6:	"outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/install/schedule/health-businesshours.json:10:  "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/install/schedule/monthly_qos.json:11:  "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/install/schedule/weekend.json:11:  "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/install/schedule/daily.json:16:  "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/install/schedule/util_oneoff.json:12:  "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/conf/opeventsd.service:20:ExecStart=/usr/local/omk/bin/opeventsd.pl
      /opt/omk/conf/opconfigd.service:20:ExecStart=/usr/local/omk/bin/opconfigd.pl
      /opt/omk/conf/opCommon.nmis:35:    '<omk_base>' => '/usr/local/omk',
      /opt/omk/conf/opflowd.service:20:ExecStart=/usr/local/omk/bin/opflowd.pl
      /opt/omk/conf/opCommon.nmis.prepatch:27:    '<omk_base>' => '/usr/local/omk',
      /opt/omk/conf/omkd.service:20:ExecStart=/usr/local/omk/script/opmantek.pl -f -p /var/run/opmantek.exe.pid -r
      /opt/omk/conf/omk-rotate.conf:8:/usr/local/omk/log/*.log
      /opt/omk/conf/omk-rotate.conf:27:/usr/local/omk/log/snow_api.log
      /opt/omk/conf/opchartsd.service:20:ExecStart=/usr/local/omk/bin/opchartsd.pl
      /opt/omk/conf/omkd.init.d:26:DAEMON=/usr/local/omk/script/opmantek.pl
      /opt/omk/conf/schedule/example_snapshot.json:84:   "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/conf/schedule/health-businesshours.json:13:   "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/conf/schedule/monthly_qos.json:2:   "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/conf/schedule/weekend.json:25:   "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/conf/schedule/daily.json:28:   "outputdir" : "/usr/local/omk/var/reports"
      /opt/omk/conf/schedule/util_oneoff.json:10:   "outputdir" : "/usr/local/omk/var/reports",
      /opt/omk/templates/unauthorised.html.ep:37:% my $log_dir = $self->config->{'<omk_logs>'} || "/usr/local/omk/logs/";
      /opt/omk/templates/unauthorised.html.ep:38:% my $conf_dir = $self->config->{'<omk_conf>'} || "/usr/local/omk/conf";
      /opt/omk/templates/unauthorised.html.ep:39:% my $base_dir = $self->config->{'<omk_base>'} || "/usr/local/omk/";
      /opt/omk/templates/exception.html.ep:38:% my $log_dir = $self->config->{'<omk_logs>'} || "/usr/local/omk/logs/";
      /opt/omk/templates/exception.html.ep:39:% my $conf_dir = $self->config->{'<omk_conf>'} || "/usr/local/omk/conf";
      /opt/omk/templates/exception.html.ep:40:% my $base_dir = $self->config->{'<omk_base>'} || "/usr/local/omk/";
      /opt/omk/templates/not_found.production.html.ep:38:% my $log_dir = $self->config->{'<omk_logs>'} || "/usr/local/omk/logs/";
      /opt/omk/templates/not_found.production.html.ep:39:% my $conf_dir = $self->config->{'<omk_conf>'} || "/usr/local/omk/conf";
      /opt/omk/templates/not_found.production.html.ep:40:% my $base_dir = $self->config->{'<omk_base>'} || "/usr/local/omk/";
      
      # edit the above files:
      sudo sh -c 'grep -arRnFl "/usr/local/omk" /opt/omk/|while read LINE; do sed -i "s!/usr/local/omk!/opt/omk!g" "${LINE}";done;'
      
      # check all files have been edited - returns nothing if all references to /usr/local/omk have been corrected to /opt/omk
      sudo grep -arRnF "/usr/local/omk" /opt/omk/
      
      # edit executasble names in /opt/omk/install directory - our executables are all changed from old.pl to old-standalone.pl and old.exe to old-standalone.exe:
      # check the files that may need editing:sudo grep -arRnF "/opt/omk" /opt/omk/install/
      /opt/omk/install/opconfigd.service.bak:20:ExecStart=/opt/omk/bin/opconfigd.pl
      /opt/omk/install/cron.d/opreports:4:*/5 * * * *   root /opt/omk/bin/opreports-scheduler.exe
      /opt/omk/install/cron.d/oplicense:4:8 5 * * *	root	/opt/omk/bin/oplicense-cli.pl act=refresh_bundle_licenses quiet=1
      /opt/omk/install/opeventsd.service.bak:20:ExecStart=/opt/omk/bin/opeventsd.pl
      /opt/omk/install/opCommon.nmis:27:    '<omk_base>' => '/opt/omk/',
      /opt/omk/install/omkd.init.d.bak:26:DAEMON=/opt/omk/script/opmantek.pl
      /opt/omk/install/omkd.service:20:ExecStart=/opt/omk/script/opmantek.pl -f -p /var/run/opmantek.exe.pid -r
      /opt/omk/install/omk-rotate.conf:8:/opt/omk/log/*.log
      /opt/omk/install/omk-rotate.conf:27:/opt/omk/log/snow_api.log
      /opt/omk/install/opflowd.service.bak:20:ExecStart=/opt/omk/bin/opflowd.pl
      /opt/omk/install/opchartsd.service.bak:20:ExecStart=/opt/omk/bin/opchartsd.pl
      /opt/omk/install/schedule/example_snapshot.json:6:	"outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/health-businesshours.json:10:  "outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/monthly_qos.json:11:  "outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/weekend.json:11:  "outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/daily.json:16:  "outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/util_oneoff.json:12:  "outputdir" : "/opt/omk/var/reports",
      
      # edit the daemons at /opt/omk/install/*.service*
      sudo sh -c "echo \"$(for DAEMON in 'opchartsd' 'opconfigd' 'opeventsd' 'opflowd'; do sudo sed -i 's!/'"${DAEMON}"'\.!/'"${DAEMON}"'-standalone.!g' "/opt/omk/install/${DAEMON}.service"*;done;)\";"
      /opt/omk/install/omkd.service
      sudo sed -i -e 's!opmantek\.pl!opmantek-standalone.pl!g' -e 's!opmantek\.exe!opmantek-standalone.exe!g' /opt/omk/install/omkd.service;
      sudo sed -i -e 's!opmantek\.pl!opmantek-standalone.pl!g' -e 's!opmantek\.exe!opmantek-standalone.exe!g' /opt/omk/install/omkd.init*;
      
      # edit cronjobs
      sudo sed -i -e 's!/opt/omk/bin/opreports-scheduler.pl!/opt/omk/bin/opreports-scheduler-standalone.pl!g' -e 's!/opt/omk/bin/opreports-scheduler.exe!/opt/omk/bin/opreports-scheduler-standalone.exe!g' /opt/omk/install/cron.d/opreports;
      sudo sed -i -e 's!/opt/omk/bin/oplicense-cli.pl!/opt/omk/bin/oplicense-cli-standalone.pl!g' -e 's!/opt/omk/bin/oplicense-cli.exe!/opt/omk/bin/oplicense-cli-standalone.exe!g' /opt/omk/install/cron.d/oplicense;
      
      # prevent a clash on filenames where we can have two systemd services:
      sudo mv /opt/omk/install/omkd.service /opt/omk/install/omkd-standalone.service
      
      # prevent a clash on filenames where we can have two initd services:
      sudo mv /opt/omk/install/omkd.init.d.bak /opt/omk/install/omkd-standalone.init.d.bak
      
      # prevent a clash on filenames where we can have two cron files:
      sudo mv /opt/omk/install/cron.d/oplicense /opt/omk/install/cron.d/oplicense-standalone
      
      # check if our edits are complete:
      sudo grep -arRnF "/opt/omk" /opt/omk/install/
      /opt/omk/install/opconfigd.service.bak:20:ExecStart=/opt/omk/bin/opconfigd-standalone.pl
      /opt/omk/install/cron.d/opreports:4:*/5 * * * *   root /opt/omk/bin/opreports-scheduler-standalone.exe
      /opt/omk/install/cron.d/oplicense-standalone:4:8 5 * * *	root	/opt/omk/bin/oplicense-cli-standalone.pl act=refresh_bundle_licenses quiet=1
      /opt/omk/install/opeventsd.service.bak:20:ExecStart=/opt/omk/bin/opeventsd-standalone.pl
      /opt/omk/install/opCommon.nmis:27:    '<omk_base>' => '/opt/omk/',
      /opt/omk/install/omkd-standalone.service:20:ExecStart=/opt/omk/script/opmantek-standalone.pl -f -p /var/run/opmantek-standalone.exe.pid -r
      /opt/omk/install/omk-rotate.conf:8:/opt/omk/log/*.log
      /opt/omk/install/omk-rotate.conf:27:/opt/omk/log/snow_api.log
      /opt/omk/install/opflowd.service.bak:20:ExecStart=/opt/omk/bin/opflowd-standalone.pl
      /opt/omk/install/opchartsd.service.bak:20:ExecStart=/opt/omk/bin/opchartsd-standalone.pl
      /opt/omk/install/omkd-standalone.init.d.bak:26:DAEMON=/opt/omk/script/opmantek-standalone.pl
      /opt/omk/install/schedule/example_snapshot.json:6:	"outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/health-businesshours.json:10:  "outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/monthly_qos.json:11:  "outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/weekend.json:11:  "outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/daily.json:16:  "outputdir" : "/opt/omk/var/reports",
      /opt/omk/install/schedule/util_oneoff.json:12:  "outputdir" : "/opt/omk/var/reports",
      
      # yes, they are
      
      # now some final fine tuning
      
      # we want opCommon.nmis configurations to point at '/usr/local/omk/var/reports'
      # so that opreports-cli-standalone.exe and opreports-scheduler-standalone.exe generated reports are placed at this location:
      
      sudo /usr/local/omk/bin/patch_config.exe -f /opt/omk/install/opCommon.nmis /directories/'<omk_reports>'='/usr/local/omk/var/reports'
      Operating on config file: /opt/omk/install/opCommon.nmis
      Patching values for keys /directories/<omk_reports>
      Patching element /directories/<omk_reports>, patch /directories/<omk_reports>
      
      sudo /usr/local/omk/bin/patch_config.exe -f /opt/omk/conf/opCommon.nmis /directories/'<omk_reports>'='/usr/local/omk/var/reports'
      Operating on config file: /opt/omk/conf/opCommon.nmis
      Patching values for keys /directories/<omk_reports>
      Patching element /directories/<omk_reports>, patch /directories/<omk_reports>
      
      sudo /usr/local/omk/bin/patch_config.exe -f /opt/omk/install/opCommon.nmis /directories/'<omk_reports_ondemand>'='/usr/local/omk/var/reports/on-demand'
      Operating on config file: /opt/omk/install/opCommon.nmis
      Patching values for keys /directories/<omk_reports_ondemand>
      Patching element /directories/<omk_reports_ondemand>, patch /directories/<omk_reports_ondemand>
      
      sudo /usr/local/omk/bin/patch_config.exe -f /opt/omk/conf/opCommon.nmis /directories/'<omk_reports_ondemand>'='/usr/local/omk/var/reports/on-demand'
      Operating on config file: /opt/omk/conf/opCommon.nmis
      Patching values for keys /directories/<omk_reports_ondemand>
      Patching element /directories/<omk_reports_ondemand>, patch /directories/<omk_reports_ondemand>
  • Place the provided opReports-3.4.1-standalone.tar.gz file in /opt/ directory
  • Uncompress the file, then set permissions on /opt/omk/ directory structure appropriately:

    /opt/
    sudo tar -xzvf opReports-3.4.1-standalone.tar.gz
    sudo chown -R root:nmis /opt/omk/
  • No labels