惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

NISL@THU
NISL@THU
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Darknet – Hacking Tools, Hacker News & Cyber Security
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
IT之家
IT之家
Cyberwarzone
Cyberwarzone
博客园_首页
博客园 - 聂微东
V
Visual Studio Blog
Cisco Talos Blog
Cisco Talos Blog
V
Vulnerabilities – Threatpost
Google DeepMind News
Google DeepMind News
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The Hacker News
The Hacker News
雷峰网
雷峰网
Last Week in AI
Last Week in AI
Spread Privacy
Spread Privacy
L
Lohrmann on Cybersecurity
O
OpenAI News
人人都是产品经理
人人都是产品经理
AWS News Blog
AWS News Blog
小众软件
小众软件
T
Tailwind CSS Blog
The Cloudflare Blog
L
LINUX DO - 最新话题
有赞技术团队
有赞技术团队
Know Your Adversary
Know Your Adversary
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
B
Blog
MyScale Blog
MyScale Blog
S
SegmentFault 最新的问题
S
Schneier on Security
The Last Watchdog
The Last Watchdog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
大猫的无限游戏
大猫的无限游戏
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
博客园 - Franky
I
InfoQ
P
Proofpoint News Feed
量子位
S
Security @ Cisco Blogs

Stonecharioteer on Tech

I Traced My Traffic Through a Home Tailscale Exit Node What Was I Reading Last? In Three Not-So-Easy Pieces Dogfooding Is Hard Code blocks in your books, finally GoForGo v0.9.0 Merrilin - We built an app to read books I use a Macbook now Data Structures & Algorithms - Preparing for Interviews Using a local DNS namespace for local service discovery Direction KOllector - Publishing KOReader Highlights gbt: branches touched in the last 24 hours A Soiree into Symbols in Ruby Some Smalltalk about Ruby Loops Ruby Blocks Returning from Ruby Blocks, Procs and Lambdas My Linux Laptop Finally Works: How Claude Helped Me Fix Years of Annoyances TIL: Watchexec - Modern File Watching for Development Workflows A Less Busy Mind GoForGo - Learn Go through live examples Migrating My Old Blog to Hugo with Claude The Qtile Window Manager: A Python-Powered Tiling Experience Read the RFCs that Built the Internet Py-x-Protobuf - Or How I Learned to Stop Worrying and Love Protocol Buffers Python Reverse a List New Beginnings Leaving ChainSafe Systems Screen Lock for Cinnamon Desktop using Zenity and Terminal Commands Crews Not Teams A System for Getting Better at LeetCode So Far So Rust Retrying HTTP Requests with Rust A Primer on Control Charts Learning Rust Explicit is Better than Implicit: Rust for Pythonistas Using Custom Delimiters in Jinja Templates TIL: Creating Fixed Length Iterables in Python Documentation Without Assumption Vagrant Python - A Reflection in 2022 Learning Golang No, A Virtual Machine Is Not Enough: Why Developers Need Native Linux Empathy in Tech For Those Who Came in Late A Weekend With PostgreSQL TIL: Gooey and Python Fire for Quick GUIs and CLIs TIL: 2ality - Dr. Axel Rauschmayer's JavaScript Blog TIL: MassDNS - High-Performance Bulk DNS Lookups TIL: Matomo Analytics, Google Tech Writing, Memory Programming, and NES TV Signals TIL: MontyDB - MongoDB Implemented in Python Returning to the Craft of Programming TIL: CPUFetch, OneFetch, and Learn CSS TIL: DNS Performance Testing and Pi-hole with Unbound TIL: Eli Bendersky's Blog, Awesome By Example, NoCoDB, and Martin Kleppmann TIL: CRDTs, Extreme HTTP Performance, and BYTEPATH Game TIL: AutoInvent, ASGI, Python Packaging, RAPIDS GPU Computing, and FlaskCon TIL: MangaDesk - Terminal Client for MangaDex TIL: McFly - Smart Shell History Search TIL: Siege Load Testing and Awesome FastAPI Resources TIL: Ventoy Bootable USB and Justniffer Network Analysis TIL: CLI Code Review, Git Split Diffs, and Internal Combustion Engine TIL: Benford's Law, Web Security Headers, Event Sourcing, and Mozilla Security Guidelines How to Write Documentation - The README.md File The Importance of Documentation TIL: NNgroup UX Research, SponsorBlock, and Labella Python Library TIL: The Little Book of Rust Macros and Rust Performance Book TIL: Git-Bug Distributed Issue Tracker and Omni Kubernetes Monitoring TIL: Zellij - Modern Terminal Multiplexer TIL: How Discord Handles 2.5 Million Concurrent Voice Users TIL: Volumio - The Audiophile Music Player TIL: Areopagitica - Milton's Defense of Free Speech TIL: Fast Node Manager, Zoxide Smart CD, Technical Writing, PyO3, and Qubes OS TIL: Slurm Workload Manager for HPC Clusters TIL: Data Visualization Guide and Oso Authorization Academy TIL: CORS Deep Dive, Piku Tiny PaaS, Rust Strings, and Deno Standard Library TIL: Raspberry Pi OS Development, Vim Beginner Guide, Password Management, and QueryBook TIL: uBlock Origin Performance Optimization on Firefox TIL: Breaking PostgreSQL at Scale and LeetCode Problem Patterns TIL: Awesome Tmux Resources for Terminal Multiplexing TIL: Grit - A Multitree-Based Personal Task Manager TIL: Lens 4.2 Kubernetes IDE, Shell Scripting Guide, and Dark HTTP Server Do The Job You Hate So You Won't Hate The Job You Love TIL: Innernet VPN Solution and NoteCalc Calculator App TIL: Argo CD for GitOps and Lens Kubernetes IDE TIL: Modern Rust CLI Tools - System Monitoring, HTTP Requests, and DNS TIL: tz - A Time Zone Helper Tool TIL: Distributed Systems Education, Fallacies, and Self-Hosted Internet Archiving TIL: Real-Time Voice Cloning Technology TIL: ChartMuseum for Helm, AMD's Corporate Journey, and Kubernetes Pod Scaling TIL: Docker and Kubernetes Tools - Whaler, Descheduler, and Dive TIL: Post-Mortem Collection, Terminal Plotting, and Technical Twitter TIL: Dark Mode Toggle Web Component by Google Chrome Labs TIL: Python eval(), exec(), and compile() Functions TIL: Camelot PDF Tables, PostgreSQL Row Level Security, Zerodha Varsity, and Write Yourself a Git TIL: fuser Command for Process and File Investigation TIL: i Hate Regex - The Ultimate Regex Cheat Sheet TIL: Dolt - Git for Data and Database Version Control TIL: x86 Assembly Programming and SafeEyes Break Reminder TIL: Comprehensive Distributed Systems Reading List TIL: Cosmopolitan C Library, Distributed Systems Book, High Performance Browser Networking, and Rust Roguelike Tutorial
TIL: GitHubtop Real-time Activity Monitor and GoAccess Web Log Analyzer
2021-02-16 · via Stonecharioteer on Tech

