log-analyzer-vibes
Version:
A security log analyzer with prescriptive intelligence
18 lines (13 loc) • 513 B
JavaScript
export function generateRecommendations(insights) {
const recommendations = [];
if (insights.notFound > 100) {
recommendations.push('High number of 404s detected. Check broken links.');
}
insights.suspiciousIPs.forEach(ip => {
recommendations.push(`Suspicious activity from IP ${ip}. Consider blocking it.`);
});
if (insights.errors > 50) {
recommendations.push('Many errors detected. Review server logs.');
}
return recommendations;
}