From 6cbae55c8a03627d65b4cf500c4efae066dfe7aa Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Sun, 1 Feb 2026 23:39:10 +0800 Subject: [PATCH] Remove agent verification and installation scripts. --- LICENSE | 2 +- scripts/agent-verify.sh | 69 ----------------------------------------- scripts/install.sh | 67 --------------------------------------- 3 files changed, 1 insertion(+), 137 deletions(-) delete mode 100755 scripts/agent-verify.sh delete mode 100644 scripts/install.sh diff --git a/LICENSE b/LICENSE index 33145a4..4136aff 100644 --- a/LICENSE +++ b/LICENSE @@ -199,4 +199,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/scripts/agent-verify.sh b/scripts/agent-verify.sh deleted file mode 100755 index fadcf63..0000000 --- a/scripts/agent-verify.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# Colors -GREEN='\033[0;32m' -RED='\033[0;31m' -YELLOW='\033[0;33m' -NC='\033[0m' - -log_success() { echo -e "${GREEN}[OK]${NC} $1"; } -log_fail() { echo -e "${RED}[FAIL]${NC} $1"; } -log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; } -log_info() { echo -e "${NC}[INFO] $1"; } - -echo "---------------------------------------------------" -echo " Verifying Observability Agent Installation" -echo "---------------------------------------------------" - -# 1. Check Systemd Services -check_service() { - local service=$1 - if systemctl is-active --quiet "$service"; then - log_success "Service '$service' is running" - else - log_fail "Service '$service' is NOT running" - systemctl status "$service" --no-pager | head -n 10 - fi -} - -log_info "Checking Services..." -check_service "node_exporter" -check_service "process_exporter" -check_service "vector" - -# 2. Check Ports -check_port() { - local port=$1 - local name=$2 - if ss -tulnA | grep -q ":$port "; then - log_success "Port $port ($name) is listening" - else - log_fail "Port $port ($name) is NOT listening" - fi -} - -echo "" -log_info "Checking Ports..." -check_port 9100 "Node Exporter" -check_port 9256 "Process Exporter" - -# 3. Check Vector Connectivity / Logs -echo "" -log_info "Checking Vector Logs (Last 10 lines)..." -# Check for errors in the last few logs -if journalctl -u vector -n 20 --no-pager | grep -iE "error|fail"; then - log_warn "Possible errors found in Vector logs:" - journalctl -u vector -n 20 --no-pager | grep -iE "error|fail" -else - log_success "No recent errors found in Vector logs." -fi - -echo "" -log_info "Vector Status Summary:" -journalctl -u vector -n 5 --no-pager - -echo "" -echo "---------------------------------------------------" -echo " Verification Complete." -echo " If all services are OK, data should appear in your infrastructure dashboard." -echo "---------------------------------------------------" diff --git a/scripts/install.sh b/scripts/install.sh deleted file mode 100644 index 74bb37a..0000000 --- a/scripts/install.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -#==============================================================# -# File : install.sh -# Mtime : 2026-02-01 -# Desc : Install observability.svc.plus -# Usage : curl ... | bash -s -#==============================================================# - -# Default parameters -VERSION="${1:-main}" -DOMAIN="${2:-$(hostname)}" -REPO_URL="https://github.com/cloud-neutral-toolkit/observability.svc.plus.git" -INSTALL_DIR="${HOME}/pigsty" - -# Colors -RED='\033[0;31m' -GREEN='\033[0;32m' -BLUE='\033[0;34m' -NC='\033[0m' - -echo -e "${BLUE}Installing observability.svc.plus...${NC}" -echo -e "${BLUE}Version : ${VERSION}${NC}" -echo -e "${BLUE}Domain : ${DOMAIN}${NC}" -echo -e "${BLUE}Repo : ${REPO_URL}${NC}" -echo -e "${BLUE}Dir : ${INSTALL_DIR}${NC}" - -# Check for git -if ! command -v git &> /dev/null; then - echo -e "${RED}Error: git is not installed.${NC}" - echo "Please install git first (yum install git / apt install git)" - exit 1 -fi - -# Clone or Update -if [ -d "${INSTALL_DIR}" ]; then - echo -e "${BLUE}Directory ${INSTALL_DIR} already exists.${NC}" - read -p "Overwrite? (y/N) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - rm -rf "${INSTALL_DIR}" - git clone -b "${VERSION}" "${REPO_URL}" "${INSTALL_DIR}" - else - echo -e "${BLUE}Updating existing repo...${NC}" - cd "${INSTALL_DIR}" - git fetch origin - git checkout "${VERSION}" || echo -e "${RED}Version ${VERSION} not found${NC}" - git pull origin "${VERSION}" - fi -else - git clone -b "${VERSION}" "${REPO_URL}" "${INSTALL_DIR}" -fi - -cd "${INSTALL_DIR}" - -# Run Bootstrap -if [ -f "./bootstrap" ]; then - echo -e "${BLUE}Running bootstrap...${NC}" - ./bootstrap -else - echo -e "${RED}bootstrap script not found!${NC}" -fi - -echo -e "${GREEN}Installation successful!${NC}" -echo -e "Next steps:" -echo -e " cd ${INSTALL_DIR}" -echo -e " ./configure # Generate config" -echo -e " ./deploy.yml # Install"