ghtop - Real-time GitHub Activity Monitor

GitHub - nat/ghtop: See what’s happening on GitHub in real time

Terminal-based tool for monitoring GitHub activity in real-time:

What It Does:

  • Live Activity: Real-time stream of GitHub events
  • API Consumption: Helpful for using up GitHub API quota quickly
  • Terminal Interface: htop-style display for GitHub events
  • Event Filtering: Focus on specific types of GitHub activity

Key Features:

Event Types Monitored:

  • Push Events: Code commits to repositories
  • Pull Requests: PR creation, updates, merges
  • Issues: Issue creation, comments, closures
  • Releases: New releases and tags
  • Forks: Repository forks
  • Stars: Repository stars and watches

Display Information:

User          Repository         Event Type    Time
alice         awesome-project    PushEvent     2s ago
bob           cool-tool         IssuesEvent    5s ago
charlie       web-framework     ForkEvent     8s ago
diana         data-viz          ReleaseEvent  12s ago

Use Cases:

API Quota Management:

  • Testing: Quickly consume API rate limits for testing
  • Development: Understand API usage patterns
  • Monitoring: Track when rate limits reset
  • Debugging: Test API error handling
  • Trending Activity: See what’s active on GitHub right now
  • Development Patterns: Understand when developers are most active
  • Project Monitoring: Watch for activity on specific projects
  • Language Trends: Observe which languages are being used

Educational Value:

  • GitHub API: Learn about GitHub’s event API structure
  • Real-time Data: Understand streaming data concepts
  • Rate Limiting: Experience API rate limiting firsthand

Installation and Usage:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Installation
npm install -g ghtop

# Basic usage
ghtop

# With API token for higher rate limits
GITHUB_TOKEN=your_token ghtop

# Filter by event type
ghtop --filter=PushEvent

GoAccess - Visual Web Log Analyzer

Real-time web log analyzer and interactive viewer:

Core Capabilities:

Log Format Support:

  • Apache: Common and combined log formats
  • Nginx: Standard and custom log formats
  • IIS: Microsoft web server logs
  • Amazon S3: S3 access logs
  • CloudFlare: CDN access logs
  • Custom Formats: Define your own log patterns

Real-time Analysis:

1
2
3
4
5
6
7
8
# Real-time monitoring
tail -f /var/log/nginx/access.log | goaccess -

# Generate HTML report
goaccess /var/log/nginx/access.log -o report.html

# Real-time HTML dashboard
goaccess /var/log/nginx/access.log -o report.html --real-time-html

Rich Analytics Dashboard:

Traffic Metrics:

  • Unique Visitors: Daily unique IP addresses
  • Requested Files: Most popular pages and resources
  • Static Requests: CSS, JS, images analytics
  • 404 Errors: Broken links and missing resources
  • Hosts: Top visitor IP addresses and domains

Detailed Reports:

Top Requested Files
┌─────────────────────────────────────────────────────┐
│ /index.html              │ 1,234 │ 15.2% │ 2.1 MB  │
│ /api/users               │   987 │ 12.1% │ 890 KB  │
│ /static/app.js           │   756 │  9.3% │ 1.5 MB  │
│ /login                   │   654 │  8.0% │ 234 KB  │
└─────────────────────────────────────────────────────┘

Operating Systems
┌─────────────────────────────────────────────────────┐
│ Linux                    │ 2,345 │ 45.6% │         │
│ Windows                  │ 1,876 │ 36.5% │         │
│ macOS                    │   789 │ 15.3% │         │
│ Unknown                  │   134 │  2.6% │         │
└─────────────────────────────────────────────────────┘

Advanced Features:

GeoIP Integration:

1
2
3
4
5
# Install GeoIP database
sudo apt-get install geoip-database

# Enable geographic reporting
goaccess --geoip-database=/usr/share/GeoIP/GeoIP.dat

Geographic Analytics:

  • Countries: Visitor distribution by country
  • Cities: Top cities accessing your site
  • Maps: Visual geographic representation
  • Timezone Analysis: Traffic patterns by timezone

Custom Log Formats:

1
2
3
4
5
6
7
8
9
# Define custom nginx format
goaccess --log-format='%h %^[%d:%t %^] "%r" %s %b "%R" "%u"' \
         --date-format='%d/%b/%Y' \
         --time-format='%T'

# Complex format with custom fields
goaccess --log-format='%h %^ %^ [%d:%t %^] "%r" %s %b "%R" "%u" %D %T' \
         --date-format='%d/%b/%Y' \
         --time-format='%T'

Interactive HTML Dashboard:

  • Real-time Updates: Live data streaming
  • Responsive Design: Mobile-friendly interface
  • Interactive Charts: Clickable graphs and tables
  • Export Options: PDF, CSV, JSON export capabilities

Performance Optimization:

Large Log Files:

1
2
3
4
5
6
7
8
# Use --no-global-config for better performance
goaccess --no-global-config /var/log/nginx/*.log

# Process compressed logs
zcat /var/log/nginx/*.gz | goaccess -

# Multiple log files
goaccess /var/log/nginx/access.log.* --log-format=COMBINED

Memory Management:

  • Streaming Mode: Process logs without loading entirely into memory
  • Incremental Updates: Add new log entries to existing reports
  • Disk Storage: Store data structures on disk for large datasets

Integration and Automation:

Automated Reporting:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#!/bin/bash
# Daily report generation
goaccess /var/log/nginx/access.log \
    --log-format=COMBINED \
    --output-format=html \
    --output=/var/www/html/stats/daily-$(date +%Y%m%d).html

# Email reports
goaccess /var/log/nginx/access.log \
    --log-format=COMBINED \
    --output-format=csv | \
    mail -s "Daily Website Stats" [email protected]

CI/CD Integration:

  • Performance Monitoring: Track site performance over time
  • Traffic Analysis: Understand user behavior patterns
  • Security Monitoring: Detect unusual access patterns
  • Capacity Planning: Analyze traffic growth trends

Configuration Options:

Color Schemes:

1
2
3
4
5
# Dark theme
goaccess --color-scheme=2

# Custom colors
goaccess --html-custom-css=styles.css

Filtering:

1
2
3
4
5
6
7
8
# Exclude specific IPs
goaccess --exclude-ip=192.168.1.1

# Include only specific paths
goaccess --ignore-panel=KEYPHRASES,REFERERS

# Date range filtering
goaccess --date-spec=hr  # Hourly breakdown

Both tools provide valuable insights into different aspects of software development and web operations - real-time GitHub activity monitoring and comprehensive web traffic analysis.