-
Notifications
You must be signed in to change notification settings - Fork 4
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 #435: Add the possibility to use the same connector with different connector variables #467
Conversation
…ent connector variables * Added the possibility to define additional connectors, which are connectors with variables where the user can customize variables values. * It is possible to define many instances of the same connector, and this by customizing values for each instance. * Updated unit tests to make sure everything is working. * Tested the changes on MetricsHub. * Updated the MetricsHub documentation to explain how to define and customize connector variables. * Updated MetricsHub maven plugin to generate additionalConnectors configuration.
…-the-same-connector-with-different-connector-variables-values
…-the-same-connector-with-different-connector-variables-values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small updates and we should be good to go.
...shub-agent/src/main/java/org/sentrysoftware/metricshub/agent/config/AdditionalConnector.java
Outdated
Show resolved
Hide resolved
...a/org/sentrysoftware/metricshub/agent/deserialization/AdditionalConnectorsParsingResult.java
Outdated
Show resolved
Hide resolved
...a/org/sentrysoftware/metricshub/agent/deserialization/AdditionalConnectorsParsingResult.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/sentrysoftware/metricshub/agent/helper/ConnectorVariablesLibraryParser.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/sentrysoftware/metricshub/agent/helper/ConnectorVariablesLibraryParser.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/sentrysoftware/metricshub/agent/helper/ConnectorVariablesLibraryParser.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/sentrysoftware/metricshub/agent/helper/ConnectorVariablesLibraryParser.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/sentrysoftware/metricshub/agent/helper/ConnectorVariablesLibraryParser.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/sentrysoftware/metricshub/agent/helper/ConnectorVariablesLibraryParser.java
Outdated
Show resolved
Hide resolved
@@ -828,7 +828,9 @@ loggerLevel: ... | |||
|
|||
#### Configure Connector Variables | |||
|
|||
In **MetricsHub**, connector variables are essential for customizing the behavior of data collection. The connector variables are configured in the `metricshub.yaml` file under the `variables` section of your configured resource. These variables are specified under the name of the connector to which they belong and contain key-value pairs. The key of each variable corresponds to a variable already configured in the connector. | |||
In **MetricsHub**, connector variables are essential for customizing the behavior of data collection. These variables are configured in the `additionalConnectors` section of your `metricshub.yaml` file. When configuring variables for connectors with variables, the connector becomes an additional connector, which is by default forced, and uses the variables configured by the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to review this documentation 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know when I can start the doc review @CherfaElyes and @NassimBtk :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @CherfaElyes! @iguitton you can start the review, I am fine with the source code.
…ent connector variables * Refactored ConnectorVariablesLibraryParser for better clarity. * Corrected some Javadoc errors. * Moved some classes to a new package.
…ent connector variables * Updated Documentation.
…-the-same-connector-with-different-connector-variables-values
…ifferent connector variables * Reformatted the code.
…ent connector variables * Updated configure-monitoring.md
…nt connector variables values * Reviewed and updated the user documentation
@CherfaElyes , @NassimBtk: I reviewed and updated the user documentation. If you are fine with my version, you can approve and merge this PR. Thanks. |
Thank you @iguitton for the review! |
connector variables * Reformatted tables. * Updated connector links to use relative paths.
…-the-same-connector-with-different-connector-variables-values
Tests
Two additional connectors (same connector twice)
In this case, connectors compiled filename will take as value the connectorId.
One additional connector without uses
No additional connectors configured, only connector with variables is forced.