mirror of
https://github.com/FunnyWolf/agentic-soc-platform.git
synced 2026-08-22 13:12:56 +02:00
update Forwarder
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
# Webhook Forwarder Service
|
||||
|
||||
This is a standalone FastAPI service that listens for webhooks from various sources (like Splunk, Kibana) and forwards them to a Redis stream.
|
||||
|
||||
## Installation
|
||||
|
||||
This service has its own dependencies, listed in `requirements.txt`. It is recommended to use a dedicated virtual environment.
|
||||
|
||||
1. Navigate to the project root directory.
|
||||
2. Install the dependencies:
|
||||
```bash
|
||||
pip install -r PLUGINS/Forwarder/requirements.txt
|
||||
```
|
||||
|
||||
## Running the Service
|
||||
|
||||
You can run the service using `uvicorn`. From the project root directory, execute the following command:
|
||||
|
||||
```bash
|
||||
uvicorn PLUGINS.Forwarder.main:app --host 0.0.0.0 --port 8001 --reload
|
||||
```
|
||||
|
||||
- `--host 0.0.0.0`: Makes the service accessible from outside its container/machine.
|
||||
- `--port 8001`: Runs on port 8001 (configurable in `PLUGINS/Forwarder/CONFIG.py`).
|
||||
- `--reload`: Automatically restarts the server when code changes are detected. Ideal for development.
|
||||
|
||||
## API Endpoints
|
||||
|
||||
- `GET /`: A simple health check endpoint.
|
||||
- `POST /api/v1/webhook/splunk`: Accepts Splunk alert webhooks.
|
||||
- `POST /api/v1/webhook/kibana`: Accepts Kibana (Elasticsearch) alert webhooks.
|
||||
- `POST /api/v1/webhook/nocolymail`: Accepts NocolyMail webhooks.
|
||||
@@ -1,4 +0,0 @@
|
||||
fastapi
|
||||
uvicorn[standard]
|
||||
redis
|
||||
pydantic
|
||||
@@ -0,0 +1,23 @@
|
||||
# PLUGINS/Forwarder/uvicorn.toml
|
||||
|
||||
[server]
|
||||
# Path to the FastAPI application: module_name.variable_name
|
||||
# This assumes the uvicorn command is run from the project root.
|
||||
app = "PLUGINS.Forwarder.main:app"
|
||||
|
||||
# Host address to listen on
|
||||
host = "0.0.0.0"
|
||||
|
||||
# Port to listen on. This should match the port defined in PLUGINS/Forwarder/CONFIG.py (8001)
|
||||
port = 8001
|
||||
|
||||
# Number of worker processes. For production, consider using multiple workers
|
||||
# (e.g., workers = 2 or more, depending on your server's CPU cores).
|
||||
workers = 1
|
||||
|
||||
# Log level. Set to "info" or "warning" for production to reduce verbosity.
|
||||
log_level = "info"
|
||||
|
||||
# Disable auto-reloading for background/production environments.
|
||||
# Set to true for development if you want the server to restart on code changes.
|
||||
reload = false
|
||||
Reference in New Issue
Block a user