目录

VIES API Checker

Advanced monitoring system for EU VIES API with automatic GitHub publishing.

Architecture

  1. Raspberry Pi - Data collection

    • Python script measures VIES API availability
    • Stores results in results.json
    • Automatically publishes to GitHub
  2. GitHub - Results publishing

    • Publicly available results.json file
    • Automatic updates on each measurement
    • Simple data download

Project Structure

urlChecker/
├── README.md
├── requirements.txt
├── checker.py              # Main VIES API checker
├── results.json           # Measurement results
├── config.json           # URL configuration
├── setup.sh              # Initialization script
└── deploy.sh             # GitHub publishing script

Installation and Setup

  1. Initialize project:

    chmod +x setup.sh
    ./setup.sh
  2. Install dependencies:

    pip install -r requirements.txt
  3. Configure URL in config.json

    • Edit list of URLs to monitor
    • Set check interval
  4. Setup GitHub repository:

    git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPO.git
    git push -u origin main
  5. Run monitoring: ```bash

    Single check

    python checker.py –once

Continuous monitoring

python checker.py


## Automation

For automatic execution on Raspberry Pi use cron:
```bash
# VIES API monitoring every 1 minute
*/1 * * * * cd /path/to/urlChecker && python checker.py

VIES API Monitoring

Specialized checker for EU VIES API focused on response time and success/fail tracking:

What it measures:

  • Response time - how long the API takes to respond (milliseconds)
  • Success/Fail rate - tracking successful vs failed requests
  • API availability - monitoring EU system uptime
  • Performance statistics - fastest, slowest, average response times

Example results:

{
  "total_checks": 10,
  "successful_checks": 9,
  "failed_checks": 1,
  "success_rate": 90.0,
  "avg_response_time_ms": 1456.2,
  "median_response_time_ms": 1472.2,
  "min_response_time_ms": 331.82,
  "max_response_time_ms": 2309.95,
  "last_10_values": [
    {
      "measurement": 1,
      "timestamp": "2024-01-15T10:00:00",
      "response_time_ms": 1247.83,
      "success": true
    }
  ]
}

Results

Results are automatically published to results.json in GitHub repository. Data includes:

Key metrics:

  • Timestamp - when the check was performed
  • Response time - how long the API took to respond (ms)
  • Success/Fail - whether the request was successful
  • Status code - HTTP response code
  • Error details - if the request failed

Statistics tracked:

  • Total checks - number of measurements
  • Success count - successful requests
  • Fail count - failed requests
  • Success rate - percentage of successful requests
  • Average response time - mean response time
  • Median response time - middle value (50th percentile)
  • Fastest response - minimum response time
  • Slowest response - maximum response time
  • Last 10 measurements - recent performance trends

Example output

📊 VIES API Statistics:
   Total checks: 10
   ✅ Success: 9
   ❌ Failed: 1
   Success rate: 90.0%
   ⏱️  Average response time: 1456.2ms
   📊 Median response time: 1472.2ms
   ⚡ Fastest: 331.82ms
   🐌 Slowest: 2309.95ms

📈 Last 10 measurements (for graphing):
   ✅ Success: 9
   ❌ Failed: 1
   Success rate: 90.0%
   ⏱️  Average response time: 1456.2ms

📊 Individual values:
   ✅ #1: 1247.83ms (2024-01-15T10:00:00)
   ✅ #2: 892.45ms (2024-01-15T10:01:00)
   ✅ #3: 2159.9ms (2024-01-15T10:02:00)
   ❌ #4: 15000.0ms (2024-01-15T10:03:00)
   ✅ #5: 331.82ms (2024-01-15T10:04:00)
   ✅ #6: 1927.18ms (2024-01-15T10:05:00)
   ✅ #7: 1503.94ms (2024-01-15T10:06:00)
   ✅ #8: 1472.17ms (2024-01-15T10:07:00)
   ✅ #9: 1787.64ms (2024-01-15T10:08:00)
   ✅ #10: 2309.95ms (2024-01-15T10:09:00)

JSON Output

The same statistics are saved to results.json in JSON format for easy processing:

{
  "total_checks": 10,
  "successful_checks": 9,
  "failed_checks": 1,
  "success_rate": 90.0,
  "avg_response_time_ms": 1456.2,
  "median_response_time_ms": 1472.2,
  "min_response_time_ms": 331.82,
  "max_response_time_ms": 2309.95,
  "last_10_values": [
    {
      "measurement": 1,
      "timestamp": "2024-01-15T10:00:00",
      "response_time_ms": 1247.83,
      "success": true
    }
  ],
  "last_updated": "2024-01-15T10:10:00.000000",
  "checker_version": "1.0"
}
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号