Skip to content

Commit b1de1fa

Browse files
authored
fix: Update Readme.md (#65)
* update readme Signed-off-by: amanycodes <amanycodes@gmail.com> * added license info Signed-off-by: amanycodes <amanycodes@gmail.com> * added demo gif Signed-off-by: amanycodes <amanycodes@gmail.com> * fixed demo gif height Signed-off-by: amanycodes <amanycodes@gmail.com> * update readme Signed-off-by: amanycodes <amanycodes@gmail.com> * update readme Signed-off-by: amanycodes <amanycodes@gmail.com> * Update README.md * mention macos in quick usage Signed-off-by: amanycodes <amanycodes@gmail.com> * fix arch mentions for linux and macOS * minor fixes Signed-off-by: amanycodes <amanycodes@gmail.com> --------- Signed-off-by: amanycodes <amanycodes@gmail.com>
1 parent fcf3556 commit b1de1fa

3 files changed

Lines changed: 101 additions & 22 deletions

File tree

README.md

Lines changed: 101 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,93 @@
1-
# preq
2-
![Coverage](https://img.shields.io/badge/Coverage-49.43%25-orange)
3-
[![Unit Tests](https://github.com/prequel-dev/cre/actions/workflows/build.yml/badge.svg)](https://github.com/prequel-dev/cre/actions/workflows/build.yml)
4-
[![Unit Tests](https://github.com/prequel-dev/preq/actions/workflows/build.yml/badge.svg)](https://github.com/prequel-dev/preq/actions/workflows/build.yml)
5-
[![Unit Tests](https://github.com/prequel-dev/prequel-compiler/actions/workflows/build.yml/badge.svg)](https://github.com/prequel-dev/prequel-compiler/actions/workflows/build.yml)
6-
7-
preq (prounounced "preek") is a free and open community-driven reliability problem detector
8-
9-
[Documentation](https://docs.prequel.dev) | [Slack](https://inviter.co/prequel) | [Playground](https://play.prequel.dev/) | [Mailing List](https://www.detect.sh)
1+
<h1 align="center" style="border-bottom: none">
2+
<a href="https://prequel.dev" target="_blank">
3+
<img alt="Preq" src="assets/prequel.png" width="120">
4+
</a>
5+
<br>
6+
preq
7+
</h1>
8+
9+
<p align="center">
10+
Visit <a href="https://docs.prequel.dev" target="_blank">docs.prequel.dev</a> for full documentation,
11+
examples, and guides.
12+
</p>
13+
14+
<div align="center">
15+
16+
[![Build – preq](https://img.shields.io/github/actions/workflow/status/prequel-dev/preq/build.yml?branch=main&label=preq%20CI&logo=github&style=for-the-badge)](https://github.com/prequel-dev/preq/actions/workflows/build.yml)
17+
[![Coverage](https://img.shields.io/badge/Coverage-49.43%25-orange?style=for-the-badge)](#)
18+
[![Release](https://img.shields.io/github/v/release/prequel-dev/preq?logo=github&style=for-the-badge)](https://github.com/prequel-dev/preq/releases)
19+
[![License](https://img.shields.io/badge/License-Apache--2.0-brightgreen?logo=apache&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
20+
[![Slack](https://img.shields.io/badge/Slack-join-4A154B?logo=slack&logoColor=white&style=for-the-badge)](https://inviter.co/prequel)
21+
[![Playground](https://img.shields.io/badge/Playground-WebAssembly-654FF0?logo=webassembly&logoColor=white&style=for-the-badge)](https://play.prequel.dev/)
22+
[![kubectl Krew](https://img.shields.io/badge/kubectl-krew-326CE5?logo=kubernetes&logoColor=white&style=for-the-badge)](#kubernetes-krew)
23+
24+
</div>
1025

1126
---
27+
`preq` (pronounced "preek") is a free and open community-driven reliability problem detector
1228

13-
Use preq to:
29+
<p align="center">
30+
<img src="assets/demo.gif" alt="preq demo" width="700">
31+
</p>
32+
33+
Use `preq` to:
1434

1535
- detect the latest bugs, misconfigurations, anti-patterns, and known issues from a community of practitioners
16-
- provide engineers, on-call support, and SRE agents with impact and community recommended mitigations
36+
- provide engineers, on-call support, and SRE agents with impact and community-recommended mitigations
1737
- hunt for new problems in distributed systems
1838

19-
preq is powered by [Common Reliability Enumerations (CREs)](https://github.com/prequel-dev/cre) that are contributed by the community and Prequel's Reliability Research Team. Reliability intelligence helps teams see a broad range of problems earlier, so they can prioritize, pinpoint, and reduce the risk of outages.
39+
`preq` is powered by [Common Reliability Enumerations (CREs)](https://github.com/prequel-dev/cre) that are contributed by the community and Prequel's Reliability Research Team. Reliability intelligence helps teams see a broad range of problems earlier, so they can prioritize, pinpoint, and reduce the risk of outages.
40+
2041

21-
## Download and Install
42+
43+
## Install `preq`
2244

2345
### Binary Distributions
2446

25-
Official binary distributions are available at [latest release](https://github.com/prequel-dev/preq/releases) for Linux (amd64), macOS (amd64 and arm64), and Windows (amd64). All macOS binaries are signed and notarized. No configuration is necessary to start using preq.
47+
Official binary distributions are available at [latest release](https://github.com/prequel-dev/preq/releases) for Linux (amd64 and arm64), macOS (arm64), and Windows (amd64). All macOS binaries are signed and notarized. No configuration is necessary to start using preq.
2648

2749
### Kubernetes
2850

29-
You can also install preq as a Krew plugin:
51+
You can also install `preq` as a Krew plugin:
3052

3153
```bash
3254
kubectl krew install preq
3355
```
3456

3557
See https://docs.prequel.dev/install for more information.
3658

37-
## Overview
59+
## Quick Usage
60+
61+
**Step 1**: Install and run the demo service (example macOS command below)
62+
63+
```bash
64+
curl -sL "$(curl -s https://api.github.com/repos/prequel-dev/preq-demo-app/releases/latest \
65+
| jq -r '.assets[] | select(.name | test("demo-darwin-arm64$")) .browser_download_url')" \
66+
-o demo && chmod +x demo && ./demo > preq-demo.log 2>&1
67+
```
68+
**Step 2**: Trigger a problem
69+
```bash
70+
curl http://localhost:8080/panic
71+
```
72+
**Step 3**: Detect the problem
73+
```bash
74+
cat preq-demo.log | preq -o -
75+
```
76+
You will see a detection printed with the corresponding CRE ID, severity, and suggested mitigation.
77+
78+
```bash
79+
Parsing rules done! [3 rules in 3ms; 433 rules/s]
80+
Problems detected done! [1 in 7ms; 144/s]
81+
Reading stdin done! [208.64KB in 4ms; 53.01MB/s]
82+
Matching lines done! [1.01K lines in 4ms; 275.29K lines/s]
83+
CRE-2025-0918 critical [1 hits @ 2025-03-11T10:00:19-04:00]
84+
```
85+
See our running `preq` guide for full walkthrough, including writing your own rules: https://docs.prequel.dev/running
86+
3887

39-
preq is powered by a rules engine that performs distributed matching and correlation of sequences of events across logs, metrics, traces, and other data sources to detect reliability problems. CREs provides accurate and timely context for a human or SRE agent to take action on problems.
88+
## Example CRE
4089

41-
Below is simple rule that looks for a sequence of events in a single log source over a window of time along with a negative condition (an event that should not occur during the window).
90+
This rule detects a specific sequence of events from one log source within a set time period. It also checks that a certain event does not occur during that period. If it does, the rule will not trigger.
4291

4392
```yaml title="cre-2024-0007.yaml" showLineNumbers
4493
cre:
@@ -84,11 +133,41 @@ rule:
84133
- SIGTERM received - shutting down
85134
```
86135
87-
## Running
136+
## Automated Actions using `preq`
137+
138+
You can connect detections to automated runbooks that take action when a CRE fires. For example, restarting a service or notifying your on-call team.
139+
140+
You can run automated actions on new detections using `preq -a <actions.yaml>`.
141+
142+
See https://docs.prequel.dev/running#automated-runbooks for examples of how to setup automated runbooks when a CRE is detected and trigger actions like:
143+
- Slack Notifications
144+
- Jira Issue Creation
145+
- Runbook executables
146+
- CronJobs
147+
148+
## Data sources other than `stdin`
149+
150+
`preq` works on any timestamped data source, not just `stdin`.
151+
You can define multiple sources (e.g., app logs, system logs, metric dumps) in a YAML template and let `preq` automatically map CRE rules to the right data.
152+
153+
Learn more about data sources here: https://docs.prequel.dev/data-sources
88154

89-
* See https://docs.prequel.dev/running for examples of how to run preq
90-
* See https://docs.prequel.dev/running#automated-runbooks for examples of how to setup automated runbooks when a CRE is detected
155+
## Community
156+
We are building an open reliability detection community and we would love you to join!
157+
158+
- [Slack](https://inviter.co/prequel): Ask questions, share detections, propose new CREs.
159+
160+
- [Playground](https://play.prequel.dev/): Try rules in your browser with WebAssembly, no data leaves your machine.
161+
162+
- [Docs](https://docs.prequel.dev): Explore the documentation to learn how to install, run, automate, and write CREs.
163+
164+
- [CRE Repository](https://github.com/prequel-dev/cre): Contribute new community detection rules and help the reliability community grow.
91165

92166
## Contributing
93167

94-
Open a PR and let's go!
168+
We welcome contributions of all kinds: bug fixes, docs, new CRE rules, or feature ideas!
169+
170+
See the contribution guide for more details: https://docs.prequel.dev/cres/contributing
171+
172+
---
173+
Licensed under the [Apache License 2.0](https://github.com/prequel-dev/preq/blob/main/LICENSE)

assets/demo.gif

89.2 KB
Loading

assets/prequel.png

5.13 KB
Loading

0 commit comments

Comments
 (0)