docs(public): sanitize release materials

This commit is contained in:
igor04091968
2026-06-03 08:52:20 +03:00
parent 18653e1a2f
commit a1801fca5f
175 changed files with 1121 additions and 17893 deletions
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Smoke checks for the Proxmox/gateway/1C host 10.10.10.2.
# Smoke checks for the Proxmox/gateway/1C host 192.0.2.2.
set -uo pipefail
@@ -193,25 +193,25 @@ section "Ports"
check_tcp "nginx http" 127.0.0.1 80
check_tcp "nginx https" 127.0.0.1 443
check_tcp "proxmox web" 127.0.0.1 8006
check_tcp "1C company API" 10.10.10.2 8710
check_tcp "1C company API" 192.0.2.2 8710
check_tcp "clickhouse native" 127.0.0.1 9000
check_tcp "clickhouse http" 127.0.0.1 8123
ss -tulpn | grep -E ':(80|443|8006|8710|8123|9000)\b' | sed 's/^/ /' || true
section "Gateway HTTP"
check_http_code "nginx healthz" "https://127.0.0.1/healthz" '^200$'
check_http_redirect "go proxmox gui" "https://127.0.0.1/go/proxmox-gui" '^30[1278]$' 'https://10.10.10.2:8006/'
check_http_redirect "go file1c brief" "https://127.0.0.1/go/file1c-brief" '^30[1278]$' 'http://10.10.10.2:8710/manager/brief'
check_http_redirect "go file1c actions" "https://127.0.0.1/go/file1c-actions" '^30[1278]$' 'http://10.10.10.2:8710/manager/actions'
check_http_redirect "go proxmox gui" "https://127.0.0.1/go/proxmox-gui" '^30[1278]$' 'https://192.0.2.2:8006/'
check_http_redirect "go file1c brief" "https://127.0.0.1/go/file1c-brief" '^30[1278]$' 'http://192.0.2.2:8710/manager/brief'
check_http_redirect "go file1c actions" "https://127.0.0.1/go/file1c-actions" '^30[1278]$' 'http://192.0.2.2:8710/manager/actions'
section "1C Company API"
check_http_code "1C root redirect" "http://10.10.10.2:8710/" '^307$'
check_http_code "1C /health" "http://10.10.10.2:8710/health" '^200$'
check_http_code "1C /api/health" "http://10.10.10.2:8710/api/health" '^200$'
check_http_code "1C manager brief" "http://10.10.10.2:8710/manager/brief" '^200$'
check_http_code "1C manager actions" "http://10.10.10.2:8710/manager/actions" '^200$'
check_http_code "1C manager recovery" "http://10.10.10.2:8710/manager/recovery" '^200$'
check_http_code "1C weekly digest" "http://10.10.10.2:8710/manager/digest/weekly" '^200$'
check_http_code "1C root redirect" "http://192.0.2.2:8710/" '^307$'
check_http_code "1C /health" "http://192.0.2.2:8710/health" '^200$'
check_http_code "1C /api/health" "http://192.0.2.2:8710/api/health" '^200$'
check_http_code "1C manager brief" "http://192.0.2.2:8710/manager/brief" '^200$'
check_http_code "1C manager actions" "http://192.0.2.2:8710/manager/actions" '^200$'
check_http_code "1C manager recovery" "http://192.0.2.2:8710/manager/recovery" '^200$'
check_http_code "1C weekly digest" "http://192.0.2.2:8710/manager/digest/weekly" '^200$'
section "ClickHouse"
check_docker_container "aw-rus-1c-clickhouse"
+20 -20
View File
@@ -17,26 +17,26 @@ done
ANSIBLE_DIR="$REPO_ROOT/ansible"
INVENTORY="${AW_SMOKE_INVENTORY:-$ANSIBLE_DIR/inventory.ini}"
REMOTE_SCRIPT_SRC="$REPO_ROOT/scripts/aw-contour-smoke-10.10.10.2.sh"
REMOTE_SCRIPT_SRC="$REPO_ROOT/scripts/aw-contour-smoke-gateway.sh"
REMOTE_SCRIPT_DST="${AW_SMOKE_REMOTE_SCRIPT:-/usr/local/sbin/aw-contour-smoke.sh}"
REMOTE_RUST_SRC="${AW_SMOKE_REMOTE_RUST_SRC:-${CARGO_TARGET_DIR:-$REPO_ROOT/adk-rust/target}/release/aw-contour-smoke}"
REMOTE_RUST_DST="${AW_SMOKE_REMOTE_RUST_BIN:-/usr/local/sbin/aw-contour-smoke}"
AW_SERVER="${AW_SMOKE_AW_SERVER:-http://10.10.10.13:5600}"
WORKTIME_API="${AW_SMOKE_WORKTIME_API:-http://10.10.10.13:5610}"
GRAFANA_URL="${AW_SMOKE_GRAFANA_URL:-http://10.10.10.11:3000}"
AW_SERVER="${AW_SMOKE_AW_SERVER:-http://192.0.2.13:5600}"
WORKTIME_API="${AW_SMOKE_WORKTIME_API:-http://192.0.2.13:5610}"
GRAFANA_URL="${AW_SMOKE_GRAFANA_URL:-http://192.0.2.11:3000}"
GRAFANA_USER="${GRAFANA_USER:-igor}"
GRAFANA_PASSWORD="${GRAFANA_PASSWORD:-}"
PROXMOX_HOST="${AW_SMOKE_PROXMOX_HOST:-10.10.10.2}"
AW_HOST="${AW_SMOKE_AW_HOST:-10.10.10.13}"
GRAFANA_HOST="${AW_SMOKE_GRAFANA_HOST:-10.10.10.11}"
WINDOWS_HOST="${AW_SMOKE_WINDOWS_HOST:-192.168.100.18}"
AW_SOURCE_HOSTNAME="${AW_SMOKE_SOURCE_HOSTNAME:-SHARKON2025}"
PROXMOX_HOST="${AW_SMOKE_PROXMOX_HOST:-192.0.2.2}"
AW_HOST="${AW_SMOKE_AW_HOST:-192.0.2.13}"
GRAFANA_HOST="${AW_SMOKE_GRAFANA_HOST:-192.0.2.11}"
WINDOWS_HOST="${AW_SMOKE_WINDOWS_HOST:-198.51.100.18}"
AW_SOURCE_HOSTNAME="${AW_SMOKE_SOURCE_HOSTNAME:-HOST-EXAMPLE}"
LOG_DIR="${AW_SMOKE_LOG_DIR:-$REPO_ROOT/output/smoke}"
RUN_REMOTE="${AW_SMOKE_RUN_REMOTE:-1}"
RUN_WINRM="${AW_SMOKE_RUN_WINRM:-1}"
RUN_SERVER_SYSTEMD="${AW_SMOKE_RUN_SERVER_SYSTEMD:-1}"
NO_PROXY_REQUIRED="localhost,127.0.0.1,$PROXMOX_HOST,$AW_HOST,$GRAFANA_HOST,$WINDOWS_HOST,10.10.10.0/24,192.168.100.0/24"
NO_PROXY_REQUIRED="localhost,127.0.0.1,$PROXMOX_HOST,$AW_HOST,$GRAFANA_HOST,$WINDOWS_HOST,192.0.2.0/24,198.51.100.0/24"
if [ -n "${no_proxy:-}" ]; then
export no_proxy="$no_proxy,$NO_PROXY_REQUIRED"
else
@@ -72,10 +72,10 @@ usage() {
Usage: $(basename "$0") [--skip-remote] [--skip-winrm] [--skip-server-systemd]
Environment overrides:
AW_SMOKE_AW_SERVER=http://10.10.10.13:5600
AW_SMOKE_WORKTIME_API=http://10.10.10.13:5610
AW_SMOKE_GRAFANA_URL=http://10.10.10.11:3000
AW_SMOKE_SOURCE_HOSTNAME=SHARKON2025
AW_SMOKE_AW_SERVER=http://192.0.2.13:5600
AW_SMOKE_WORKTIME_API=http://192.0.2.13:5610
AW_SMOKE_GRAFANA_URL=http://192.0.2.11:3000
AW_SMOKE_SOURCE_HOSTNAME=HOST-EXAMPLE
AW_SMOKE_ENV_FILE=$HOME/.config/aw-contour-smoke.env
AW_SMOKE_LOG_DIR=$REPO_ROOT/output/smoke
GRAFANA_USER/GRAFANA_PASSWORD via env or a local env file
@@ -436,7 +436,7 @@ check_bucket_freshness() {
run_remote_proxmox_script() {
if [ "$RUN_REMOTE" != "1" ]; then
skip "remote 10.10.10.2 smoke skipped"
skip "remote 192.0.2.2 smoke skipped"
return
fi
if ! have ansible; then
@@ -448,7 +448,7 @@ run_remote_proxmox_script() {
return
fi
section "Deploy Remote Script To 10.10.10.2"
section "Deploy Remote Script To 192.0.2.2"
if [ -x "$REMOTE_RUST_SRC" ]; then
if ANSIBLE_NOCOLOR=1 ansible proxmox -i "$INVENTORY" -m copy -a "src=$REMOTE_RUST_SRC dest=$REMOTE_RUST_DST owner=root group=root mode=0755" >/tmp/aw-smoke-copy-rust.$$ 2>&1; then
pass "remote Rust smoke deployed to $REMOTE_RUST_DST"
@@ -471,14 +471,14 @@ run_remote_proxmox_script() {
fi
rm -f /tmp/aw-smoke-copy.$$
section "Remote 10.10.10.2 Smoke"
section "Remote 192.0.2.2 Smoke"
local tmp
tmp="$(mktemp)"
if ANSIBLE_NOCOLOR=1 ansible proxmox -i "$INVENTORY" -m shell -a "$REMOTE_SCRIPT_DST" >"$tmp" 2>&1; then
pass "remote 10.10.10.2 smoke completed"
pass "remote 192.0.2.2 smoke completed"
sed 's/^/ /' "$tmp"
else
fail "remote 10.10.10.2 smoke failed"
fail "remote 192.0.2.2 smoke failed"
sed 's/^/ /' "$tmp"
fi
rm -f "$tmp"
@@ -582,7 +582,7 @@ if [ "$RUN_WINRM" = "1" ] && have ansible; then
check_ansible_module "Windows win_ping" aw_windows win_ping
check_ansible_win_shell "Windows sessions" aw_windows '$psi = [System.Diagnostics.ProcessStartInfo]::new(); $psi.FileName = "$env:SystemRoot\System32\query.exe"; $psi.Arguments = "user"; $psi.UseShellExecute = $false; $psi.RedirectStandardOutput = $true; $psi.RedirectStandardError = $true; $psi.StandardOutputEncoding = [System.Text.Encoding]::GetEncoding(866); $psi.StandardErrorEncoding = [System.Text.Encoding]::GetEncoding(866); $p = [System.Diagnostics.Process]::Start($psi); $out = $p.StandardOutput.ReadToEnd(); $err = $p.StandardError.ReadToEnd(); $p.WaitForExit(); [Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false); $out; if ($err) { $err }; if ($out -match "USERNAME|ПОЛЬЗОВАТЕЛЬ|администратор|Администратор") { exit 0 } else { exit $p.ExitCode }'
check_ansible_win_shell_warn "Windows collector processes" aw_windows '$p = Get-Process aw-watcher-afk,aw-watcher-window -ErrorAction SilentlyContinue; if ($p) { $p | Select-Object Name,Id,SessionId,StartTime | Format-Table -AutoSize } else { "no aw-watcher-afk/window process visible to this WinRM session" }'
check_ansible_win_shell "Windows ActivityWatch tasks" aw_windows 'schtasks /Query /TN "ActivityWatch Recovery" /FO LIST /V; schtasks /Query /TN "ActivityWatch Launch [SHARKON2025_Администратор]" /FO LIST /V'
check_ansible_win_shell "Windows ActivityWatch tasks" aw_windows 'schtasks /Query /TN "ActivityWatch Recovery" /FO LIST /V; schtasks /Query /TN "ActivityWatch Launch [HOST-EXAMPLE_Администратор]" /FO LIST /V'
else
skip "Windows WinRM checks skipped"
fi
+1 -1
View File
@@ -368,7 +368,7 @@ async function main() {
const playwright = requestedEngine === "chromium-cli" ? null : loadPlaywright();
const awBase = normalizeBase(env("AW_BROWSER_SMOKE_AW_BASE", env("AW_SMOKE_AW_SERVER", "http://127.0.0.1:5600")));
const worktimeBase = normalizeBase(env("AW_BROWSER_SMOKE_WORKTIME_BASE", env("AW_SMOKE_WORKTIME_API", "http://127.0.0.1:5610")));
const host = env("AW_BROWSER_SMOKE_HOST", env("AW_SMOKE_SOURCE_HOSTNAME", "SHARKON2025"));
const host = env("AW_BROWSER_SMOKE_HOST", env("AW_SMOKE_SOURCE_HOSTNAME", "HOST-EXAMPLE"));
const timeoutMs = Number(env("AW_BROWSER_SMOKE_TIMEOUT_MS", "20000"));
const settleMs = Number(env("AW_BROWSER_SMOKE_SETTLE_MS", "6000"));
const renderTimeoutMs = Number(env("AW_BROWSER_SMOKE_RENDER_TIMEOUT_MS", "15000"));
+10 -10
View File
@@ -84,20 +84,20 @@ seed_server_dlp_events() {
local ts
ts="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
ansible -i "$INVENTORY" aw_server -b -m ansible.builtin.shell -a "cat >/tmp/aw-endpoint-seed.json <<'JSON'
{\"timestamp\":\"${ts}\",\"duration\":0.0,\"data\":{\"hostname\":\"SHARKON2025\",\"signalType\":\"self_test\",\"source\":\"diag_and_manual_restart\",\"username\":\"system\",\"queueDepth\":0,\"eventsEnqueued\":0,\"eventsFlushed\":0,\"sendFailures\":0}}
{\"timestamp\":\"${ts}\",\"duration\":0.0,\"data\":{\"hostname\":\"HOST-EXAMPLE\",\"signalType\":\"self_test\",\"source\":\"diag_and_manual_restart\",\"username\":\"system\",\"queueDepth\":0,\"eventsEnqueued\":0,\"eventsFlushed\":0,\"sendFailures\":0}}
JSON
cat >/tmp/aw-fileops-seed-host.json <<'JSON'
{\"timestamp\":\"${ts}\",\"duration\":0.0,\"data\":{\"hostname\":\"SHARKON2025\",\"operation\":\"self_test\",\"source\":\"diag_and_manual_restart\"}}
{\"timestamp\":\"${ts}\",\"duration\":0.0,\"data\":{\"hostname\":\"HOST-EXAMPLE\",\"operation\":\"self_test\",\"source\":\"diag_and_manual_restart\"}}
JSON
cat >/tmp/aw-fileops-seed-server.json <<'JSON'
{\"timestamp\":\"${ts}\",\"duration\":0.0,\"data\":{\"hostname\":\"10.10.10.13\",\"operation\":\"self_test\",\"source\":\"diag_and_manual_restart\"}}
{\"timestamp\":\"${ts}\",\"duration\":0.0,\"data\":{\"hostname\":\"192.0.2.13\",\"operation\":\"self_test\",\"source\":\"diag_and_manual_restart\"}}
JSON
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-dlp-endpoint-signals_SHARKON2025' -H 'Content-Type: application/json' -d '{\"client\":\"aw-dlp-endpoint-signals\",\"type\":\"aw.dlp.endpoint.signal\",\"hostname\":\"SHARKON2025\"}' >/dev/null 2>&1 || true
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-file-operations_SHARKON2025' -H 'Content-Type: application/json' -d '{\"client\":\"aw-file-operations\",\"type\":\"aw.file.operation\",\"hostname\":\"SHARKON2025\"}' >/dev/null 2>&1 || true
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-file-operations_10.10.10.13' -H 'Content-Type: application/json' -d '{\"client\":\"aw-file-operations\",\"type\":\"aw.file.operation\",\"hostname\":\"10.10.10.13\"}' >/dev/null 2>&1 || true
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-dlp-endpoint-signals_SHARKON2025/heartbeat?pulsetime=30' -H 'Content-Type: application/json' --data-binary @/tmp/aw-endpoint-seed.json >/dev/null
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-file-operations_SHARKON2025/heartbeat?pulsetime=30' -H 'Content-Type: application/json' --data-binary @/tmp/aw-fileops-seed-host.json >/dev/null
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-file-operations_10.10.10.13/heartbeat?pulsetime=30' -H 'Content-Type: application/json' --data-binary @/tmp/aw-fileops-seed-server.json >/dev/null
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-dlp-endpoint-signals_HOST-EXAMPLE' -H 'Content-Type: application/json' -d '{\"client\":\"aw-dlp-endpoint-signals\",\"type\":\"aw.dlp.endpoint.signal\",\"hostname\":\"HOST-EXAMPLE\"}' >/dev/null 2>&1 || true
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-file-operations_HOST-EXAMPLE' -H 'Content-Type: application/json' -d '{\"client\":\"aw-file-operations\",\"type\":\"aw.file.operation\",\"hostname\":\"HOST-EXAMPLE\"}' >/dev/null 2>&1 || true
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-file-operations_192.0.2.13' -H 'Content-Type: application/json' -d '{\"client\":\"aw-file-operations\",\"type\":\"aw.file.operation\",\"hostname\":\"192.0.2.13\"}' >/dev/null 2>&1 || true
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-dlp-endpoint-signals_HOST-EXAMPLE/heartbeat?pulsetime=30' -H 'Content-Type: application/json' --data-binary @/tmp/aw-endpoint-seed.json >/dev/null
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-file-operations_HOST-EXAMPLE/heartbeat?pulsetime=30' -H 'Content-Type: application/json' --data-binary @/tmp/aw-fileops-seed-host.json >/dev/null
curl -sS -X POST 'http://127.0.0.1:5600/api/0/buckets/aw-file-operations_192.0.2.13/heartbeat?pulsetime=30' -H 'Content-Type: application/json' --data-binary @/tmp/aw-fileops-seed-server.json >/dev/null
" >/dev/null
}
@@ -108,7 +108,7 @@ restart_windows_collectors() {
seed_windows_dlp_events() {
log "Seeding endpoint/file-ops events from aw_windows..."
ansible -i "$INVENTORY" aw_windows -m ansible.windows.win_shell -a "powershell -NoProfile -ExecutionPolicy Bypass -Command \"\$ErrorActionPreference = 'Stop'; \$ts = (Get-Date).ToUniversalTime().ToString('o'); \$api='http://10.10.10.13:5600/api/0'; \$endpoint=@{timestamp=\$ts;duration=0.0;data=@{hostname='SHARKON2025';signalType='self_test';source='diag_and_manual_restart';username=\$env:USERNAME;queueDepth=0;eventsEnqueued=0;eventsFlushed=0;sendFailures=0}} | ConvertTo-Json -Depth 8 -Compress; \$fileops=@{timestamp=\$ts;duration=0.0;data=@{hostname='SHARKON2025';operation='self_test';source='diag_and_manual_restart';username=\$env:USERNAME}} | ConvertTo-Json -Depth 8 -Compress; Invoke-RestMethod -Method Post -Uri \$api'/buckets/aw-dlp-endpoint-signals_SHARKON2025' -ContentType 'application/json' -Body '{\\\"client\\\":\\\"aw-dlp-endpoint-signals\\\",\\\"type\\\":\\\"aw.dlp.endpoint.signal\\\",\\\"hostname\\\":\\\"SHARKON2025\\\"}' -TimeoutSec 15 -DisableKeepAlive -ErrorAction SilentlyContinue | Out-Null; Invoke-RestMethod -Method Post -Uri \$api'/buckets/aw-file-operations_SHARKON2025' -ContentType 'application/json' -Body '{\\\"client\\\":\\\"aw-file-operations\\\",\\\"type\\\":\\\"aw.file.operation\\\",\\\"hostname\\\":\\\"SHARKON2025\\\"}' -TimeoutSec 15 -DisableKeepAlive -ErrorAction SilentlyContinue | Out-Null; Invoke-RestMethod -Method Post -Uri \$api'/buckets/aw-dlp-endpoint-signals_SHARKON2025/heartbeat?pulsetime=30' -ContentType 'application/json' -Body \$endpoint -TimeoutSec 15 -DisableKeepAlive | Out-Null; Invoke-RestMethod -Method Post -Uri \$api'/buckets/aw-file-operations_SHARKON2025/heartbeat?pulsetime=30' -ContentType 'application/json' -Body \$fileops -TimeoutSec 15 -DisableKeepAlive | Out-Null; Write-Output 'windows-dlp-seeded'\""
ansible -i "$INVENTORY" aw_windows -m ansible.windows.win_shell -a "powershell -NoProfile -ExecutionPolicy Bypass -Command \"\$ErrorActionPreference = 'Stop'; \$ts = (Get-Date).ToUniversalTime().ToString('o'); \$api='http://192.0.2.13:5600/api/0'; \$endpoint=@{timestamp=\$ts;duration=0.0;data=@{hostname='HOST-EXAMPLE';signalType='self_test';source='diag_and_manual_restart';username=\$env:USERNAME;queueDepth=0;eventsEnqueued=0;eventsFlushed=0;sendFailures=0}} | ConvertTo-Json -Depth 8 -Compress; \$fileops=@{timestamp=\$ts;duration=0.0;data=@{hostname='HOST-EXAMPLE';operation='self_test';source='diag_and_manual_restart';username=\$env:USERNAME}} | ConvertTo-Json -Depth 8 -Compress; Invoke-RestMethod -Method Post -Uri \$api'/buckets/aw-dlp-endpoint-signals_HOST-EXAMPLE' -ContentType 'application/json' -Body '{\\\"client\\\":\\\"aw-dlp-endpoint-signals\\\",\\\"type\\\":\\\"aw.dlp.endpoint.signal\\\",\\\"hostname\\\":\\\"HOST-EXAMPLE\\\"}' -TimeoutSec 15 -DisableKeepAlive -ErrorAction SilentlyContinue | Out-Null; Invoke-RestMethod -Method Post -Uri \$api'/buckets/aw-file-operations_HOST-EXAMPLE' -ContentType 'application/json' -Body '{\\\"client\\\":\\\"aw-file-operations\\\",\\\"type\\\":\\\"aw.file.operation\\\",\\\"hostname\\\":\\\"HOST-EXAMPLE\\\"}' -TimeoutSec 15 -DisableKeepAlive -ErrorAction SilentlyContinue | Out-Null; Invoke-RestMethod -Method Post -Uri \$api'/buckets/aw-dlp-endpoint-signals_HOST-EXAMPLE/heartbeat?pulsetime=30' -ContentType 'application/json' -Body \$endpoint -TimeoutSec 15 -DisableKeepAlive | Out-Null; Invoke-RestMethod -Method Post -Uri \$api'/buckets/aw-file-operations_HOST-EXAMPLE/heartbeat?pulsetime=30' -ContentType 'application/json' -Body \$fileops -TimeoutSec 15 -DisableKeepAlive | Out-Null; Write-Output 'windows-dlp-seeded'\""
}
confirm_restart() {
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
set -eu
SERVER_HOST="10.10.10.13"
SERVER_HOST="192.0.2.13"
SERVER_PORT="5600"
POLL_INTERVAL="5"
INSTALL_ROOT="${HOME}/.local/opt/aw-console-ssh-logger"
@@ -50,7 +50,7 @@ usage() {
Usage: install_aw_console_ssh_logger.sh [options]
Options:
--server-host HOST AW server host (default: 10.10.10.13)
--server-host HOST AW server host (default: 192.0.2.13)
--server-port PORT AW server port (default: 5600)
--poll-interval SEC Poll interval for history/session tracking (default: 5)
-h, --help Show this help
+2 -2
View File
@@ -2,7 +2,7 @@
set -eu
VERSION="0.13.2"
SERVER_HOST="10.10.10.13"
SERVER_HOST="192.0.2.13"
SERVER_PORT="5600"
INSTALL_BASE="${HOME}/.local/opt/activitywatch"
BIN_DIR="${HOME}/.local/bin"
@@ -48,7 +48,7 @@ usage() {
Usage: install_aw_linux_client.sh [options]
Options:
--server-host HOST Remote AW server host (default: 10.10.10.13)
--server-host HOST Remote AW server host (default: 192.0.2.13)
--server-port PORT Remote AW server port (default: 5600)
--version VERSION ActivityWatch version (default: 0.13.2)
--install-base PATH Install root (default: ~/.local/opt/activitywatch)
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
set -eu
SERVER_HOST="10.10.10.13"
SERVER_HOST="192.0.2.13"
SERVER_PORT="5600"
POLL_INTERVAL="5"
AW_VERSION="0.13.2"
@@ -44,7 +44,7 @@ usage() {
Usage: install_aw_linux_remote_worker.sh [options]
Options:
--server-host HOST Remote AW server host (default: 10.10.10.13)
--server-host HOST Remote AW server host (default: 192.0.2.13)
--server-port PORT Remote AW server port (default: 5600)
--poll-interval SEC Poll interval for Linux loggers (default: 5)
--version VERSION ActivityWatch version for GUI watcher bundle (default: 0.13.2)
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
set -eu
SERVER_HOST="10.10.10.13"
SERVER_HOST="192.0.2.13"
SERVER_PORT="5600"
POLL_INTERVAL="5"
INSTALL_ROOT="${HOME}/.local/opt/aw-linux-web-category"
@@ -49,7 +49,7 @@ usage() {
Usage: install_aw_linux_web_category_logger.sh [options]
Options:
--server-host HOST AW server host (default: 10.10.10.13)
--server-host HOST AW server host (default: 192.0.2.13)
--server-port PORT AW server port (default: 5600)
--poll-interval SEC Poll interval in seconds (default: 5)
-h, --help Show this help
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
set -eu
SERVER_HOST="10.10.10.13"
SERVER_HOST="192.0.2.13"
SERVER_PORT="5600"
POLL_INTERVAL="5"
INSTALL_ROOT="/opt/aw-pve-webadmin-logger"
@@ -48,7 +48,7 @@ usage() {
Usage: install_aw_pve_webadmin_logger.sh [options]
Options:
--server-host HOST AW server host (default: 10.10.10.13)
--server-host HOST AW server host (default: 192.0.2.13)
--server-port PORT AW server port (default: 5600)
--poll-interval SEC Poll interval in seconds (default: 5)
-h, --help Show this help
+1 -1
View File
@@ -59,7 +59,7 @@ if [ ! -f "$LOCAL_CFG" ]; then
if [ -n "$host" ] || [ -n "$user" ] || [ -n "$password" ]; then
cat > "$LOCAL_CFG" <<EOF
@{
Host = '${host:-192.168.100.18}'
Host = '${host:-198.51.100.18}'
User = '${user:-Администратор}'
Password = '${password:-CHANGE_ME}'
Port = 22
+10 -10
View File
@@ -1,10 +1,10 @@
#!/bin/bash
# check-aw-data.sh - Проверка сбора данных ActivityWatch с RDP-сервера SHARKON2025
# Сервер: 10.10.10.13:5600
# Хост-источник: 192.168.100.18 (SHARKON2025)
# check-aw-data.sh - Проверка сбора данных ActivityWatch с RDP-сервера HOST-EXAMPLE
# Сервер: 192.0.2.13:5600
# Хост-источник: 198.51.100.18 (HOST-EXAMPLE)
SERVER="http://10.10.10.13:5600"
HOSTNAME_FILTER="SHARKON2025"
SERVER="http://192.0.2.13:5600"
HOSTNAME_FILTER="HOST-EXAMPLE"
NOW=$(date -u +%s)
HOST_INACTIVE=false
GUARD_HEALTHY=false
@@ -84,7 +84,7 @@ NC='\033[0m'
echo "=== ActivityWatch Data Check: $HOSTNAME_FILTER ==="
echo ""
echo -n "Server connectivity... "
RESP=$(no_proxy=10.10.10.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/info" 2>&1)
RESP=$(no_proxy=192.0.2.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/info" 2>&1)
if [ $? -eq 0 ] && echo "$RESP" | jq -e '.version' > /dev/null 2>&1; then
VERSION=$(echo "$RESP" | jq -r '.version')
echo -e "${GREEN}OK${NC} (aw-server $VERSION)"
@@ -95,7 +95,7 @@ fi
echo ""
# Context for inactive/event-driven classification.
WORKTIME_EVENT_DATA=$(no_proxy=10.10.10.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/buckets/aw-worktime-sessions_$HOSTNAME_FILTER/events?limit=1" 2>&1)
WORKTIME_EVENT_DATA=$(no_proxy=192.0.2.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/buckets/aw-worktime-sessions_$HOSTNAME_FILTER/events?limit=1" 2>&1)
WORKTIME_TS=$(echo "$WORKTIME_EVENT_DATA" | jq -r '.[0].timestamp // ""' 2>/dev/null)
WORKTIME_ACTIVE=$(echo "$WORKTIME_EVENT_DATA" | jq -r '.[0].data.active // false' 2>/dev/null)
if [ -n "$WORKTIME_TS" ]; then
@@ -108,7 +108,7 @@ if [ -n "$WORKTIME_TS" ]; then
fi
fi
GUARD_EVENT_DATA=$(no_proxy=10.10.10.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/buckets/aw-rus-collector-guard_$HOSTNAME_FILTER/events?limit=1" 2>&1)
GUARD_EVENT_DATA=$(no_proxy=192.0.2.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/buckets/aw-rus-collector-guard_$HOSTNAME_FILTER/events?limit=1" 2>&1)
GUARD_TS=$(echo "$GUARD_EVENT_DATA" | jq -r '.[0].timestamp // ""' 2>/dev/null)
GUARD_STATUS=$(echo "$GUARD_EVENT_DATA" | jq -r '.[0].data.status // ""' 2>/dev/null)
GUARD_PROBLEMS=$(echo "$GUARD_EVENT_DATA" | jq -r '([.[0].data.problems[]?] | length) // 0' 2>/dev/null)
@@ -142,7 +142,7 @@ for bucket in "${BUCKETS[@]}"; do
bucket_full="${bucket}_${HOSTNAME_FILTER}"
# Получаем последний event
EVENT_DATA=$(no_proxy=10.10.10.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/buckets/$bucket_full/events?limit=1" 2>&1)
EVENT_DATA=$(no_proxy=192.0.2.13 curl -s --connect-timeout 10 --max-time 15 "$SERVER/api/0/buckets/$bucket_full/events?limit=1" 2>&1)
LAST_ID=$(echo "$EVENT_DATA" | jq '.[0].id // 0')
LAST_TS=$(echo "$EVENT_DATA" | jq -r '.[0].timestamp // "no events"')
@@ -176,7 +176,7 @@ echo ""
# Проверка CORS
echo "--- CORS Check ---"
CORS_RESP=$(no_proxy=10.10.10.13 curl -s --connect-timeout 10 --max-time 15 -o /dev/null -w '%{http_code}' -H "Origin: http://10.10.10.13:5600" "$SERVER/api/0/settings/" 2>&1)
CORS_RESP=$(no_proxy=192.0.2.13 curl -s --connect-timeout 10 --max-time 15 -o /dev/null -w '%{http_code}' -H "Origin: http://192.0.2.13:5600" "$SERVER/api/0/settings/" 2>&1)
if [ "$CORS_RESP" = "200" ]; then
echo -e "${GREEN}CORS: OK${NC} (HTTP 200)"
else
+6 -6
View File
@@ -49,7 +49,7 @@ case "$1" in
TASK="Prepare a rebuild and validation checklist for install-kit-awindows, including rebuild_install_kit.sh, check_install_kit_vs_repo.sh, validate_install_kit.sh, and optional InnoSetup exe rebuild."
;;
windows-i18n)
TASK="Prepare a validation checklist for Windows localized account names and Cyrillic handling: CP866 query.exe decoding, SHARKON2025_Администратор scheduled task, WinRM output, SSH checks, and ActivityWatch Launch fallback rules."
TASK="Prepare a validation checklist for Windows localized account names and Cyrillic handling: CP866 query.exe decoding, HOST-EXAMPLE_Администратор scheduled task, WinRM output, SSH checks, and ActivityWatch Launch fallback rules."
;;
*)
TASK="$*"
@@ -85,14 +85,14 @@ Hard constraints:
- Assume Groq/free-tier constraints: keep the response compact.
Known operational facts:
- AW server: http://10.10.10.13:5600
- Worktime API: http://10.10.10.13:5610
- Grafana: http://10.10.10.11:3000
- RDP host: 192.168.100.18 / SHARKON2025
- AW server: http://192.0.2.13:5600
- Worktime API: http://192.0.2.13:5610
- Grafana: http://192.0.2.11:3000
- RDP host: 198.51.100.18 / HOST-EXAMPLE
- Ansible inventory: ansible/inventory.ini
- Windows deploy root: C:\\Program Files\\AWatch-rus
- Windows state root: C:\\ProgramData\\AWatch-rus
- Localized built-in Administrator launch task: ActivityWatch Launch [SHARKON2025_Администратор]
- Localized built-in Administrator launch task: ActivityWatch Launch [HOST-EXAMPLE_Администратор]
- For localized Windows console output, prefer query.exe user via CP866 decoding and emit UTF-8.
Task:
@@ -40,7 +40,7 @@ function Get-DetMirWindowsSetting {
return $Default
}
$Global:DetMirWindowsHost = Get-DetMirWindowsSetting -EnvName 'DETMIR_WINDOWS_SSH_HOST' -ConfigKey 'Host' -Default '192.168.100.18'
$Global:DetMirWindowsHost = Get-DetMirWindowsSetting -EnvName 'DETMIR_WINDOWS_SSH_HOST' -ConfigKey 'Host' -Default '198.51.100.18'
$Global:DetMirWindowsUser = Get-DetMirWindowsSetting -EnvName 'DETMIR_WINDOWS_SSH_USER' -ConfigKey 'User' -Default 'Администратор'
$Global:DetMirWindowsPassword = Get-DetMirWindowsSetting -EnvName 'DETMIR_WINDOWS_SSH_PASSWORD' -ConfigKey 'Password'
$Global:DetMirWindowsPort = [int](Get-DetMirWindowsSetting -EnvName 'DETMIR_WINDOWS_SSH_PORT' -ConfigKey 'Port' -Default '22')
@@ -1,5 +1,5 @@
@{
Host = '192.168.100.18'
Host = '198.51.100.18'
User = 'Администратор'
Password = 'CHANGE_ME'
Port = 22
+2 -2
View File
@@ -88,8 +88,8 @@ if [[ ! -f ansible/inventory.ini ]]; then
fi
if [[ -t 0 ]]; then
prompt_secret AW_SSH_PASSWORD "Enter SSH password for aw_server (root@10.10.10.13)"
prompt_secret AW_WINRM_PASSWORD "Enter WinRM password for aw_windows (192.168.100.18)"
prompt_secret AW_SSH_PASSWORD "Enter SSH password for aw_server (root@192.0.2.13)"
prompt_secret AW_WINRM_PASSWORD "Enter WinRM password for aw_windows (198.51.100.18)"
fi
if [[ -z "${AW_SSH_PASSWORD:-}" || -z "${AW_WINRM_PASSWORD:-}" ]]; then
+3 -3
View File
@@ -4,8 +4,8 @@ set -euo pipefail
DAY=""
FROM=""
TO=""
AW_BASE_URL="${AW_BASE_URL:-http://10.10.10.13:5600/api/0}"
AW_WORKTIME_HOST="${AW_WORKTIME_HOST:-SHARKON2025}"
AW_BASE_URL="${AW_BASE_URL:-http://192.0.2.13:5600/api/0}"
AW_WORKTIME_HOST="${AW_WORKTIME_HOST:-HOST-EXAMPLE}"
AW_WORKTIME_DEFAULT_SAMPLE_SECONDS="${AW_WORKTIME_DEFAULT_SAMPLE_SECONDS:-30}"
AW_WORKTIME_MAX_SAMPLE_SECONDS="${AW_WORKTIME_MAX_SAMPLE_SECONDS:-300}"
OUT_DIR="${OUT_DIR:-reports}"
@@ -80,7 +80,7 @@ import urllib.request
from datetime import datetime, timedelta, timezone
base, host, default_sample, max_sample, from_d, to_d, csv_out, json_out = sys.argv[1:9]
base = (base or "http://10.10.10.13:5600").rstrip("/")
base = (base or "http://192.0.2.13:5600").rstrip("/")
if not base.endswith("/api/0"):
base = base + "/api/0"
default_sample = max(1.0, float(default_sample))