scline / docker-cacti

Cacti version 1+ under Docker
113 stars 56 forks source link

Upgrade Bash script #94

Open zuka1337 opened 3 years ago

zuka1337 commented 3 years ago

We have to take a look into this script, some weird things after testing that.

Page does not load properly, and stuff

I'll take a look

zuka1337 commented 3 years ago

image

kevburkett commented 3 years ago

I also ran into this issue while upgrading. It appears that the /upgrade.sh script is missing the config update to $url_path in /cacti/include/config.php.

Current cacti settings in /upgrade.sh

    # cacti settings
    echo "$(date +%F_%R) [Upgrade] Updating cacti settings."
    sed -i -e "s/%DB_HOST%/${DB_HOST}/" \
        -e "s/%DB_PORT%/${DB_PORT}/" \
        -e "s/%DB_NAME%/${DB_NAME}/" \
        -e "s/%DB_USER%/${DB_USER}/" \
        -e "s/%DB_PASS%/${DB_PASS}/" \
        -e "s/%DB_PORT%/${DB_PORT}/" \
        -e "s/%RDB_HOST%/${RDB_HOST}/" \
        -e "s/%RDB_PORT%/${RDB_PORT}/" \
        -e "s/%RDB_NAME%/${RDB_NAME}/" \
        -e "s/%RDB_USER%/${RDB_USER}/" \
        -e "s/%RDB_PASS%/${RDB_PASS}/" \
        /cacti/include/config.php

The /upgrade.sh script should be updated to include the update to $url_path config. Updated Example:

    # cacti settings
    echo "$(date +%F_%R) [Upgrade] Updating cacti settings."
    sed -i -e "s/%DB_HOST%/${DB_HOST}/" \
        -e "s/%DB_PORT%/${DB_PORT}/" \
        -e "s/%DB_NAME%/${DB_NAME}/" \
        -e "s/%DB_USER%/${DB_USER}/" \
        -e "s/%DB_PASS%/${DB_PASS}/" \
        -e "s/%DB_PORT%/${DB_PORT}/" \
        -e "s/%RDB_HOST%/${RDB_HOST}/" \
        -e "s/%RDB_PORT%/${RDB_PORT}/" \
        -e "s/%RDB_NAME%/${RDB_NAME}/" \
        -e "s/%RDB_USER%/${RDB_USER}/" \
        -e "s/%RDB_PASS%/${RDB_PASS}/" \
        -e "s/%CACTI_URL_PATH%/${CACTI_URL_PATH}/" \
        /cacti/include/config.php
solarsparq commented 10 months ago

This worked for me -- I ran into the awkward/broken login page after upgrade.sh as well. Thank you to all the contributors of this container. This makes Cacti incredibly easy to deploy, maintain & upgrade. This may be slightly unrelated, and I can open up a separate issue.. But is there an upgrade process for RRDTool? I tried to install newer versions (1.7.2 & 1.8.0) using a persistent volume & was greeted by GLIBC dependency problems.

[root@morrowind bin]# rrdtool --version rrdtool: /lib64/libc.so.6: version GLIBC_2.34 not found (required by rrdtool) rrdtool: /lib64/libc.so.6: version GLIBC_2.33 not found (required by rrdtool) [root@morrowind bin]#