-
Notifications
You must be signed in to change notification settings - Fork 8
Create monitor.md #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gkorland
wants to merge
12
commits into
main
Choose a base branch
from
gkorland-patch-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Create monitor.md #111
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f9f111c
Create monitor.md
gkorland 3eece77
Merge branch 'main' into gkorland-patch-2
gkorland df726d3
Merge branch 'main' into gkorland-patch-2
gkorland 414e4db
Merge branch 'main' into gkorland-patch-2
swilly22 e14528c
Update MONITOR command documentation for clarity
gkorland bcb95d4
Merge branch 'main' into gkorland-patch-2
gkorland 1567fab
Update commands/monitor.md
gkorland 3b0469e
Update commands/monitor.md
gkorland b3f2eae
Merge branch 'main' into gkorland-patch-2
gkorland fd794be
Add shell syntax highlighting to code block
gkorland 03c1965
Merge branch 'main' into gkorland-patch-2
gkorland 211dfdd
Apply suggestions from code review
gkorland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| --- | ||
| title: "MONITOR" | ||
| nav_order: 110 | ||
| description: > | ||
| Allows you to observe all requests processed by the database in real-time. | ||
| parent: "Commands" | ||
| --- | ||
|
|
||
| # MONITOR | ||
|
|
||
| Allows to observe all requests processed by the database in real-time. | ||
| This feature is invaluable for debugging and understanding the sequence of operations occurring in the database. | ||
|
|
||
| Usage: `MONITOR` | ||
|
|
||
| ## Example | ||
|
|
||
| ```sh | ||
| > MONITOR | ||
| ``` | ||
|
|
||
| ## Output | ||
|
|
||
| ```sh | ||
| 1673022405.123456 [0 127.0.0.1:6379] "GRAPH.QUERY" "MyGraph" "MATCH (n) return n" | ||
| 1673022405.123789 [0 127.0.0.1:6379] "GRAPH.DELETE" "MyGraph" | ||
| ``` | ||
|
|
||
| Each line includes the following: | ||
|
|
||
| 1. **Timestamp:** The precise time when the command was received. | ||
| 2. **Database Index:** The database number where the command was executed (e.g., `[0]`). | ||
| 3. **Client Info:** The IP address and port of the client that issued the command. | ||
| 4. **Command:** The exact command and its arguments. | ||
|
|
||
| ## Considerations | ||
|
|
||
| - **Security:** Access to `MONITOR` should be restricted to trusted users by administrators using ACLs. It exposes all incoming commands, including potentially sensitive data. See: [ACL](/commands/acl) for more details. | ||
| - **Overhead:** `MONITOR` can slow down the database, especially under high load, due to the additional I/O required for streaming the logs. | ||
| - **Connection Restriction:** Typically, `MONITOR` should be run from a dedicated connection. Mixing it with other commands can result in undefined behavior. | ||
|
|
||
| ## Terminating MONITOR | ||
|
|
||
| To stop the `MONITOR` stream, simply close the client connection (e.g., terminate the session or disconnect the client tool). | ||
|
|
||
| ## Best Practices | ||
|
|
||
| - Use `MONITOR` sparingly in production environments. | ||
| - Combine `MONITOR` with logging or analysis tools for deeper insights. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shallow, unless we give recommendations for such tools.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I took it from Redis docs |
||
| - Restrict access to users who require diagnostic capabilities, see: [ACL](/commands/acl) for more details. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix grammatical inconsistency.
The phrase "Allows to observe" is missing the pronoun "you" to match the description on line 5 and maintain grammatical correctness.
📝 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents