Skip to content

Commit

Permalink
Release 7.6.27 - See CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Jul 27, 2022
1 parent 8330f9b commit d447f61
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 7.6.27 2022-07-27 <dave at tiredofit dot ca>

### Added
- Add option to show application output on the final execution before the process runaway guard is activated


## 7.6.26 2022-07-27 <dave at tiredofit dot ca>

### Changed
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ This image includes the capability of using agents inside the image to monitor m
| ----------------------------- | -------------------------------------------- | -------- |
| `CONTAINER_ENABLE_MONITORING` | Enable Monitoring of applications or metrics | `TRUE` |
| `CONTAINR_MONITORING_BACKEND` | What monitoring agent to use `zabbix` | `zabbix` |

##### Zabbix Options

This image comes with Zabbix Agent 1 (Classic or C compiled) and Zabbix Agent 2 (Modern, or Go compiled). See which variables work for each version and make your agent choice. Drop files in `/etc/zabbix/zabbix_agentd.conf.d` to setup your metrics. The environment variables below only affect the system end of the configuration. If you wish to use your own system configuration without these variables, change `ZABBIX_SETUP_TYPE` to `MANUAL`
Expand Down Expand Up @@ -363,14 +364,15 @@ e.g: `2021-07-01 23:01:04 04-scheduling 2 container`
Use the values in your own bash script using the `$1` `$2` `$3` `$4` `$5` syntax.
Change time and date and settings with these environment variables

| Parameter | Description | Default |
| ------------------------------------- | ------------------------------------------------------------ | ---------------------------------- |
| `CONTAINER_PROCESS_HELPER_PATH` | Path to file external helper scripts | `/assets/container/processhelper/` |
| `CONTAINER_PROCESS_HELPER_SCRIPT` | Default helper script name | `processhelper.sh` |
| `CONTAINER_PROCESS_HELPER_DATE_FMT` | Date format passed to external script | `%Y-%m-%d` |
| `CONTAINER_PROCESS_HELPER_TIME_FMT` | Time format passed to external script | `%H:%M:%S` |
| `CONTAINER_PROCESS_RUNAWAY_PROTECTOR` | Disables a service if executed more than (x) amount of times | `TRUE` |
| `CONTAINER_PROCESS_RUNAWAY_LIMIT` | Disables a service if executed more than (x) amount of times | `50` |
| Parameter | Description | Default |
| --------------------------------------------- | --------------------------------------------------------------- | ---------------------------------- |
| `CONTAINER_PROCESS_HELPER_PATH` | Path to file external helper scripts | `/assets/container/processhelper/` |
| `CONTAINER_PROCESS_HELPER_SCRIPT` | Default helper script name | `processhelper.sh` |
| `CONTAINER_PROCESS_HELPER_DATE_FMT` | Date format passed to external script | `%Y-%m-%d` |
| `CONTAINER_PROCESS_HELPER_TIME_FMT` | Time format passed to external script | `%H:%M:%S` |
| `CONTAINER_PROCESS_RUNAWAY_PROTECTOR` | Disables a service if executed more than (x) amount of times | `TRUE` |
| `CONTAINER_PROCESS_RUNAWAY_LIMIT` | The amount of times it needs to restart before disabling | `50` |
| `CONTAINER_PROCESS_RUNAWAY_SHOW_OUTPUT_FINAL` | Show the program Output on the final execution before disabling | `TRUE` |

### Networking

