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

Issue #59: Display the connector variables #61

Merged
merged 5 commits into from
Sep 30, 2024

Conversation

CherfaElyes
Copy link
Contributor

@CherfaElyes CherfaElyes commented Sep 27, 2024

  • Added a variables section under the prerequisites in the connectors pages to display the connector template variables, their description & their default value if available.
  • Updated MetricsHub example content producer to add variables configuration example.
  • Tested on metricshub-doc.

Tests

Default connector variables specified (description and defaultValue specified)

image

Default connector variables specified (description not specified)

image

Default connector variables specified (defaultValue not specified)

image

Default connector variables not specified (variables are present).

image

MetricsHub.yaml example

image

* Added a `variables` section under the `prerequisites` in the connectors pages to display the connector template variables, their description & their default value if available.
* Tested on metricshub-doc.
* Updated MetricsHub example content producer to add variables configuration example.
* Tested the results
@CherfaElyes CherfaElyes self-assigned this Sep 27, 2024
@CherfaElyes CherfaElyes linked an issue Sep 27, 2024 that may be closed by this pull request
* Resolved merge conflict.
@bertysentry
Copy link
Member

I would simplify the listing of variables like below:

Variables:

  • matchCommand: Regular expression that command line of the process must match with (default: .*)
  • matchName: Regular expression that the process name must match with (default: .*)

So the "template" is like:

<li> <code>VARNAME</code>: VARDESCRIPTION (default: <code>DEFAULTVALUE</code>)

Description and default value should be displayed in the doc only if they are specified, like below:

  • matchName
  • matchName: Regular expression that the process name must match with
  • matchName (default: .*)

@bertysentry
Copy link
Member

Now an interesting question: how do we specify variable values for a connector through the CLI? 😅

@NassimBtk
Copy link
Member

NassimBtk commented Sep 27, 2024

There is a plan for this @bertysentry sentrysoftware/metricshub#357... indeed, we still require a spec.

* Changed the output format to make it more readable and concise.
* Tested all the changes on metricshub-doc.
* Updated the screenshots on the PR description.
@NassimBtk NassimBtk merged commit 7c5f640 into main Sep 30, 2024
4 checks passed
@NassimBtk NassimBtk deleted the feature/issue-59-display-the-connector-variables branch September 30, 2024 12:36
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.

Display the connector variables in the connector documentation page
3 participants