Webhooks are the core of ServerSnug's delivery system, enabling passive, real-time push updates from our threat intelligence. We gather data from our monitoring servers and send notifications directly to your configured endpoints when threats match your thresholds &emdash; no polling required.
Generate or Provide a Webhook URL: In your server management or dashboard settings, enter a secure HTTPS URL (e.g., https://yourserver.com/webhook/serversnug). We recommend using authentication of API keys for security.
Set Threat Thresholds: Choose which levels trigger updates (e.g., only critical for minimal noise). This filters what we send based on our classifications.
Test the Webhook: Use the "Test" button to send a sample payload. Check your server logs for receipt.
Integration Examples:
Node.js: Use Express to handle POST requests:
app.post('/webhook/serversnug', (req, res) => {
const threat = req.body; // { ip: '1.2.3.4', level: 'critical', details: '...' }
// Update blocklist here
res.sendStatus(200);
});
Python (Flask):
@app.route('/webhook/serversnug', methods=['POST'])
def handle_webhook():
threat = request.json
# Process threat data
return '', 200
For Nginx/Apache, route to a script that processes the JSON payload.
Troubleshooting:
No updates? Check thresholds, webhook status, and subscription limits.
Security:
Always validate payloads and use HTTPS.
For advanced setups, like custom payloads or integrations, see Advanced Features (/help/advanced-features). If needed, Contact Support (/support).