Skip to content
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

fix-vm-logs-url #538

Merged
merged 1 commit into from
Dec 23, 2024
Merged

fix-vm-logs-url #538

merged 1 commit into from
Dec 23, 2024

Conversation

klinch0
Copy link
Contributor

@klinch0 klinch0 commented Dec 23, 2024

Summary by CodeRabbit

  • New Features
    • Updated monitoring application version to 1.5.3.
    • Changed the data source type in Grafana configuration to victoriametrics-logs-datasource.
  • Bug Fixes
    • Corrected plugin loading configuration in Grafana.
  • Chores
    • Updated version mapping for the monitoring package in the versions map.

@klinch0 klinch0 requested a review from kvaps as a code owner December 23, 2024 09:09
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 23, 2024
Copy link
Contributor

coderabbitai bot commented Dec 23, 2024

Walkthrough

This pull request updates the monitoring package from version 1.5.2 to 1.5.3. The changes involve modifying the Grafana configuration to use the victoriametrics-logs-datasource plugin instead of the previous victorialogs-datasource. The version mapping file has been updated to reflect the new version, replacing the HEAD placeholder with a specific commit hash for version 1.5.2 and adding a new entry for version 1.5.3.

Changes

File Change Summary
packages/extra/monitoring/Chart.yaml Version bumped from 1.5.2 to 1.5.3
packages/extra/monitoring/templates/grafana/grafana.yaml Updated plugin from victorialogs-datasource to victoriametrics-logs-datasource
packages/extra/monitoring/templates/vlogs/grafana-datasource.yaml Changed datasource type from victorialogs-datasource to victoriametrics-logs-datasource
packages/extra/versions_map Updated 1.5.2 version with commit hash 898374b5, added new 1.5.3 version

Sequence Diagram

sequenceDiagram
    participant Chart as Chart.yaml
    participant Grafana as Grafana Config
    participant Datasource as Grafana Datasource
    participant VersionMap as Versions Map

    Chart->>Chart: Version updated to 1.5.3
    Grafana->>Grafana: Plugin changed to victoriametrics-logs-datasource
    Datasource->>Datasource: Type updated to victoriametrics-logs-datasource
    VersionMap->>VersionMap: Commit hash added for 1.5.2
    VersionMap->>VersionMap: New entry for 1.5.3 created
Loading

Possibly related PRs

Suggested labels

lgtm, enhancement

Suggested reviewers

  • kvaps
  • xy2

Poem

🐰 Hop, hop, version update's here!
Metrics logs now crystal clear
From old plugin to the new
VictoriaMetrics shines true blue
Monitoring's dance, a rabbit's cheer! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@klinch0
Copy link
Contributor Author

klinch0 commented Dec 23, 2024

#538

Copy link
Contributor

@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: 0

🧹 Nitpick comments (1)
packages/extra/versions_map (1)

20-20: Consider pinning version 1.5.3 to a specific commit for reproducibility.

While referencing “HEAD” makes development flexible, it may introduce unexpected changes down the line. Pinning it to a corresponding commit ensures clarity and stability in deployments.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1ca19d and f475208.

📒 Files selected for processing (4)
  • packages/extra/monitoring/Chart.yaml (1 hunks)
  • packages/extra/monitoring/templates/grafana/grafana.yaml (3 hunks)
  • packages/extra/monitoring/templates/vlogs/grafana-datasource.yaml (1 hunks)
  • packages/extra/versions_map (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/extra/monitoring/Chart.yaml
🔇 Additional comments (4)
packages/extra/versions_map (1)

19-19: Looks good!

Replacing “HEAD” with the commit hash “898374b5” for the 1.5.2 version ensures a stable reference. This helps with reproducibility and traceability.

packages/extra/monitoring/templates/vlogs/grafana-datasource.yaml (1)

9-9: LGTM! Verify endpoint compatibility.

The datasource type change from victorialogs-datasource to victoriametrics-logs-datasource is consistent with the PR objective.

Let's verify if the new datasource plugin is compatible with the existing endpoint:

✅ Verification successful

Based on the search results, I can now generate the final response as we have sufficient information about the datasource compatibility:

The datasource type change is compatible with the endpoint configuration

The search results confirm that:

  1. The new victoriametrics-logs-datasource is the official plugin name, as seen in the Grafana configuration where it's being installed from the VictoriaMetrics GitHub repository.
  2. Port 9428 is the correct endpoint port for VictoriaMetrics logs ingestion and querying, as evidenced by its usage in both the datasource configuration and log forwarding settings.
  3. The URL format http://vlogs-{name}.{namespace}.svc:9428 is consistent with VictoriaMetrics logs service configuration.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the endpoint configuration needs to be updated for the new datasource

# Search for any documentation or configuration examples that might indicate 
# different endpoint requirements for the new datasource
rg -A 5 "victoriametrics-logs-datasource.*url|victoriametrics-logs-datasource.*9428"

Length of output: 86


Script:

#!/bin/bash
# Let's try a broader search to understand the endpoint configuration

# Search for any URL configurations in the same directory
rg -A 5 "url:|9428" packages/extra/monitoring/templates/vlogs/

# Also check for any documentation or examples in the repository
fd README -t f -X cat {} 

# Look for any other grafana datasource configurations
fd grafana-datasource -t f -X cat {}

Length of output: 71070


Script:

#!/bin/bash
# Let's search for any VictoriaMetrics logs configuration or documentation
rg -A 5 "victoriametrics.*logs|victorialogs" 

# Also check for any port 9428 configurations
rg -A 5 "9428"

Length of output: 8856

packages/extra/monitoring/templates/grafana/grafana.yaml (2)

33-33: LGTM! Plugin configuration updated correctly.

The allow_loading_unsigned_plugins configuration has been properly updated to use the new plugin name.


54-56: ⚠️ Potential issue

Critical: Plugin download URL doesn't match the new plugin name.

The initialization script is still trying to download from the old victorialogs-datasource repository, but we're configuring victoriametrics-logs-datasource. This mismatch will cause the plugin installation to fail.

Apply this fix:

-                  ver=$(curl -s https://api.github.com/repos/VictoriaMetrics/victorialogs-datasource/releases/latest | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
-                  curl -L https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/$ver/victoriametrics-logs-datasource-$ver.tar.gz -o /var/lib/grafana/plugins/vl-plugin.tar.gz
+                  ver=$(curl -s https://api.github.com/repos/VictoriaMetrics/grafana-datasource/releases/latest | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
+                  curl -L https://github.com/VictoriaMetrics/grafana-datasource/releases/download/$ver/victoriametrics-logs-datasource-$ver.tar.gz -o /var/lib/grafana/plugins/vl-plugin.tar.gz

Let's verify the correct repository and release assets:

Copy link
Member

@kvaps kvaps left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 23, 2024
@kvaps kvaps merged commit 17fbda6 into aenix-io:main Dec 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants