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

docs: update the lokitool docs #12805

Merged
merged 10 commits into from
May 2, 2024
Merged

docs: update the lokitool docs #12805

merged 10 commits into from
May 2, 2024

Conversation

MichelHollands
Copy link
Contributor

What this PR does / why we need it:

  • Add the lokitool creation to the CI
  • Replace cortextool with lokitool in the documentation

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Apr 26, 2024
@MichelHollands MichelHollands changed the title Add lokitool CI and update the docs ci: add lokitool CI and update the docs Apr 26, 2024
@JStickler JStickler assigned JStickler and unassigned JStickler Apr 29, 2024
@JStickler JStickler self-requested a review April 29, 2024 18:39
@JStickler
Copy link
Contributor

@MichelHollands , @monodot and I were just looking at this section in the docs when we were working together today, and I realized that while we tell users how to use cortex tool (now loki tool) we don't tell them how to get the tool. I assume that once Loki tool released, there would be a download link somewhere that we'd need to include? Also, I was surprised to find out that the cortex tool help seems to be in the repo README. Does the loki tool include any --help at all?

@MichelHollands MichelHollands changed the title ci: add lokitool CI and update the docs ci: update the lokitool docs Apr 30, 2024
@MichelHollands
Copy link
Contributor Author

@MichelHollands , @monodot and I were just looking at this section in the docs when we were working together today, and I realized that while we tell users how to use cortex tool (now loki tool) we don't tell them how to get the tool. I assume that once Loki tool released, there would be a download link somewhere that we'd need to include? Also, I was surprised to find out that the cortex tool help seems to be in the repo README. Does the loki tool include any --help at all?

Hey, the distribution of lokitool is not done yet. The plan is to add that this week. It wasn't done for 3.0 yet as too many other things were going on.

Lokitool does respond to --help:

~/git/og_loki/cmd/lokitool/lokitool --help
usage: lokitool [<flags>] <command> [<args> ...]

A command-line tool to manage Loki.

Flags:
  --help  Show context-sensitive help (also try --help-long and --help-man).

Commands:
  help [<command>...]
    Show help.

  rules list --address=ADDRESS --id=ID [<flags>]
    List the rules currently in the loki ruler.

  rules print --address=ADDRESS --id=ID [<flags>]
    Print the rules currently in the loki ruler.

  rules get --address=ADDRESS --id=ID [<flags>] <namespace> <group>
    Retrieve a rulegroup from the ruler.

  rules delete --address=ADDRESS --id=ID [<flags>] <namespace> <group>
    Delete a rulegroup from the ruler.

  rules load --address=ADDRESS --id=ID [<flags>] <rule-files>...
    load a set of rules to a designated loki endpoint

  rules diff --address=ADDRESS --id=ID [<flags>] [<rule-files>...]
    diff a set of rules to a designated loki endpoint

  rules sync --address=ADDRESS --id=ID [<flags>] [<rule-files>...]
    sync a set of rules to a designated loki endpoint

  rules prepare [<flags>] [<rule-files>...]
    modifies a set of rules by including an specific label in aggregations.

  rules lint [<flags>] [<rule-files>...]
    formats a set of rule files. It reorders keys alphabetically, uses 4 spaces as indentantion, and formats PromQL expressions to a single
    line.

  rules check [<flags>] [<rule-files>...]
    runs various best practice checks against rules.

  version
    Get the version of the lokitool CLI

@MichelHollands MichelHollands changed the title ci: update the lokitool docs docs: update the lokitool docs Apr 30, 2024
@MichelHollands MichelHollands marked this pull request as ready for review April 30, 2024 09:23
@MichelHollands MichelHollands requested a review from a team as a code owner April 30, 2024 09:23
@JStickler
Copy link
Contributor

Lokitool does respond to --help:

Awesome! Thanks for providing the output! I had checked the PR dates and knew that it hadn't made it into the last release. But it will be nice to have some documentation ready to go with the next release.

Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

[docs team] Looks good so far. Not sure if this is a draft or if you wanted to go ahead and merge this? Approving so you're not blocked if you wanted to merge.

docs/sources/alert/_index.md Outdated Show resolved Hide resolved
MichelHollands and others added 2 commits May 2, 2024 09:53
@MichelHollands MichelHollands marked this pull request as draft May 2, 2024 08:54
@MichelHollands
Copy link
Contributor Author

[docs team] Looks good so far. Not sure if this is a draft or if you wanted to go ahead and merge this? Approving so you're not blocked if you wanted to merge.

Thanks for the review. This can be merged I guess. These docs will be part of the next release so it shouldn't confuse current users.

@MichelHollands MichelHollands marked this pull request as ready for review May 2, 2024 08:55
@MichelHollands MichelHollands merged commit 599a300 into main May 2, 2024
60 checks passed
@MichelHollands MichelHollands deleted the add_lokitool_to_ci branch May 2, 2024 08:58
ystkfujii pushed a commit to ystkfujii/loki that referenced this pull request May 3, 2024
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
shantanualsi pushed a commit that referenced this pull request May 6, 2024
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants