Skip to content

Conversation

@AndrewChubatiuk
Copy link
Contributor

@AndrewChubatiuk AndrewChubatiuk commented Jul 7, 2025

related issue #90
additionally PR introduces dynamic configuration for frontend, which depends on command line flags

Describe Your Changes

Please provide a brief description of the changes you made. Be as specific as possible to help others understand the purpose and impact of your modifications.

Checklist

The following checks are mandatory:

Copy link
Member

@vadimalekseev vadimalekseev left a comment

Choose a reason for hiding this comment

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

Looks good overall.

A small suggestion: It would be nice if we could access the vmalert UI through our start page: https://github.com/VictoriaMetrics/VictoriaLogs/blob/master/app/victoria-logs/main.go#L88-L91, when the vmalert proxy flag is set.

@AndrewChubatiuk
Copy link
Contributor Author

It would be nice if we could access the vmalert UI through our start page

There's a separate issue for this, VMAlert UI will be a part of VMUI and these endpoints are needed to simplify debugging and to decouple review process of frontend and backend since different engineers are responsible for these parts

@AndrewChubatiuk AndrewChubatiuk force-pushed the vmalert-proxy branch 3 times, most recently from b45e562 to 0f8cb9a Compare August 27, 2025 11:57
@AndrewChubatiuk AndrewChubatiuk changed the title app/vlselect: introduce -vmalert.proxyURL flag to proxy /api/v1/notifiers, /api/v1/alerts and /api/v1/rules requests to VMAlert app/vlselect: introduce -vmalert.proxyURL flag to proxy /select/vmalert requests to VMAlert Aug 27, 2025
@AndrewChubatiuk AndrewChubatiuk force-pushed the vmalert-proxy branch 4 times, most recently from 07ae6c9 to 3b1598e Compare August 28, 2025 06:56
hagen1778
hagen1778 previously approved these changes Sep 9, 2025
@AndrewChubatiuk AndrewChubatiuk force-pushed the vmalert-proxy branch 3 times, most recently from 46dff9d to 098f850 Compare September 10, 2025 22:02
@AndrewChubatiuk AndrewChubatiuk force-pushed the vmalert-proxy branch 2 times, most recently from a845dc3 to db778ab Compare September 12, 2025 12:47
…g requests to /select/vmalert path to VMAlert
@AndrewChubatiuk AndrewChubatiuk merged commit 2d4b343 into master Sep 17, 2025
8 checks passed
@AndrewChubatiuk AndrewChubatiuk deleted the vmalert-proxy branch September 17, 2025 11:33
valyala added a commit that referenced this pull request Sep 17, 2025
Reason for revert: this functionality is non-trivial, so it needs additional
maintenance efforts in the future. This functionality is non-core for VictoriaLogs web UI (aka 'nice to have feature').
It is already provided by vmalert web UI ( https://docs.victoriametrics.com/victoriametrics/vmalert/#web ).
I doubt we'll have enough capacity for providing high-quiality maintenance for this functionality.

It is better to revert it instead of providing half-baked functionality for our users.

Updates #522
Updates VictoriaMetrics/VictoriaMetrics#8989
Updates #5
valyala added a commit that referenced this pull request Sep 17, 2025
…D headers are set by proxy or remove it completely (#664)"

This reverts commit 97ffbff.

Reason for revert: this functionality depends on the commit 2d4b343 , which is going to be reverted.
The reason for reverting the 2d4b343 is that it mixes multiple unrelated features in a single commit.

This functionality must be implemented in a distinct pull request dedicated solely
for this functionality at both VictoriaLogs server side and VictoriaLogs web UI.

Updates #664
Updates #5
Updates #656
valyala added a commit that referenced this pull request Sep 17, 2025
…ct/vmalert requests to VMAlert (#5)"

This reverts commit 2d4b343.

Reason for revert: this commit mixes two unrelated features:

- Proxying vmalert requests ( #90 )
- Introducing vmui config handler at /select/vmui/config.json ( there should be a separate feature request with the explanation why this handler is needed )
- Returning AccountID and ProjectID response headers ( #656 )

It is better from the maintenance and git history investigation PoV to split the implementation of these features into separate pull requests.

This commit also has a few issues in the code, which must be addressed in the follow-up pull requests:

- The description of the `-vmalert.proxyURL` command-line flag misses a whitespace between the `vmalert.` and `See`.
- The description of the `-vmalert.proxyURL` command-line flag contains non-canonical link to docs - https://docs.victoriametrics.com/victorialogs#vmalert .
  It must be https://docs.victoriametrics.com/victorialogs/#vmalert
- The `r.URL.Path = strings.TrimPrefix(path, "/select")` line isn't needed in the code block, which returns vmui config to the client.

Updates #5
@valyala
Copy link
Contributor

valyala commented Sep 17, 2025

@AndrewChubatiuk , @func25 , this pull request has been reverted in the commit ac32268 . See the commit description for the reason of the revert.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants