I recently moved to Observium for my device and basic network monitoring, one of the things about running Observium that is, well, love it or hate it, is that there are a lot of updates to the software. And if you want to keep things up to date, you will probably want to perform updates quite frequently.
I created some scripts that help me simplify the update and upgrade process, when I choose to do updates (usually once or twice a month, assuming there are features that I want to check out).
To view the list of current changes to Observium for a given month, take a look here, http://observium.org/wiki/Changelog.
The first script listed below is a simple “minor update” script, it simply overlays new files over the existing files. This is the most basic type of update and is recommended for simple updates throughout the month and any non-major update releases.
After that, there is a more involved upgrade script that moves the existing installation to a backup location, installs the new files and then copes back some of the configuration files. This is recommended for major release updates.
Here is the minor update script.
#!/bin/bash # observium-minor-update.sh # Update minor version for Observium cd /opt if [ -f "observium-community-latest.tar.gz" ]; then rm -Rf observium-community-latest.tar.gz fi wget http://www.observium.org/observium-community-latest.tar.gz tar zxvf observium-community-latest.tar.gz /opt/observium/discovery.php -h none
And here is the major upgrade script.
#!/bin/bash # observium-upgrade.sh # Script to update Observium to Latest cd /opt if [ -d "observium_old" ]; then rm -Rf observium_old fi if [ -f "observium-community-latest.tar.gz" ]; then rm -Rf observium-community-latest.tar.gz fi mv observium observium_old wget http://www.observium.org/observium-community-latest.tar.gz tar zxvf observium-community-latest.tar.gz mv /opt/observium_old/rrd observium/ mv /opt/observium_old/*log* observium/ mv /opt/observium_old/config.php observium/ /opt/observium/discovery.php -h all
All of these scripts follow the basic practices Observium recommends here, http://observium.org/wiki/Upgrading.
Hi!
Thank you for your scripts! The documentation from the community edition isn’t really good 🙂
I am searching for the latest ce release. Is it 6430 (as seen in your screenshot and in my installation) or is it 7414? After the major upgrade procedure, I was running the command “/opt/observium/discovery.php -u” and got this output: Observium CE 0.15.6.6430
Discovery
Current Revision : 6430
New Revision : 7414
Is the “new revision” subjected to the community edition or only to the subscription edition?
Thanks! BR, Michael