Skip to content

docs: document VictorOps custom_fields in configuration#5184

Open
must108 wants to merge 3 commits into
prometheus:mainfrom
must108:docs/victorops-custom-fields
Open

docs: document VictorOps custom_fields in configuration#5184
must108 wants to merge 3 commits into
prometheus:mainfrom
must108:docs/victorops-custom-fields

Conversation

@must108
Copy link
Copy Markdown

@must108 must108 commented Apr 20, 2026

Summary

  • document custom_fields under victorops_config in docs/configuration.md
  • clarify that custom_fields keys must not overlap with fixed VictorOps payload fields

Related to prometheus/docs#2014

Why

custom_fields is supported in Alertmanager's VictorOps notifier config, but was missing from the configuration reference. This updates the docs so users can discover and use the field directly from the official docs.

Summary by CodeRabbit

  • New Features

    • VictorOps integration now supports an optional custom_fields map to include extra templated data in alert payloads.
  • Documentation

    • Docs updated to describe custom_fields and note certain reserved VictorOps keys are disallowed (routing_key, message_type, state_message, entity_display_name, monitoring_tool, entity_id, entity_state).
    • Various formatting, quoting, and example fixes across Alertmanager configuration docs.

@must108 must108 requested a review from a team as a code owner April 20, 2026 19:32
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds documentation for a new VictorOps receiver field victorops_config.custom_fields (map of string → template string) with an explicit list of disallowed/reserved keys, and reformats numerous YAML/examples across the Alertmanager configuration docs without changing documented behaviors.

Changes

Documentation updates (single cohort)

Layer / File(s) Summary
Schema / Data Shape
docs/configuration.md
Adds victorops_config.custom_fields: [ <string>: <tmpl_string> ... ] and enumerates disallowed keys: routing_key, message_type, state_message, entity_display_name, monitoring_tool, entity_id, entity_state.
Core Doc Examples
docs/configuration.md
Reformats multiple YAML/example blocks: generic placeholders list, route example quoting/indentation, time_intervals inline form, time_range/location times indentation, and matcher examples.
Receiver Integration List
docs/configuration.md
Changes receiver-integration config presentation to compact inline array form (e.g., discord_configs: [- ...]), preserving semantics.
Other Example Format Updates
docs/configuration.md
Adjusts Mattermost and Jira example quoting/spacing and normalizes JSON-like custom field examples.
Minor Cleanup
docs/configuration.md
Small whitespace/formatting tweaks and a tracing section marker adjustment; no behavioral changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: documenting the VictorOps custom_fields option in the configuration documentation.
Description check ✅ Passed The description includes a summary of the changes, explanation of why the changes were made, and a related issue reference, covering the essential information needed for a documentation update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@must108 must108 force-pushed the docs/victorops-custom-fields branch from ac5df6c to 2614e30 Compare April 20, 2026 19:34
@must108
Copy link
Copy Markdown
Author

must108 commented Apr 24, 2026

@TheMeier are you able to run the workflows, thank you!

@TheMeier
Copy link
Copy Markdown
Contributor

@must108 sorry, I don't have the rights for that

Signed-off-by: Mustaeen Ahmed <136145181+must108@users.noreply.github.com>
@SoloJacobs SoloJacobs force-pushed the docs/victorops-custom-fields branch from fa065d9 to e8f6f80 Compare April 26, 2026 12:02
@SoloJacobs
Copy link
Copy Markdown
Contributor

@must108 Thanks for adding the custom_fields documentation.

The comment describes these as "fixed/static payload fields", but routing_key is sent as part of the URL path (not the JSON body), and entity_state is not sent at all. The list does correctly reflect what the config validation, but the description is misleading. Could you reword this?

Signed-off-by: must108 <mustaeen18@gmail.com>
@must108 must108 force-pushed the docs/victorops-custom-fields branch from bd4f824 to 066f551 Compare May 4, 2026 08:08
@must108
Copy link
Copy Markdown
Author

must108 commented May 4, 2026

@must108 Thanks for adding the custom_fields documentation.

The comment describes these as "fixed/static payload fields", but routing_key is sent as part of the URL path (not the JSON body), and entity_state is not sent at all. The list does correctly reflect what the config validation, but the description is misleading. Could you reword this?

