Files
proxmox/scripts/archive/consolidated/list/get-all-endpoints.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

375 lines
26 KiB
Bash
Executable File

#!/bin/bash
###############################################################################
# Get All Endpoints for All Services on All VMs
#
# This script extracts and displays all service endpoints across all VMs
# in the Proxmox infrastructure.
#
# Usage: ./get-all-endpoints.sh [--json] [--by-service] [--by-vmid]
###############################################################################
set -euo pipefail
# Load IP configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
# Color codes
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
RED='\033[0;31m'
NC='\033[0m' # No Color
BOLD='\033[1m'
# Output format (table, json, by-service, by-vmid)
OUTPUT_FORMAT="table"
# Parse arguments
if [[ "${1:-}" == "--json" ]]; then
OUTPUT_FORMAT="json"
elif [[ "${1:-}" == "--by-service" ]]; then
OUTPUT_FORMAT="by-service"
elif [[ "${1:-}" == "--by-vmid" ]]; then
OUTPUT_FORMAT="by-vmid"
fi
###############################################################################
# Endpoint Data Structure
###############################################################################
# Format: VMID|IP|Hostname|Service|Protocol|Port|Path|Public_Domain|Status|Purpose
# Note: Path is currently unused (empty) in all entries
declare -a ENDPOINTS=(
# Infrastructure Services
"100|192.168.11.32|proxmox-mail-gateway|SMTP|tcp|25|||Running|Email gateway"
"100|192.168.11.32|proxmox-mail-gateway|SMTP|tcp|587|||Running|Email gateway"
"100|192.168.11.32|proxmox-mail-gateway|SMTP|tcp|465|||Running|Email gateway"
"101|192.168.11.33|proxmox-datacenter-manager|Web|http|8006|||Running|Datacenter management"
"103|192.168.11.30|omada|Web|https|8043|||Running|Omada controller"
"104|192.168.11.31|gitea|Web|http|80|||Running|Git repository"
"104|192.168.11.31|gitea|Web|https|443|||Running|Git repository"
"105|${IP_NGINX_LEGACY:-192.168.11.26}|nginxproxymanager|Web|http|80|||Running|Nginx Proxy Manager (legacy)"
"105|${IP_NGINX_LEGACY:-192.168.11.26}|nginxproxymanager|Web|http|81|||Running|Nginx Proxy Manager Admin"
"105|${IP_NGINX_LEGACY:-192.168.11.26}|nginxproxymanager|Web|https|443|||Running|Nginx Proxy Manager"
"130|192.168.11.27|monitoring-1|Web|http|80|||Running|Monitoring services"
"130|192.168.11.27|monitoring-1|Web|https|443|||Running|Monitoring services"
"10233|192.168.0.166|npmplus|Web|http|80|||Running|NPMplus reverse proxy"
"10233|192.168.0.166|npmplus|Web|http|81|||Running|NPMplus admin"
"10233|192.168.0.166|npmplus|Web|https|443|||Running|NPMplus reverse proxy"
# RPC Translator Supporting Services
"106|192.168.11.110|redis-rpc-translator|Redis|tcp|6379|||Running|Distributed nonce management"
"107|192.168.11.111|web3signer-rpc-translator|Web3Signer|tcp|9000|||Running|Transaction signing"
"108|192.168.11.112|vault-rpc-translator|Vault|tcp|8200|||Running|Secrets management"
# Blockchain Validators
"1000|${IP_VALIDATOR_0:-${IP_VALIDATOR_0:-${IP_VALIDATOR_0:-${IP_VALIDATOR_0:-192.168.11.100}}}}|besu-validator-1|P2P|tcp|30303|||Running|Validator node 1"
"1000|${IP_VALIDATOR_0:-${IP_VALIDATOR_0:-${IP_VALIDATOR_0:-${IP_VALIDATOR_0:-192.168.11.100}}}}|besu-validator-1|Metrics|http|9545|||Running|Validator node 1 metrics"
"1001|${IP_VALIDATOR_1:-${IP_VALIDATOR_1:-${IP_VALIDATOR_1:-${IP_VALIDATOR_1:-192.168.11.101}}}}|besu-validator-2|P2P|tcp|30303|||Running|Validator node 2"
"1001|${IP_VALIDATOR_1:-${IP_VALIDATOR_1:-${IP_VALIDATOR_1:-${IP_VALIDATOR_1:-192.168.11.101}}}}|besu-validator-2|Metrics|http|9545|||Running|Validator node 2 metrics"
"1002|${IP_VALIDATOR_2:-${IP_VALIDATOR_2:-${IP_VALIDATOR_2:-${IP_VALIDATOR_2:-192.168.11.102}}}}|besu-validator-3|P2P|tcp|30303|||Running|Validator node 3"
"1002|${IP_VALIDATOR_2:-${IP_VALIDATOR_2:-${IP_VALIDATOR_2:-${IP_VALIDATOR_2:-192.168.11.102}}}}|besu-validator-3|Metrics|http|9545|||Running|Validator node 3 metrics"
"1003|${IP_VALIDATOR_3:-${IP_VALIDATOR_3:-${IP_VALIDATOR_3:-${IP_VALIDATOR_3:-192.168.11.103}}}}|besu-validator-4|P2P|tcp|30303|||Running|Validator node 4"
"1003|${IP_VALIDATOR_3:-${IP_VALIDATOR_3:-${IP_VALIDATOR_3:-${IP_VALIDATOR_3:-192.168.11.103}}}}|besu-validator-4|Metrics|http|9545|||Running|Validator node 4 metrics"
"1004|${IP_VALIDATOR_4:-${IP_VALIDATOR_4:-${IP_VALIDATOR_4:-${IP_VALIDATOR_4:-192.168.11.104}}}}|besu-validator-5|P2P|tcp|30303|||Running|Validator node 5"
"1004|${IP_VALIDATOR_4:-${IP_VALIDATOR_4:-${IP_VALIDATOR_4:-${IP_VALIDATOR_4:-192.168.11.104}}}}|besu-validator-5|Metrics|http|9545|||Running|Validator node 5 metrics"
# Blockchain Sentries
"1500|${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-192.168.11.150}}}}|besu-sentry-1|P2P|tcp|30303|||Running|Sentry node 1"
"1500|${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-${IP_BESU_RPC_0:-192.168.11.150}}}}|besu-sentry-1|Metrics|http|9545|||Running|Sentry node 1 metrics"
"1501|${IP_BESU_RPC_1:-${IP_BESU_RPC_1:-${IP_BESU_RPC_1:-${IP_BESU_RPC_1:-192.168.11.151}}}}|besu-sentry-2|P2P|tcp|30303|||Running|Sentry node 2"
"1501|${IP_BESU_RPC_1:-${IP_BESU_RPC_1:-${IP_BESU_RPC_1:-${IP_BESU_RPC_1:-192.168.11.151}}}}|besu-sentry-2|Metrics|http|9545|||Running|Sentry node 2 metrics"
"1502|${IP_BESU_RPC_2:-${IP_BESU_RPC_2:-${IP_BESU_RPC_2:-${IP_BESU_RPC_2:-192.168.11.152}}}}|besu-sentry-3|P2P|tcp|30303|||Running|Sentry node 3"
"1502|${IP_BESU_RPC_2:-${IP_BESU_RPC_2:-${IP_BESU_RPC_2:-${IP_BESU_RPC_2:-192.168.11.152}}}}|besu-sentry-3|Metrics|http|9545|||Running|Sentry node 3 metrics"
"1503|${IP_BESU_RPC_3:-${IP_BESU_RPC_3:-${IP_BESU_RPC_3:-${IP_BESU_RPC_3:-192.168.11.153}}}}|besu-sentry-4|P2P|tcp|30303|||Running|Sentry node 4"
"1503|${IP_BESU_RPC_3:-${IP_BESU_RPC_3:-${IP_BESU_RPC_3:-${IP_BESU_RPC_3:-192.168.11.153}}}}|besu-sentry-4|Metrics|http|9545|||Running|Sentry node 4 metrics"
"1504|${IP_BESU_SENTRY:-192.168.11.154}|besu-sentry-ali|P2P|tcp|30303|||Stopped|Sentry node (Ali)"
"1504|${IP_BESU_SENTRY:-192.168.11.154}|besu-sentry-ali|Metrics|http|9545|||Stopped|Sentry node (Ali) metrics"
# RPC Core Nodes
"2101|${RPC_CORE_1:-${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-192.168.11.21}}}1}|besu-rpc-core-1|Besu HTTP|http|8545|||Running|Core RPC node"
"2101|${RPC_CORE_1:-${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-192.168.11.21}}}1}|besu-rpc-core-1|Besu WebSocket|ws|8546|||Running|Core RPC node"
"2101|${RPC_CORE_1:-${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-192.168.11.21}}}1}|besu-rpc-core-1|P2P|tcp|30303|||Running|Core RPC node"
"2101|${RPC_CORE_1:-${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-192.168.11.21}}}1}|besu-rpc-core-1|Metrics|http|9545|||Running|Core RPC node metrics"
"2201|${RPC_PUBLIC_1:-192.168.11.221}|besu-rpc-public-1|Besu HTTP|http|8545|rpc-http-pub.d-bis.org|Running|Public RPC node"
"2201|${RPC_PUBLIC_1:-192.168.11.221}|besu-rpc-public-1|Besu WebSocket|ws|8546|rpc-ws-pub.d-bis.org|Running|Public RPC node"
"2201|${RPC_PUBLIC_1:-192.168.11.221}|besu-rpc-public-1|P2P|tcp|30303|||Running|Public RPC node"
"2201|${RPC_PUBLIC_1:-192.168.11.221}|besu-rpc-public-1|Metrics|http|9545|||Running|Public RPC node metrics"
"2301|${RPC_PRIVATE_1:-192.168.11.232}|besu-rpc-private-1|Besu HTTP|http|8545|rpc-http-prv.d-bis.org|Stopped|Private RPC node"
"2301|${RPC_PRIVATE_1:-192.168.11.232}|besu-rpc-private-1|Besu WebSocket|ws|8546|rpc-ws-prv.d-bis.org|Stopped|Private RPC node"
"2301|${RPC_PRIVATE_1:-192.168.11.232}|besu-rpc-private-1|P2P|tcp|30303|||Stopped|Private RPC node"
"2301|${RPC_PRIVATE_1:-192.168.11.232}|besu-rpc-private-1|Metrics|http|9545|||Stopped|Private RPC node metrics"
# Named RPC Nodes (Ali/Luis/Putu)
"2303|${RPC_NODE_233:-${RPC_NODE_233:-${RPC_NODE_233:-${RPC_NODE_233:-192.168.11.233}}}}|besu-rpc-ali-0x8a|Besu HTTP|http|8545|||Running|Ali RPC (0x8a identity)"
"2303|${RPC_NODE_233:-${RPC_NODE_233:-${RPC_NODE_233:-${RPC_NODE_233:-192.168.11.233}}}}|besu-rpc-ali-0x8a|Besu WebSocket|ws|8546|||Running|Ali RPC (0x8a identity)"
"2303|${RPC_NODE_233:-${RPC_NODE_233:-${RPC_NODE_233:-${RPC_NODE_233:-192.168.11.233}}}}|besu-rpc-ali-0x8a|P2P|tcp|30303|||Running|Ali RPC (0x8a identity)"
"2303|${RPC_NODE_233:-${RPC_NODE_233:-${RPC_NODE_233:-${RPC_NODE_233:-192.168.11.233}}}}|besu-rpc-ali-0x8a|Metrics|http|9545|||Running|Ali RPC (0x8a identity) metrics"
"2304|${RPC_NODE_234:-${RPC_NODE_234:-${RPC_NODE_234:-${RPC_NODE_234:-192.168.11.234}}}}|besu-rpc-ali-0x1|Besu HTTP|http|8545|||Running|Ali RPC (0x1 identity)"
"2304|${RPC_NODE_234:-${RPC_NODE_234:-${RPC_NODE_234:-${RPC_NODE_234:-192.168.11.234}}}}|besu-rpc-ali-0x1|Besu WebSocket|ws|8546|||Running|Ali RPC (0x1 identity)"
"2304|${RPC_NODE_234:-${RPC_NODE_234:-${RPC_NODE_234:-${RPC_NODE_234:-192.168.11.234}}}}|besu-rpc-ali-0x1|P2P|tcp|30303|||Running|Ali RPC (0x1 identity)"
"2304|${RPC_NODE_234:-${RPC_NODE_234:-${RPC_NODE_234:-${RPC_NODE_234:-192.168.11.234}}}}|besu-rpc-ali-0x1|Metrics|http|9545|||Running|Ali RPC (0x1 identity) metrics"
"2305|${RPC_NODE_235:-${RPC_NODE_235:-${RPC_NODE_235:-${RPC_NODE_235:-192.168.11.235}}}}|besu-rpc-luis-0x8a|Besu HTTP|http|8545|||Running|Luis RPC (0x8a identity)"
"2305|${RPC_NODE_235:-${RPC_NODE_235:-${RPC_NODE_235:-${RPC_NODE_235:-192.168.11.235}}}}|besu-rpc-luis-0x8a|Besu WebSocket|ws|8546|||Running|Luis RPC (0x8a identity)"
"2305|${RPC_NODE_235:-${RPC_NODE_235:-${RPC_NODE_235:-${RPC_NODE_235:-192.168.11.235}}}}|besu-rpc-luis-0x8a|P2P|tcp|30303|||Running|Luis RPC (0x8a identity)"
"2305|${RPC_NODE_235:-${RPC_NODE_235:-${RPC_NODE_235:-${RPC_NODE_235:-192.168.11.235}}}}|besu-rpc-luis-0x8a|Metrics|http|9545|||Running|Luis RPC (0x8a identity) metrics"
"2306|${RPC_NODE_236:-${RPC_NODE_236:-${RPC_NODE_236:-${RPC_NODE_236:-192.168.11.236}}}}|besu-rpc-luis-0x1|Besu HTTP|http|8545|||Running|Luis RPC (0x1 identity)"
"2306|${RPC_NODE_236:-${RPC_NODE_236:-${RPC_NODE_236:-${RPC_NODE_236:-192.168.11.236}}}}|besu-rpc-luis-0x1|Besu WebSocket|ws|8546|||Running|Luis RPC (0x1 identity)"
"2306|${RPC_NODE_236:-${RPC_NODE_236:-${RPC_NODE_236:-${RPC_NODE_236:-192.168.11.236}}}}|besu-rpc-luis-0x1|P2P|tcp|30303|||Running|Luis RPC (0x1 identity)"
"2306|${RPC_NODE_236:-${RPC_NODE_236:-${RPC_NODE_236:-${RPC_NODE_236:-192.168.11.236}}}}|besu-rpc-luis-0x1|Metrics|http|9545|||Running|Luis RPC (0x1 identity) metrics"
"2307|192.168.11.237|besu-rpc-putu-0x8a|Besu HTTP|http|8545|||Running|Putu RPC (0x8a identity)"
"2307|192.168.11.237|besu-rpc-putu-0x8a|Besu WebSocket|ws|8546|||Running|Putu RPC (0x8a identity)"
"2307|192.168.11.237|besu-rpc-putu-0x8a|P2P|tcp|30303|||Running|Putu RPC (0x8a identity)"
"2307|192.168.11.237|besu-rpc-putu-0x8a|Metrics|http|9545|||Running|Putu RPC (0x8a identity) metrics"
"2308|192.168.11.238|besu-rpc-putu-0x1|Besu HTTP|http|8545|||Running|Putu RPC (0x1 identity)"
"2308|192.168.11.238|besu-rpc-putu-0x1|Besu WebSocket|ws|8546|||Running|Putu RPC (0x1 identity)"
"2308|192.168.11.238|besu-rpc-putu-0x1|P2P|tcp|30303|||Running|Putu RPC (0x1 identity)"
"2308|192.168.11.238|besu-rpc-putu-0x1|Metrics|http|9545|||Running|Putu RPC (0x1 identity) metrics"
# ThirdWeb RPC Nodes
"2400|${RPC_THIRDWEB_PRIMARY:-192.168.11.240}|thirdweb-rpc-1|Nginx|https|443|rpc.public-0138.defi-oracle.io|Running|ThirdWeb RPC with translator (primary)"
"2400|${RPC_THIRDWEB_PRIMARY:-192.168.11.240}|thirdweb-rpc-1|Besu HTTP|http|8545|||Running|ThirdWeb RPC with translator (primary)"
"2400|${RPC_THIRDWEB_PRIMARY:-192.168.11.240}|thirdweb-rpc-1|Besu WebSocket|ws|8546|||Running|ThirdWeb RPC with translator (primary)"
"2400|${RPC_THIRDWEB_PRIMARY:-192.168.11.240}|thirdweb-rpc-1|Translator HTTP|http|9645|||Running|ThirdWeb RPC translator"
"2400|${RPC_THIRDWEB_PRIMARY:-192.168.11.240}|thirdweb-rpc-1|Translator WebSocket|ws|9646|||Running|ThirdWeb RPC translator"
"2400|${RPC_THIRDWEB_PRIMARY:-192.168.11.240}|thirdweb-rpc-1|P2P|tcp|30303|||Running|ThirdWeb RPC with translator (primary)"
"2400|${RPC_THIRDWEB_PRIMARY:-192.168.11.240}|thirdweb-rpc-1|Metrics|http|9545|||Running|ThirdWeb RPC with translator (primary) metrics"
"2401|${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-192.168.11.241}}}}|besu-rpc-thirdweb-0x8a-1|Besu HTTP|http|8545|||Running|ThirdWeb RPC instance 1"
"2401|${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-192.168.11.241}}}}|besu-rpc-thirdweb-0x8a-1|Besu WebSocket|ws|8546|||Running|ThirdWeb RPC instance 1"
"2401|${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-192.168.11.241}}}}|besu-rpc-thirdweb-0x8a-1|P2P|tcp|30303|||Running|ThirdWeb RPC instance 1"
"2401|${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-${RPC_THIRDWEB_1:-192.168.11.241}}}}|besu-rpc-thirdweb-0x8a-1|Metrics|http|9545|||Running|ThirdWeb RPC instance 1 metrics"
"2402|${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-192.168.11.242}}}}|besu-rpc-thirdweb-0x8a-2|Besu HTTP|http|8545|||Running|ThirdWeb RPC instance 2"
"2402|${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-192.168.11.242}}}}|besu-rpc-thirdweb-0x8a-2|Besu WebSocket|ws|8546|||Running|ThirdWeb RPC instance 2"
"2402|${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-192.168.11.242}}}}|besu-rpc-thirdweb-0x8a-2|P2P|tcp|30303|||Running|ThirdWeb RPC instance 2"
"2402|${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-${RPC_THIRDWEB_2:-192.168.11.242}}}}|besu-rpc-thirdweb-0x8a-2|Metrics|http|9545|||Running|ThirdWeb RPC instance 2 metrics"
"2403|192.168.11.243|besu-rpc-thirdweb-0x8a-3|Besu HTTP|http|8545|||Running|ThirdWeb RPC instance 3 (syncing)"
"2403|192.168.11.243|besu-rpc-thirdweb-0x8a-3|Besu WebSocket|ws|8546|||Running|ThirdWeb RPC instance 3 (syncing)"
"2403|192.168.11.243|besu-rpc-thirdweb-0x8a-3|P2P|tcp|30303|||Running|ThirdWeb RPC instance 3 (syncing)"
# Application Services - Blockchain Explorer
"5000|${IP_BLOCKSCOUT:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}0}|blockscout-1|Web|http|80|explorer.d-bis.org|Running|Blockchain explorer"
"5000|${IP_BLOCKSCOUT:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}0}|blockscout-1|Web|https|443|||Running|Blockchain explorer"
# Application Services - Firefly
"6200|${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-192.168.11.35}}}}|firefly-1|Web|http|80|||Running|Firefly DLT platform"
"6200|${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-192.168.11.35}}}}|firefly-1|Web|https|443|||Running|Firefly DLT platform"
"6200|${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-192.168.11.35}}}}|firefly-1|API|http|5000|||Running|Firefly API"
"6201|192.168.11.57|firefly-ali-1|Web|http|80|||Stopped|Firefly (Ali instance)"
"6201|192.168.11.57|firefly-ali-1|Web|https|443|||Stopped|Firefly (Ali instance)"
"6201|192.168.11.57|firefly-ali-1|API|http|5000|||Stopped|Firefly (Ali instance) API"
# Application Services - Hyperledger Fabric
"6000|192.168.11.65|fabric-1|Peer|tcp|7051|||Running|Hyperledger Fabric peer"
"6000|192.168.11.65|fabric-1|Orderer|tcp|7050|||Running|Hyperledger Fabric orderer"
# Application Services - Hyperledger Indy
"6400|192.168.11.64|indy-1|Indy|tcp|9701|||Running|Hyperledger Indy network"
"6400|192.168.11.64|indy-1|Indy|tcp|9702|||Running|Hyperledger Indy network"
"6400|192.168.11.64|indy-1|Indy|tcp|9703|||Running|Hyperledger Indy network"
"6400|192.168.11.64|indy-1|Indy|tcp|9704|||Running|Hyperledger Indy network"
"6400|192.168.11.64|indy-1|Indy|tcp|9705|||Running|Hyperledger Indy network"
"6400|192.168.11.64|indy-1|Indy|tcp|9706|||Running|Hyperledger Indy network"
"6400|192.168.11.64|indy-1|Indy|tcp|9707|||Running|Hyperledger Indy network"
"6400|192.168.11.64|indy-1|Indy|tcp|9708|||Running|Hyperledger Indy network"
# Application Services - DBIS Core Services
"10100|${DBIS_POSTGRES_PRIMARY:-192.168.11.105}|dbis-postgres-primary|PostgreSQL|tcp|5432|||Running|Primary database"
"10101|${DBIS_POSTGRES_REPLICA:-192.168.11.106}|dbis-postgres-replica-1|PostgreSQL|tcp|5432|||Running|Database replica"
"10120|192.168.11.120|dbis-redis|Redis|tcp|6379|||Running|Cache layer"
"10130|${IP_DBIS_FRONTEND:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}0}|dbis-frontend|Web|http|80|dbis-admin.d-bis.org,secure.d-bis.org|Running|Frontend admin console"
"10130|${IP_DBIS_FRONTEND:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}0}|dbis-frontend|Web|https|443|||Running|Frontend admin console"
"10150|${IP_DBIS_API:-192.168.11.155}|dbis-api-primary|API|http|3000|dbis-api.d-bis.org|Running|Primary API server"
"10151|${IP_DBIS_API_2:-192.168.11.156}|dbis-api-secondary|API|http|3000|dbis-api-2.d-bis.org|Running|Secondary API server"
# Application Services - MIM4U
"7811|${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-192.168.11.36}}}}|mim-api-1|Web|http|80|mim4u.org,secure.mim4u.org,training.mim4u.org|Running|MIM4U service (web + API)"
"7811|${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-192.168.11.36}}}}|mim-api-1|Web|https|443|||Running|MIM4U service (web + API)"
# Application Services - Oracle & Monitoring
"3500|192.168.11.29|oracle-publisher-1|Oracle|tcp|Various|||Running|Oracle publisher service"
"3501|192.168.11.28|ccip-monitor-1|Monitor|tcp|Various|||Running|CCIP monitoring service"
"5200|192.168.11.80|cacti-1|Web|http|80|||Running|Network monitoring (Cacti)"
"5200|192.168.11.80|cacti-1|Web|https|443|||Running|Network monitoring (Cacti)"
# Machine Learning Nodes
"3000|192.168.11.60|ml110|ML Services|tcp|Various|||Running|ML node 1"
"3001|192.168.11.61|ml110|ML Services|tcp|Various|||Running|ML node 2"
"3002|192.168.11.62|ml110|ML Services|tcp|Various|||Running|ML node 3"
"3003|192.168.11.63|ml110|ML Services|tcp|Various|||Running|ML node 4"
)
###############################################################################
# Output Functions
###############################################################################
print_table() {
printf "${BOLD}%-6s %-18s %-30s %-15s %-8s %-6s %-35s %-10s %-40s${NC}\n" \
"VMID" "IP Address" "Hostname" "Service" "Proto" "Port" "Public Domain" "Status" "Purpose"
echo "────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────"
for endpoint in "${ENDPOINTS[@]}"; do
IFS='|' read -r vmid ip hostname service protocol port path domain status purpose <<< "$endpoint"
status_color="${GREEN}"
[[ "$status" == "Stopped" ]] && status_color="${RED}"
domain_display="${domain:--}"
[[ ${#domain_display} -gt 33 ]] && domain_display="${domain_display:0:30}..."
printf "%-6s %-18s %-30s %-15s %-8s %-6s %-35s ${status_color}%-10s${NC} %-40s\n" \
"$vmid" "$ip" "$hostname" "$service" "$protocol" "$port" "$domain_display" "$status" "$purpose"
done
}
print_json() {
echo "["
local first=true
for endpoint in "${ENDPOINTS[@]}"; do
IFS='|' read -r vmid ip hostname service protocol port path domain status purpose <<< "$endpoint"
[[ "$first" == false ]] && echo ","
first=false
cat <<EOFMARKER
{
"vmid": "$vmid",
"ip": "$ip",
"hostname": "$hostname",
"service": "$service",
"protocol": "$protocol",
"port": "$port",
"domain": "${domain:-}",
"status": "$status",
"purpose": "$purpose",
"endpoint": "${protocol}://${ip}:${port}"
}
EOFMARKER
done
echo "]"
}
print_by_service() {
declare -A service_map
for endpoint in "${ENDPOINTS[@]}"; do
IFS='|' read -r vmid ip hostname service protocol port path domain status purpose <<< "$endpoint"
service_map["$service"]+="$endpoint|"
done
for service in $(printf '%s\n' "${!service_map[@]}" | sort); do
echo ""
printf "${BOLD}${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
printf "${BOLD}${CYAN}Service: $service${NC}\n"
printf "${BOLD}${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
echo ""
printf "%-6s %-18s %-30s %-8s %-6s %-35s %-10s\n" \
"VMID" "IP Address" "Hostname" "Proto" "Port" "Public Domain" "Status"
echo "──────────────────────────────────────────────────────────────────────────────────────────────────────"
IFS='|' read -ra endpoints <<< "${service_map[$service]}"
for endpoint in "${endpoints[@]}"; do
[[ -z "$endpoint" ]] && continue
IFS='|' read -r vmid ip hostname service protocol port path domain status purpose <<< "$endpoint"
status_color="${GREEN}"
[[ "$status" == "Stopped" ]] && status_color="${RED}"
domain_display="${domain:--}"
printf "%-6s %-18s %-30s %-8s %-6s %-35s ${status_color}%-10s${NC}\n" \
"$vmid" "$ip" "$hostname" "$protocol" "$port" "$domain_display" "$status"
done
done
}
print_by_vmid() {
declare -A vmid_map
for endpoint in "${ENDPOINTS[@]}"; do
IFS='|' read -r vmid ip hostname service protocol port path domain status purpose <<< "$endpoint"
vmid_map["$vmid"]+="$endpoint|"
done
for vmid in $(printf '%s\n' "${!vmid_map[@]}" | sort -n); do
echo ""
# Get first endpoint for VMID to get common info
IFS='|' read -r first_vmid first_ip first_hostname first_service first_protocol first_port first_domain first_status first_purpose <<< "$(echo "${vmid_map[$vmid]}" | cut -d'|' -f1)"
printf "${BOLD}${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
printf "${BOLD}${CYAN}VMID: $vmid | $first_hostname | $first_ip${NC}\n"
printf "${BOLD}${CYAN}Status: $first_status${NC}\n"
printf "${BOLD}${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
echo ""
printf "%-15s %-8s %-6s %-35s %-40s\n" \
"Service" "Proto" "Port" "Public Domain" "Purpose"
echo "────────────────────────────────────────────────────────────────────────────────────────────────────────"
IFS='|' read -ra endpoints <<< "${vmid_map[$vmid]}"
for endpoint in "${endpoints[@]}"; do
[[ -z "$endpoint" ]] && continue
IFS='|' read -r vmid ip hostname service protocol port path domain status purpose <<< "$endpoint"
domain_display="${domain:--}"
printf "%-15s %-8s %-6s %-35s %-40s\n" \
"$service" "$protocol" "$port" "$domain_display" "$purpose"
done
done
}
###############################################################################
# Main
###############################################################################
if [[ "$OUTPUT_FORMAT" != "json" ]]; then
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
printf "${BOLD}All Endpoints for All Services on All VMs${NC}\n"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
fi
case "$OUTPUT_FORMAT" in
json)
print_json
exit 0
;;
by-service)
print_by_service
;;
by-vmid)
print_by_vmid
;;
*)
print_table
;;
esac
if [[ "$OUTPUT_FORMAT" != "json" ]]; then
echo ""
printf "${BOLD}Total Endpoints: ${#ENDPOINTS[@]}${NC}\n"
echo ""
###############################################################################
# Summary Statistics
###############################################################################
running_count=0
stopped_count=0
declare -A unique_vmids
declare -A unique_services
for endpoint in "${ENDPOINTS[@]}"; do
IFS='|' read -r vmid ip hostname service protocol port path domain status purpose <<< "$endpoint"
unique_vmids["$vmid"]=1
unique_services["$service"]=1
[[ "$status" == "Running" ]] && ((running_count++)) || ((stopped_count++))
done
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Summary:"
echo " Total Endpoints: ${#ENDPOINTS[@]}"
echo " Running: ${GREEN}$running_count${NC}"
echo " Stopped: ${RED}$stopped_count${NC}"
echo " Unique VMIDs: ${#unique_vmids[@]}"
echo " Unique Services: ${#unique_services[@]}"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
fi