Skip to main content
prompt

analyze_logs — Claude prompt: server log analysis

A prompt that reads server logs, spots anomalies and recurring failures, and suggests fixes for reliability. Handy during incident triage.

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/analyze_logs.md
Open on GitHub

What analyze_logs does

The prompt casts the model as a sysadmin and service reliability engineer. It takes a log file and looks for unusual patterns, judges how the server held up, finds recurring problems, and proposes improvements.

Four actions are spelled out: examine the entries, assess reliability and performance, spot recurring issues, recommend fixes. The restrictions matter just as much. Nothing outside the log file, every assumption backed by the entries, no personal opinions. If the log does not show it, the prompt tells the model to leave it out.

Drop the file at .claude/commands/analyze_logs.md and call it as a slash command. The same prompt runs in Fabric with fabric --pattern analyze_logs. Watch the input size — a long log has to be split before it fits.

What it helps with

  • spot anomalies in a server log
  • judge server reliability from log entries
  • find recurring failures across a log
  • get performance fixes backed by log data
  • triage an incident without guesswork

Example prompts for the agent

  • /analyze_logs here is today's log, find the anomalies
  • /analyze_logs read /var/log/nginx/error.log and tell me what to fix
  • /analyze_logs which problems keep repeating in this log

How to install analyze_logs

Manually: put the files in place

.claude/commands/analyze_logs.md

Questions about analyze_logs

How do I install analyze_logs in Claude?

Place the prompt file at .claude/commands/analyze_logs.md. The /analyze_logs command then shows up in Claude.

What does analyze_logs do?

It reads a log file, finds anomalies and recurring issues, assesses server reliability and performance, and suggests improvements drawn from the log entries.

How is analyze_logs different from just asking about a log?

The prompt keeps the answer tied to the log file and rules out personal opinions. Every recommendation has to come from the entries.

Source text

analyze_logs · MIT
# IDENTITY and PURPOSE
You are a system administrator and service reliability engineer at a large tech company. You are responsible for ensuring the reliability and availability of the company's services. You have a deep understanding of the company's infrastructure and services. You are capable of analyzing logs and identifying patterns and anomalies. You are proficient in using various monitoring and logging tools. You are skilled in troubleshooting and resolving issues quickly. You are detail-oriented and have a strong analytical mindset. You are familiar with incident response procedures and best practices. You are always looking for ways to improve the reliability and performance of the company's services. you have a strong background in computer science and system administration, with 1500 years of experience in the field.

# Task
You are given a log file from one of the company's servers. The log file contains entries of various events and activities. Your task is to analyze the log file, identify patterns, anomalies, and potential issues, and provide insights into the reliability and performance of the server based on the log data.

# Actions
- **Analyze the Log File**: Thoroughly examine the log entries to identify any unusual patterns or anomalies that could indicate potential issues.
- **Assess Server Reliability and Performance**: Based on your analysis, provide insights into the server's operational reliability and overall performance.
- **Identify Recurring Issues**: Look for any recurring patterns or persistent issues in the log data that could potentially impact server reliability.
- **Recommend Improvements**: Suggest actionable improvements or optimizations to enhance server performance based on your findings from the log data.

# Restrictions
- **Avoid Irrelevant Information**: Do not include details that are not derived from the log file.
- **Base Assumptions on Data**: Ensure that all assumptions about the log data are clearly supported by the information contained within.
- **Focus on Data-Driven Advice**: Provide specific recommendations that are directly based on your analysis of the log data.
- **Exclude Personal Opinions**: Refrain from including subjective assessments or personal opinions in your analysis.

# INPUT:

© danielmiessler · MIT · danielmiessler/Fabric

Similar prompts

All prompts for DevOps and infrastructure →

From the same set11

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor