# Log monitoring: how to get alerts about errors in logs

Source: https://checkcraft.ru/en/guides/log-monitoring.html · updated 2026-11-24

How to set up log monitoring: from a simple tail and grep script on one server to alerts in Grafana Loki, Graylog and Kibana.

Practical workflow

Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. [Download, no sign-up →](https://checkcraft.ru/en/download-checkcraft.html#free-download)

Log monitoring means you learn about an error in the log yourself and right away, not from a user a day later. One server needs just a script; several services need a central log store with alert rules. Below are options in order of complexity and what exactly to watch.

Checkcraft · 24 November 2026

Get help with your first test →

## What to watch

Not all errors matter equally. Start with three signals: a sharp rise in ERROR count over a few minutes, new error messages never seen before, and critical events such as a payment decline or a database write failure. Review the rest in reports, not alerts.

## How not to drown in alerts

Use thresholds over an interval, not every single error. Group identical messages. Every alert should say what to do: if the response is always nothing, turn it off. Otherwise in a week the team will ignore them all.

Searching Kibana after every request? Checkcraft finds the record by traceId and checks it together with the response. [Download Free →](https://checkcraft.ru/en/download-checkcraft.html#free-download)

## Monitoring and tests complement each other

Monitoring catches errors after users hit them. Log checks in autotests catch them before the release: the test sends a request, takes the traceId and confirms there is no ERROR in the log. Together they cover regression and unexpected failures.

## Monitoring options

| Scale | How | Pros | Cons |
|---|---|---|---|
| One server | tail and grep script, journalctl -f | Nothing to install | No history or grouping |
| Several services | Grafana Loki alert rules | Cheap storage, next to metrics | Collection setup |
| Ready system | Graylog | Collection, search, alerts in one box | A separate server |
| Logs in Elasticsearch | Kibana alert rules | Uses what you have | Some connectors need paid Elastic tiers |

## Simplest single-file monitoring

```
#!/bin/sh
# простейший мониторинг одного файла: сообщение в лог системы при каждой новой ERROR
tail -n 0 -F /var/log/app/app.log | grep --line-buffered "ERROR" | while read -r line; do
  logger -t app-alert "$line"   # замените на отправку в мессенджер или почту
done
```

## A Loki alert rule

```
# правило оповещения Grafana Loki: больше 20 ошибок payments за 5 минут
groups:
  - name: payments
    rules:
      - alert: PaymentsErrors
        expr: sum(count_over_time({service="payments"} |= "ERROR" [5m])) > 20
        for: 2m
        labels:
          severity: critical
```

A threshold over an interval and the for delay protect against alerts on a single error. Tune the threshold to the normal weekly error background.

## Launch checklist

1. Logs carry timestamp, level and traceId.
2. 3–5 events you must know about immediately are defined.
3. Each alert has a clear action and an owner.
4. Noisy alerts are reviewed weekly.
5. Key scenarios check logs in autotests before release.

The last item covers what monitoring cannot: finding the error before users do. See [API regression testing](https://checkcraft.ru/en/guides/api-regression-testing.html).

## More on logs

Section overview and all guides: [Log file: what it is, where it is stored and how to read logs on Linux and Windows](https://checkcraft.ru/en/guides/log-file-basics.html).

- [Log analysis without programming: where to start](https://checkcraft.ru/en/guides/log-analysis-no-code.html)
- [Search logs by traceId online: find every line of a request and its errors](https://checkcraft.ru/en/guides/log-search-online.html)
- [traceId: what it is and how to find a request in the logs](https://checkcraft.ru/en/guides/trace-id.html)
- [Find request logs by traceId in Kibana](https://checkcraft.ru/en/guides/kibana-logs-search.html)
- [Automate API and log checks with Kibana](https://checkcraft.ru/en/guides/api-kibana-workflow.html)

Next step

## Repeat this on your own API

Checkcraft is a desktop app that saves API response checks without code and shows what did not match. Start with a sample, then use your own sanitized data. Free runs on Windows and Linux with no time limit.

[Download Free](https://checkcraft.ru/en/download-checkcraft.html#free-download) · [Download and first run](https://checkcraft.ru/en/download-checkcraft.html)

No sign-up or email needed, the archive is ready in a couple of minutes. See the [edition limits](https://checkcraft.ru/en/pricing.html).

## Continue with a related task

[Log analysis tools: 9 options and how to choose in 2026](https://checkcraft.ru/en/guides/log-analysis-tools.html) · [Log file: what it is, where it is stored and how to read logs on Linux and Windows](https://checkcraft.ru/en/guides/log-file-basics.html) · [Find request logs by traceId in Kibana](https://checkcraft.ru/en/guides/kibana-logs-search.html) · [API regression testing and response comparison](https://checkcraft.ru/en/guides/api-regression-testing.html) · [How to give an AI agent access to logs without handing over SSH or passwords](https://checkcraft.ru/en/guides/ai-agent-log-access.html)

Start with the linked example and compare its result with your own test requirement.

Ask a person

## Get help with your first test

Tell us what you want to test or where you got stuck. We can help you start Checkcraft, choose an example and understand your first run. You can ask before downloading.

[Ask in Telegram](https://t.me/checkcraftchat)Send an email

The Telegram group is public: do not post passwords, tokens or confidential work data. A description of your task is enough to start.

You can also email us support@checkcraft.ru

Page card: /ai/pages/en/guides/log-monitoring.md
