Skip to content

LxnChan/PC-Conf-Collector-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configuration Collector Server

Usage

  1. Create a database in a mysql instance.
  2. Run source code
    go run main.go -dsn "user:password@tcp(db.local:3306)/dbname"
    Or Pre-compiled:
    go build -o ConfCollectorServer-linux-x64 main.go
    ./ConfCollectorServer-linux-x64 -dsn "user:password@tcp(db.local:3306)/dbname"
  3. Use Client to POST data
    pcconfcollector.exe -s "http://nas.local:32531/api/report"

Environment

  • Go 1.21+
  • MySQL 5.7+ or MariaDB 10.3+
  • github.com/go-sql-driver/mysql

APITest

curl -X POST http://nas.local:32531/api/report \
  -H "Content-Type: application/json" \
  -d '{
    "timestamp": "2024-01-15 14:30:25",
    "computer_name": "DESKTOP-ABC123",
    "board_serial": "MB-123456789",
    "os_version": "Microsoft Windows 11 Pro"
  }'

About

Collects hardware information reported by clients and writes it to the database.

Resources

Stars

Watchers

Forks

Languages