Skip to content

Commit

Permalink
Merge pull request #74 from scline/1.2.14
Browse files Browse the repository at this point in the history
1.2.14
  • Loading branch information
scline authored Aug 16, 2020
2 parents e347c20 + e277dd3 commit fb224b2
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ ENV \
RDB_PASS=cactipassword \
RDB_HOST=localhost \
RDB_PORT=3306 \
CACTI_URL_PATH=cacti \
BACKUP_RETENTION=7 \
BACKUP_TIME=0 \
REMOTE_POLLER=0 \
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Remote cacti poller containers require the following, the major differance here
| DB_PASS | MySQL database password assigned to `DB_USER` Both cacti and spine poller will share these settings. |
| DB_HOST | The IP address, FQDN/hostname, or linked container name that cacti would use as a database. |
| DB_PORT | What TCP port is the MySQL database listening on, by default its 3306. |
| CACTI_URL_PATH | Cacti URL, by default `cacti` is used. --> http://cacti_ip/cacti, Currently only allows root URL changes, i.e. `this/is/something` will not work. Only `this` |
| INITIALIZE_DB | Can be `0` for false or `1` for true. If true the container will require `DB_ROOT_PASS` to the target database. The container will attempt to create usernames/passwords and Databases required on the remote system for Cacti to funtion. |
| TZ | TimeZone, please select a format Centos understands, a list can be generated by running `ls /usr/share/zoneinfo`.|
| BACKUP_RETENTION | Number of backup files to keep|
Expand Down Expand Up @@ -199,6 +200,11 @@ REPLACE INTO `%DB_NAME%`.`settings` (`name`, `value`) VALUES('poller_type', '2')
```

# Change Log
#### 1.2.14 - 08/15/2020
* Close issue [#73](https://github.com/scline/docker-cacti/issues/73) - Add CACTI_URL_PATH; Thanks for the request [xbolshe](https://github.com/xbolshe) and help on apache configs.
* Update Cacti and Spine from 1.2.11 to 1.2.14
* [changelog][CL1.2.14]

#### 1.2.11a - 04/18/2020
* Close issue [#64](https://github.com/scline/docker-cacti/issues/64) - FPM initialization failed; Thanks to [kevburkett](https://github.com/kevburkett) for bringing this one up and helping validate the fix
* Close issue [#65](https://github.com/scline/docker-cacti/issues/65) - PHP-SNMP yum commands cause rpmdb error
Expand Down Expand Up @@ -248,6 +254,7 @@ REPLACE INTO `%DB_NAME%`.`settings` (`name`, `value`) VALUES('poller_type', '2')
* Auto import remote pollers, currently you need to navigate to there GUI for a few clicks.
* Documentation cleanup.

[CL1.2.14]: http://www.cacti.net/release_notes.php?version=1.2.14
[CL1.2.11]: http://www.cacti.net/release_notes.php?version=1.2.11
[CL1.2.10]: http://www.cacti.net/release_notes.php?version=1.2.10
[CL1.2.9]: http://www.cacti.net/release_notes.php?version=1.2.9
Expand Down
Binary file not shown.
Binary file removed cacti/cacti-spine-1.2.11.tar.gz
Binary file not shown.
Binary file added cacti/cacti-spine-1.2.14.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion configs/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
* would be set to `/cacti/`.
*/

$url_path = '/cacti/';
$url_path = '/%CACTI_URL_PATH%/';

/*
* Default session name - session name must contain alpha characters
Expand Down
12 changes: 12 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ if [ ! -f /cacti/install.lock ]; then
cp /template_configs/cacti.conf /etc/httpd/conf.d
cp /template_configs/config.php /cacti/include

# update cacti url path config, requested via https://github.com/scline/docker-cacti/issues/73
echo "$(date +%F_%R) [New Install] Applying cacti URL enviromental variable to /etc/httpd/conf.d/cacti.conf"
sed -i -e "s/Alias.*/ Alias \/${CACTI_URL_PATH} \/cacti/" \
-e "s/RedirectMatch.*/ RedirectMatch \^\/\$ \/${CACTI_URL_PATH}/" \
/etc/httpd/conf.d/cacti.conf

# setup database credential settings
echo "$(date +%F_%R) [New Install] Applying enviromental variables to configurations."
sed -i -e "s/%DB_HOST%/${DB_HOST}/" \
Expand All @@ -60,6 +66,7 @@ if [ ! -f /cacti/install.lock ]; then
-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 \
/settings/*.sql \
/spine/etc/spine.conf
Expand Down Expand Up @@ -128,6 +135,11 @@ if [ -f "/etc/httpd/conf.d/cacti.conf" ]; then
else
echo "$(date +%F_%R) [Apache] /etc/httpd/conf.d/cacti.conf does not exist, copying a new one over."
cp /template_configs/cacti.conf /etc/httpd/conf.d/
# update cacti url path config, requested via https://github.com/scline/docker-cacti/issues/73
echo "$(date +%F_%R) [Apache] Applying cacti URL enviromental variable to /etc/httpd/conf.d/cacti.conf"
sed -i -e "s/Alias.*/ Alias \/${CACTI_URL_PATH} \/cacti/" \
-e "s/RedirectMatch.*/ RedirectMatch \^\/\$ \/${CACTI_URL_PATH}/" \
/etc/httpd/conf.d/cacti.conf
fi

# only generate certs if none exsist, this way users can provide there own
Expand Down

0 comments on commit fb224b2

Please sign in to comment.