@SoloJacobs resolved, please check! Thank you

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/configuration.md`:
- Around line 1842-1843: Update the explanatory parenthetical that begins "Some
reserved keys are not part of the JSON body, but are still disallowed as
custom_fields keys to avoid conflicts with the integrations request/validation."
Replace the awkward phrase "integrations request/validation" with clearer
wording such as "integration request and validation" (so the full sentence
reads: "Some reserved keys are not part of the JSON body, but are still
disallowed as custom_fields keys to avoid conflicts with the integration request
and validation.") to improve clarity; target the line containing "custom_fields"
and the parenthetical note.
- Around line 49-53: Add a glossary alias for <bool> that mirrors the existing
<boolean> definition so readers aren’t confused by the two forms; update the
placeholder list to include `<bool>` with the same description and regex/values
as `<boolean>` (i.e., a boolean that can take the values `true` or `false`) and
ensure any cross-references in the document (places using `<bool>`) remain
accurate; locate the glossary entries around the existing `<boolean>` and add
the `<bool>` line next to it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ddca8fe0-4f6e-40c8-8be2-13f98162ce4e

📥 Commits

Reviewing files that changed from the base of the PR and between e8f6f80 and bd4f824.

📒 Files selected for processing (1)
  • docs/configuration.md

Comment thread docs/configuration.md
Comment on lines +49 to +53
- `<duration>`: a duration matching the regular expression `((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)`, e.g. `1d`, `1h30m`, `5m`, `10s`
- `<labelname>`: a string matching the regular expression `[a-zA-Z_][a-zA-Z0-9_]*`
- `<labelvalue>`: a string of unicode characters
- `<filepath>`: a valid path in the current working directory
- `<boolean>`: a boolean that can take the values `true` or `false`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a <bool> alias in the placeholder glossary.

Line 53 defines <boolean>, but the same document frequently uses <bool> (for example, Line 97 and many receiver sections). Defining both in the glossary avoids ambiguity for readers.

✏️ Proposed doc tweak
 - `<boolean>`: a boolean that can take the values `true` or `false`
+- `<bool>`: alias of `<boolean>`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `<duration>`: a duration matching the regular expression `((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)`, e.g. `1d`, `1h30m`, `5m`, `10s`
- `<labelname>`: a string matching the regular expression `[a-zA-Z_][a-zA-Z0-9_]*`
- `<labelvalue>`: a string of unicode characters
- `<filepath>`: a valid path in the current working directory
- `<boolean>`: a boolean that can take the values `true` or `false`
- `<duration>`: a duration matching the regular expression `((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)`, e.g. `1d`, `1h30m`, `5m`, `10s`
- `<labelname>`: a string matching the regular expression `[a-zA-Z_][a-zA-Z0-9_]*`
- `<labelvalue>`: a string of unicode characters
- `<filepath>`: a valid path in the current working directory
- `<boolean>`: a boolean that can take the values `true` or `false`
- `<bool>`: alias of `<boolean>`
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/configuration.md` around lines 49 - 53, Add a glossary alias for <bool>
that mirrors the existing <boolean> definition so readers aren’t confused by the
two forms; update the placeholder list to include `<bool>` with the same
description and regex/values as `<boolean>` (i.e., a boolean that can take the
values `true` or `false`) and ensure any cross-references in the document
(places using `<bool>`) remain accurate; locate the glossary entries around the
existing `<boolean>` and add the `<bool>` line next to it.

Comment thread docs/configuration.md
Comment on lines +1842 to +1843
# (Some reserved keys are not part of the JSON body, but are still disallowed
# as custom_fields keys to avoid conflicts with the integrations request/validation.)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Tighten wording in the VictorOps reserved-key note.

Line 1843 reads a bit awkwardly (“integrations request/validation”). Rephrasing improves clarity in this newly added explanatory note.

✏️ Proposed wording fix
-# as custom_fields keys to avoid conflicts with the integrations request/validation.)
+# as custom_fields keys to avoid conflicts with the integration's request/validation logic.)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# (Some reserved keys are not part of the JSON body, but are still disallowed
# as custom_fields keys to avoid conflicts with the integrations request/validation.)
# (Some reserved keys are not part of the JSON body, but are still disallowed
# as custom_fields keys to avoid conflicts with the integration's request/validation logic.)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/configuration.md` around lines 1842 - 1843, Update the explanatory
parenthetical that begins "Some reserved keys are not part of the JSON body, but
are still disallowed as custom_fields keys to avoid conflicts with the
integrations request/validation." Replace the awkward phrase "integrations
request/validation" with clearer wording such as "integration request and
validation" (so the full sentence reads: "Some reserved keys are not part of the
JSON body, but are still disallowed as custom_fields keys to avoid conflicts
with the integration request and validation.") to improve clarity; target the
line containing "custom_fields" and the parenthetical note.

Copy link
Copy Markdown
Contributor

@SoloJacobs SoloJacobs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit confused: Why did you reformat the configuration? That does not seem necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants