docs: add Alert Notification Field Reference section to health documentation#22074
Draft
nedi-app[bot] wants to merge 1 commit intomasterfrom
Draft
docs: add Alert Notification Field Reference section to health documentation#22074nedi-app[bot] wants to merge 1 commit intomasterfrom
nedi-app[bot] wants to merge 1 commit intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Health as Health Engine
participant Notify as Notification Dispatcher
participant Webhook as External Webhook / API
participant Script as Custom Notification Script
Note over Health: Alert State Transition (e.g., CLEAR -> WARNING)
Health->>Health: NEW: Calculate duration (Time spent in PREVIOUS state)
alt If entering WARNING/CRITICAL
Health->>Health: NEW: Calculate non_clear_duration (Total active time)
else If returning to CLEAR
Health->>Health: NEW: Reset non_clear_duration to 0
end
Health->>Notify: Dispatch notification payload
Note over Notify: Formatting based on integration type
alt Webhook Integration
Notify->>Notify: Format JSON (snake_case)
Notify->>Webhook: POST payload (includes duration & non_clear_duration)
Webhook-->>Notify: 200 OK
else Custom Script
Notify->>Notify: Export environment variables
Notify->>Script: Execute with ${duration} & ${non_clear_duration}
Script-->>Notify: Exit Code
end
Note over Webhook,Script: Reviewer: Note distinction between duration (prev) vs non_clear (total)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
src/health/REFERENCE.mdduration,non_clear_duration,status,old_status, and other common fieldsduration(time in previous state) andnon_clear_duration(total time in WARNING/CRITICAL state)Changes
durationvsnon_clear_durationMotivation
This documentation addresses a common source of confusion where users misinterpret the
durationfield as "time in current state" when it actually represents "time in the previous state before this transition". The correct interpretation is critical for proper troubleshooting decisions.Audit Context
Session Query (Original):
Session Query (English translation):
Decision Verdict:
surgical_edit- Add documentation explaining the notification payload fields, specifically clarifying thatdurationrepresents the time in the previous alarm state (not current state), and distinguishing it fromnon_clear_duration.Summary by cubic
Adds an Alert Notification Field Reference to health docs, explaining notification payload fields. Clarifies
duration(time in previous state) vsnon_clear_duration(total time in WARNING/CRITICAL), with examples.src/health/REFERENCE.mddocumenting core, duration, and summary fields.Written for commit 9847be0. Summary will update on new commits.