mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-30 13:55:05 +02:00
Compare commits
6 Commits
pocketbase
...
checkmk
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b50df957fe | ||
|
|
c5cbb46743 | ||
|
|
d134fa200c | ||
|
|
48774489f6 | ||
|
|
909e290d5e | ||
|
|
504ce22752 |
20
.github/workflows/close_issue_in_dev.yaml
generated
vendored
20
.github/workflows/close_issue_in_dev.yaml
generated
vendored
@@ -62,10 +62,10 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
issues=$(gh issue list --repo community-scripts/ProxmoxVED --json number,title --jq '.[] | {number, title}')
|
||||
|
||||
|
||||
best_match_score=0
|
||||
best_match_number=0
|
||||
|
||||
|
||||
for issue in $(echo "$issues" | jq -r '. | @base64'); do
|
||||
_jq() {
|
||||
echo ${issue} | base64 --decode | jq -r ${1}
|
||||
@@ -113,7 +113,8 @@ jobs:
|
||||
const http = require('http');
|
||||
const url = require('url');
|
||||
|
||||
function request(fullUrl, opts) {
|
||||
function request(fullUrl, opts, redirectsLeft) {
|
||||
if (redirectsLeft === undefined) redirectsLeft = 5;
|
||||
return new Promise(function(resolve, reject) {
|
||||
const u = url.parse(fullUrl);
|
||||
const isHttps = u.protocol === 'https:';
|
||||
@@ -128,6 +129,19 @@ jobs:
|
||||
if (body) options.headers['Content-Length'] = Buffer.byteLength(body);
|
||||
const lib = isHttps ? https : http;
|
||||
const req = lib.request(options, function(res) {
|
||||
// Follow redirects (301/302/307/308)
|
||||
if ([301, 302, 307, 308].indexOf(res.statusCode) !== -1 && res.headers.location && redirectsLeft > 0) {
|
||||
res.resume();
|
||||
const nextUrl = url.resolve(fullUrl, res.headers.location);
|
||||
// For 301/302, browsers historically downgrade to GET; preserve method for 307/308.
|
||||
const nextOpts = Object.assign({}, opts);
|
||||
if (res.statusCode === 301 || res.statusCode === 302) {
|
||||
nextOpts.method = 'GET';
|
||||
delete nextOpts.body;
|
||||
}
|
||||
resolve(request(nextUrl, nextOpts, redirectsLeft - 1));
|
||||
return;
|
||||
}
|
||||
let data = '';
|
||||
res.on('data', function(chunk) { data += chunk; });
|
||||
res.on('end', function() {
|
||||
|
||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -448,6 +448,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-04-29
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- PatchMon: Unpin release [@tremor021](https://github.com/tremor021) ([#14097](https://github.com/community-scripts/ProxmoxVE/pull/14097))
|
||||
|
||||
## 2026-04-28
|
||||
|
||||
### 🆕 New Scripts
|
||||
@@ -459,6 +467,10 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- Fix Dawarich Install/Update [@Jerry1098](https://github.com/Jerry1098) ([#14078](https://github.com/community-scripts/ProxmoxVE/pull/14078))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- PatchMon Version 2.0.2 Script update [@9technologygroup](https://github.com/9technologygroup) ([#14095](https://github.com/community-scripts/ProxmoxVE/pull/14095))
|
||||
|
||||
## 2026-04-27
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@@ -23,26 +23,25 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /opt/checkmk_version.txt ]]; then
|
||||
if ! command -v omd &>/dev/null; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
|
||||
RELEASE=$(curl_with_retry "https://api.github.com/repos/checkmk/checkmk/tags" "-" | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
|
||||
RELEASE="${RELEASE%%+*}"
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
msg_info "Updating checkmk"
|
||||
$STD omd stop monitoring
|
||||
$STD omd cp monitoring monitoringbackup
|
||||
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.$(get_os_info codename)_amd64.deb" -o "/opt/checkmk.deb"
|
||||
$STD apt-get install -y /opt/checkmk.deb
|
||||
curl_with_retry "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-community-${RELEASE}_0.$(get_os_info codename)_amd64.deb" "/opt/checkmk.deb"
|
||||
$STD apt install -y /opt/checkmk.deb
|
||||
$STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring
|
||||
$STD omd start monitoring
|
||||
$STD omd -f rm monitoringbackup
|
||||
$STD omd cleanup
|
||||
rm -rf /opt/checkmk.deb
|
||||
msg_ok "Updated ${APP}"
|
||||
msg_ok "Updated checkmk"
|
||||
msg_ok "Updated successfully!"
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
10
ct/debian.sh
10
ct/debian.sh
@@ -7,11 +7,11 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
|
||||
APP="Debian"
|
||||
var_tags="${var_tags:-os}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-ubuntu}"
|
||||
var_version="${var_version:-22}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-2}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
|
||||
@@ -3,7 +3,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: vhsdream
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/PatcMmon/PatchMon
|
||||
# Source: https://github.com/PatchMon/PatchMon
|
||||
|
||||
APP="PatchMon"
|
||||
var_tags="${var_tags:-monitoring}"
|
||||
@@ -29,8 +29,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE="v2.0.1"
|
||||
if check_for_gh_release "PatchMon" "PatchMon/PatchMon" "${RELEASE}"; then
|
||||
if check_for_gh_release "PatchMon" "PatchMon/PatchMon"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop patchmon-server
|
||||
msg_ok "Stopped Service"
|
||||
@@ -73,12 +72,13 @@ function update_script() {
|
||||
msg_ok "Migration complete!"
|
||||
fi
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "PatchMon" "PatchMon/PatchMon" "singlefile" "${RELEASE}" "/opt/patchmon" "patchmon-server-linux-amd64"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "PatchMon" "PatchMon/PatchMon" "singlefile" "latest" "/opt/patchmon" "patchmon-server-linux-amd64"
|
||||
mv /opt/patchmon/PatchMon /opt/patchmon/patchmon-server
|
||||
|
||||
msg_info "Fetching PatchMon agent binaries"
|
||||
RELEASE=$(get_latest_github_release "PatchMon/PatchMon")
|
||||
[[ ! -d /opt/patchmon/agents ]] && mkdir -p /opt/patchmon/agents
|
||||
FILE_URL="https://github.com/PatchMon/PatchMon/releases/download/${RELEASE}/patchmon-agent-"
|
||||
FILE_URL="https://github.com/PatchMon/PatchMon/releases/download/v${RELEASE}/patchmon-agent-"
|
||||
AGENT_NAME=(
|
||||
"linux-amd64"
|
||||
"linux-arm64"
|
||||
|
||||
@@ -14,10 +14,10 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Install Checkmk"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
|
||||
RELEASE=$(curl_with_retry "https://api.github.com/repos/checkmk/checkmk/tags" "-" | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
|
||||
RELEASE="${RELEASE%%+*}"
|
||||
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.$(get_os_info codename)_amd64.deb" -o "/opt/checkmk.deb"
|
||||
$STD apt-get install -y /opt/checkmk.deb
|
||||
curl_with_retry "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-community-${RELEASE}_0.$(get_os_info codename)_amd64.deb" "/opt/checkmk.deb"
|
||||
$STD apt install -y /opt/checkmk.deb
|
||||
rm -rf /opt/checkmk.deb
|
||||
echo "${RELEASE}" >"/opt/checkmk_version.txt"
|
||||
msg_ok "Installed Checkmk"
|
||||
@@ -29,14 +29,12 @@ MKPASSWORD=$(openssl rand -base64 18 | tr -d '/+=' | cut -c1-16)
|
||||
|
||||
echo -e "$MKPASSWORD\n$MKPASSWORD" | su - "$SITE_NAME" -c "cmk-passwd cmkadmin --stdin"
|
||||
$STD omd start "$SITE_NAME"
|
||||
|
||||
{
|
||||
echo "Application-Credentials"
|
||||
echo "Username: cmkadmin"
|
||||
echo "Password: $MKPASSWORD"
|
||||
echo "Site: $SITE_NAME"
|
||||
} >>~/checkmk.creds
|
||||
|
||||
msg_ok "Created Service"
|
||||
|
||||
cleanup_lxc
|
||||
|
||||
@@ -20,8 +20,8 @@ msg_ok "Installed Dependencies"
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="patchmon_db" PG_DB_USER="patchmon_usr" setup_postgresql_db
|
||||
|
||||
RELEASE="v2.0.1"
|
||||
fetch_and_deploy_gh_release "PatchMon" "PatchMon/PatchMon" "singlefile" "$RELEASE" "/opt/patchmon" "patchmon-server-linux-amd64"
|
||||
RELEASE="v2.0.2"
|
||||
fetch_and_deploy_gh_release "PatchMon" "PatchMon/PatchMon" "singlefile" "latest" "/opt/patchmon" "patchmon-server-linux-amd64"
|
||||
mv /opt/patchmon/PatchMon /opt/patchmon/patchmon-server
|
||||
|
||||
msg_info "Configuring PatchMon"
|
||||
@@ -64,8 +64,9 @@ EOF
|
||||
msg_ok "Configured PatchMon"
|
||||
|
||||
msg_info "Fetching PatchMon agent binaries"
|
||||
RELEASE=$(get_latest_github_release "PatchMon/PatchMon")
|
||||
mkdir -p /opt/patchmon/agents
|
||||
FILE_URL="https://github.com/PatchMon/PatchMon/releases/download/${RELEASE}/patchmon-agent-"
|
||||
FILE_URL="https://github.com/PatchMon/PatchMon/releases/download/v${RELEASE}/patchmon-agent-"
|
||||
AGENT_NAME=(
|
||||
"linux-amd64"
|
||||
"linux-arm64"
|
||||
|
||||
Reference in New Issue
Block a user