Agent pour collecter des informations système et les envoyer à une API centrale.
Project description
Watchman Agent Client
Agent d'inventaire système moderne et multi-plateforme pour collecter automatiquement les informations matérielles et logicielles de vos machines.
🎯 Fonctionnalités
- 📊 Collecte complète : Matériel, logiciels, réseau, processus système
- 🔄 Planification automatique : Quotidien, hebdomadaire, mensuel
- 🌐 Interface web intégrée : Dashboard local sur
http://localhost:8080 - ⚡ API REST : Envoi automatique des données vers votre serveur
- 🛠️ Multi-plateforme : Windows, Linux, macOS
- 🔧 Service système : Fonctionne en arrière-plan
🚀 Installation
Installation simple
pip install watchman-agent-client
Installation avec dépendances de développement
pip install watchman-agent-client[dev]
📖 Démarrage Rapide
1. Configuration
Créez un fichier de configuration config.ini :
[server]
url = https://votre-serveur.com/api/v1/inventory
auth_token = votre-token-ici
timeout = 30
verify_ssl = true
[agent]
reporting_frequency = daily
log_level = INFO
collect_software = true
collect_hardware = true
collect_network = true
2. Lancement de l'agent
Mode service (recommandé)
# L'agent démarre automatiquement après installation
# Interface web disponible sur http://localhost:8080
Mode ligne de commande
# Collecte et envoi immédiat
watchman-agent-client --mode collect-send --config-file config.ini
# Collecte uniquement
watchman-agent-client --mode collect --output-file inventaire.json
# Test de connectivité
watchman-agent-client --mode test --config-file config.ini
# Interface web uniquement
watchman-agent-client --mode web
3. Interface Web
Accédez au dashboard : http://localhost:8080
Fonctionnalités :
- 📊 Vue d'ensemble du système
- 🔄 Déclenchement manuel de collecte
- 📤 Envoi forcé vers le serveur
- ⚙️ Configuration en temps réel
- 📝 Consultation des logs
📋 Données Collectées
Informations Système
- Nom d'hôte, domaine, utilisateur
- OS, version, architecture
- CPU, mémoire, charge système
- Disques et partitions
Matériel
- Processeur (modèle, cœurs, fréquence)
- Mémoire RAM (total, modules)
- Stockage (disques, SSD)
- Cartes réseau et interfaces
Logiciels
- Applications installées
- Services système
- Pilotes et versions
- Mises à jour système
Réseau
- Interfaces (Ethernet, WiFi)
- Adressage IP, passerelles, DNS
- Ports ouverts
- Configuration DHCP/statique
🔧 Utilisation Avancée
Collecte programmatique
from agent.core.collector import InventoryCollector
from agent.core.config import AgentConfig
# Charger la configuration
config = AgentConfig('config.ini')
# Créer le collecteur
collector = InventoryCollector(config)
# Collecter les données
inventory = collector.collect_all()
print(inventory)
Envoi vers API
from agent.core.sender import InventorySender
from agent.core.config import AgentConfig
config = AgentConfig('config.ini')
sender = InventorySender(config)
# Envoyer l'inventaire
success = sender.send_inventory(inventory)
📁 Emplacements des Fichiers
Linux/macOS
/etc/watchman-agent-client/config.ini
/var/log/watchman-agent-client/agent.log
Windows
C:\Program Files\WatchmanAgentClient\config\config.ini
C:\Program Files\WatchmanAgentClient\logs\agent.log
🔒 Sécurité
- Interface web accessible uniquement en local (127.0.0.1)
- Authentification token pour les communications serveur
- Chiffrement SSL/TLS obligatoire
- Aucun token dans les logs
- Privilèges minimaux pour le service
📊 Format des Données
Les données sont envoyées au format JSON :
{
"assets": [{
"collection_timestamp": "2024-01-15T14:30:00Z",
"agent_version": "1.0.0",
"hostname": "PC-BUREAU-01",
"architecture": "x86_64",
"os": "Windows 11 Pro 22H2",
"ip": "192.168.1.100",
"mac": "aa:bb:cc:dd:ee:ff",
"cpu": {
"model": "Intel Core i7-12700K",
"cores": 12,
"frequency": "3600 MHz"
},
"memory": {
"total": "32 GB",
"available": "18 GB"
},
"applications": [...],
"network_interfaces": [...]
}]
}
🆘 Support & Documentation
- Documentation complète : docs.watchman.bj
- Signaler un bug : GitHub Issues
- Code source : GitHub Repository
📝 Changelog
Voir le fichier CHANGELOG.md pour l'historique des versions.
🤝 Contribution
Les contributions sont les bienvenues ! Consultez notre documentation sur docs.watchman.bj.
📄 Licence
MIT License - voir LICENSE pour plus de détails.
⭐ Support
Si vous trouvez ce projet utile, n'hésitez pas à lui donner une étoile sur GitHub !
Développé avec ❤️ par l'équipe Watchman
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file watchman_agent_client-1.0.1.tar.gz.
File metadata
- Download URL: watchman_agent_client-1.0.1.tar.gz
- Upload date:
- Size: 85.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
746efcacfe9f34516a37994aded62fd536664f0c453a44b2bd0e115dc43be9fa
|
|
| MD5 |
7fe5346ea8625f396871e1752c35118d
|
|
| BLAKE2b-256 |
3b58279c478730ded1da436aa89dfb057dac8c21ea4defe9ee4aaa38dd7649c7
|
File details
Details for the file watchman_agent_client-1.0.1-py3-none-any.whl.
File metadata
- Download URL: watchman_agent_client-1.0.1-py3-none-any.whl
- Upload date:
- Size: 95.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4003dcdc284c7679819f1bf2602504223a3faad2a1fe5205ce1ebb954ebfc6b
|
|
| MD5 |
80bcebc3e7791cc0a2362a2ddef1caf4
|
|
| BLAKE2b-256 |
abacf9b0d07128fe5d51a9e5331346e167e93286deeb25f583411049ed7ab157
|