Install/Ugrade Scripts September 18, 2010

Install/Upgrade ScriptsThe noc-install-upgrade.sh script will install or upgrade all the scripts from this site onto a Linux system. It’s only prerequisite is that OpenNMS be installed first. Also, I recommend reading the information on this site before installing.

It’s not required to install the scripts in this way. If you only want a small subset, the scripts can be downloaded and used individually. Refer to individual posts for details.

The noc-install-upgrade.sh script creates the /etc/noc.conf file and downloads the contents of $NOCBASE (/opt/noc by default). It does not test database access, configure Apache, or alter scripts to match your environment. After running noc-install-upgrade.sh for the first time you will need to do the following:

  1. Verify the scripts can access the OpenNMS database. Refer to the “Verify Database Access” section of Setting up Scripts.
  2. Optionally, enable the HTTP scripts as described in Setting up Custom Web Pages and Single Sign On. Don’t worry about the “Create Web Directories” section. It’s completed by in the install script.
  3. Refer to the Scripts page for information on individual scripts. Some HTTP scripts may not function correctly unless specific configurations are created inside OpenNMS. The scripts in $NOCBASE/bin/ should not be run unless you understand what they do. Some will alter the OpenNMS configuration, removing configurations you may want to keep. Others need to be modified to match your environment before they’ll produce useful output.

The noc-install-upgrade.sh script installs itself under $NOCBASE/bin/. It can be run later to upgrade or install new scripts. The upgrade process will not overwrite customizations you’ve made (but backup first anyway), instead saving the new files with a .new extension. See install and upgrade examples below.

Example Install

[root@localhost ~]# ./noc-install-upgrade.sh
Downloading/running newest version of noc-install-upgrade.sh...
2010-09-12 12:46:55 URL:http://opennms.dougbakewell.ca/downloads/bin/noc-
install-upgrade.sh [5070/5070] -> "/tmp/noc-install-upgrade.sh" [1]

NOC Install/Upgrade Script Version: 2010-09-12 10:18:12.000000000 -0700
More Information: http://opennms.dougbakewell.ca/posts/install-upgrade

Continue [y] > y

Install location for noc scripts [/opt/noc] >
Location of OpenNMS install [/opt/opennms] >
Creating /etc/noc.conf...done

Creating/Checking base directories...done
Installing/Upgrading /opt/noc/functions/base.func...done
Creating/Checking http and related directories...done
Installing/Upgrading /opt/noc/http/index.shtml...done
Installing/Upgrading /opt/noc/http/stats.shtml...done
Installing/Upgrading /opt/noc/http/public/index.shtml...done
Installing/Upgrading /opt/noc/bin/clean-rrd-data...done
Installing/Upgrading /opt/noc/bin/count-rrd-data...done
Installing/Upgrading /opt/noc/bin/testsnmp...done
Installing/Upgrading /opt/noc/bin/set-cats-from-snmp...done
Installing/Upgrading /opt/noc/bin/set-critical-paths...done
Installing/Upgrading /opt/noc/bin/check-dns...done
Installing/Upgrading /opt/noc/http/descsummary.cgi...done
Installing/Upgrading /opt/noc/http/dupipaddr.cgi...done
Installing/Upgrading /opt/noc/include/stats...done
Installing/Upgrading /opt/noc/README...done

Refer to http://opennms.dougbakewell.ca/posts/install-upgrade for tasks
that must be completed after noc-install-upgrade.sh is run.

These scripts are provided without any warranty. You should read and un
derstand everything before you implement it. You will most likely want to
customize it for your own needs.

For more information, visit http://opennms.dougbakewell.ca/

Done.
[root@localhost ~]#

Example Upgrade

[root@localhost ~]# /opt/noc/bin/noc-install-upgrade.sh
Downloading/running newest version of noc-install-upgrade.sh...
2010-09-12 12:51:49 URL:http://opennms.dougbakewell.ca/downloads/bin/noc-
install-upgrade.sh [5070/5070] -> "/tmp/noc-install-upgrade.sh" [1]

NOC Install/Upgrade Script Version: 2010-09-12 10:18:12.000000000 -0700
More Information: http://opennms.dougbakewell.ca/posts/install-upgrade

Continue [y] > 

Found /etc/noc.conf. Upgrading...

Creating/Checking base directories...done
Installing/Upgrading /opt/noc/functions/base.func...done
Creating/Checking http and related directories...done
Installing/Upgrading /opt/noc/http/index.shtml...saved with .new extention
Installing/Upgrading /opt/noc/http/stats.shtml...done
Installing/Upgrading /opt/noc/http/public/index.shtml...done
Installing/Upgrading /opt/noc/bin/clean-rrd-data...done
Installing/Upgrading /opt/noc/bin/count-rrd-data...done
Installing/Upgrading /opt/noc/bin/testsnmp...done
Installing/Upgrading /opt/noc/bin/set-cats-from-snmp...saved with .new ext
ention
Installing/Upgrading /opt/noc/bin/set-critical-paths...saved with .new ext
ention
Installing/Upgrading /opt/noc/bin/check-dns...done
Installing/Upgrading /opt/noc/http/descsummary.cgi...done
Installing/Upgrading /opt/noc/http/dupipaddr.cgi...done
Installing/Upgrading /opt/noc/include/stats...done
Installing/Upgrading /opt/noc/README...done

Refer to http://opennms.dougbakewell.ca/posts/install-upgrade for tasks
that must be completed after noc-install-upgrade.sh is run.

These scripts are provided without any warranty. You should read and un
derstand everything before you implement it. You will most likely want to
customize it for your own needs.

For more information, visit http://opennms.dougbakewell.ca/

=== WARNINGS ===
The following files may have been customized. New files saved with the .n
ew extenstion. Manual upgrading may be required.
/opt/noc/http/index.shtml saved as /opt/noc/http/index.shtml.new
/opt/noc/bin/set-cats-from-snmp saved as /opt/noc/bin/set-cats-from-snmp.
new
/opt/noc/bin/set-critical-paths saved as /opt/noc/bin/set-critical-paths.
new

Done.
[root@localhost ~]#
Share and Enjoy:
  • Print
  • Digg
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Slashdot
  • StumbleUpon
  • Twitter
Leave a Reply