Expand Down
1 change: 1 addition & 0 deletions install/assets/defaults/00-container
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ CONTAINER_PROCESS_HELPER_SCRIPT=${CONTAINER_PROCESS_HELPER_SCRIPT:-"processhelpe
CONTAINER_PROCESS_HELPER_TIME_FMT=${CONTAINER_PROCESS_HELPER_TIME_FMT:-"%H:%M:%S"}
CONTAINER_PROCESS_RUNAWAY_PROTECTOR=${CONTAINER_PROCESS_RUNAWAY_PROTECTOR:-"TRUE"}
CONTAINER_PROCESS_RUNAWAY_LIMIT=${CONTAINER_PROCESS_RUNAWAY_LIMIT:-"50"}
CONTAINER_PROCESS_RUNAWAY_SHOW_OUTPUT_FINAL=${CONTAINER_PROCESS_RUNAWAY_SHOW_OUTPUT_FINAL:-"TRUE"}
CONTAINER_SCHEDULING_BACKEND=${CONTAINER_SCHEDULING_BACKEND:-"cron"}
CONTAINER_SCHEDULING_LOCATION=${CONTAINER_SCHEDULING_LOCATION:-"/assets/cron/"}
CONTAINER_SKIP_SANITY_CHECK=${CONTAINER_SKIP_SANITY_CHECK:-"FALSE"}
Expand Down
15 changes: 9 additions & 6 deletions install/assets/functions/00-container
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ create_zabbix() {
print_debug "Adding Zabbix Auto Register configuration for '$1'"
if var_true "${CONTAINER_ENABLE_MONITORING}" && [ "${CONTAINER_MONITORING_BACKEND,,}" = "zabbix" ]; then
source /assets/defaults/03-monitoring
cat <<EOF > "${ZABBIX_CONFIG_PATH}"/"${ZABBIX_CONFIG_FILE}.d"/tiredofit_$1.conf
cat <<EOF > "${ZABBIX_CONFIG_PATH}"/"${ZABBIX_CONFIG_FILE}.d"/tiredofit_"$1".conf
# Zabbix $1 Configuration - Automatically Generated
# Autoregister=$autoregister
EOF
Expand Down Expand Up @@ -158,7 +158,7 @@ custom_scripts() {
fi

if [ -d "${ccustom_scripts_source}" ] && dir_notempty ; then
for ccustom_script in ${ccustom_scripts_source}/*.sh ; do
for ccustom_script in "${ccustom_scripts_source}"/*.sh ; do
if [ -x "$ccustom_script" ] && [ ! -d "$ccustom_script" ] ; then
print_debug "Custom Script executing: '${ccustom_script}'"
exec ${ccustom_script}
Expand Down Expand Up @@ -301,11 +301,11 @@ db_ready() {
}

dir_empty() {
[ ! -n "$(ls -A $1 2>/dev/null)" ]
[ ! -n "$(ls -A "$1" 2>/dev/null)" ]
}

dir_notempty() {
[ -n "$(ls -A $1 2>/dev/null)" ]
[ -n "$(ls -A "$1" 2>/dev/null)" ]
}

file_env() {
Expand Down Expand Up @@ -728,6 +728,9 @@ print_start() {
fi

if [ "${CONTAINER_PROCESS_RUNAWAY_PROTECTOR,,}" = "true" ] ; then
if "${CONTAINER_PROCESS_RUNAWAY_SHOW_OUTPUT_FINAL,,}" = "true" ] ; then
if [ "${proc_start_count}" -eq "${CONTAINER_PROCESS_RUNAWAY_LIMIT}" ] ; then SHOW_OUTPUT=TRUE ; fi
fi
if [ "${proc_start_count}" -gt "${CONTAINER_PROCESS_RUNAWAY_LIMIT}" ] ; then
print_error "POTENTIAL RUNWAY DETECTECTED: Disabling $(basename $PWD) service because it has tried restarting '${CONTAINER_PROCESS_RUNAWAY_LIMIT}' times"
s6-svc -d /var/run/s6/legacy-services/$(basename "$PWD")
Expand Down Expand Up @@ -989,8 +992,8 @@ showoff() {
fi
fi
echo "H4sIAAAAAAAAA61RQRLEIAi78wpvXAq971t68CE8vgni2s7urWUGEyRBHVt7JTYzc+Ga4WD+T+Q/pm9jmQNbIZpNN9OOpGSqnA6I4jJlp1RZZ2OZUbrK3B9nxWw5VB9NiOFNCt5ta8s0kSD3suiBxOQDRh0WxSWQcbuYj9Mp4KuksKAoOVm3qlvRfq1Vl4Nj5fkvZnCsnEeFItgXAgAA" | base64 -d | gunzip
echo ${is}
echo ${ir}
echo "${is}"
echo "${ir}"
echo "H4sIAAAAAAAAA1NQgAOfzOxUhdxKhfL8omx7hbDM4swShYySkoJiK3398vJyvZLMotSU/LTMEr3kRP3igvy84vwiLgD/c17OQAAAAA==" | base64 -d | gunzip
echo ""
}
Expand Down

0 comments on commit d447f61

Please sign in to comment.