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

Refactor cli entry point and configuration #2

Closed
1 task done
Tracked by #5
Pokom opened this issue Nov 14, 2023 · 1 comment
Closed
1 task done
Tracked by #5

Refactor cli entry point and configuration #2

Pokom opened this issue Nov 14, 2023 · 1 comment
Assignees

Comments

@Pokom
Copy link
Contributor

Pokom commented Nov 14, 2023

One of the patterns that I think is making our startup process more difficult is how we specify the cloud provider and the specific metrics we want to scrape for the provider. Today we'd have something like:

./cloudcost-exporter -provider=${PROVIDER} [args]

The idea was to limit to a single cloud provider and then have arguments that were kind of specific to each one. However as the application has grown, I think this is fairly cumbersome both from the code perspective and using it. It means we can only target one CSP at any given time, and that's fine in production but can be cumbersome for local development. Ideally the application should run if it's able to.

Prometheus's instrumentating documentation provides a pretty good reference on what we should be aiming for:

When working with applications, you should aim for an exporter that requires no custom configuration by the user beyond telling it where the application is. You may also need to offer the ability to filter out certain metrics if they may be too granular and expensive on large setups, for example the HAProxy exporter allows filtering of per-server stats. Similarly, there may be expensive metrics that are disabled by default.

As such we should aim to simplify our configuration as much as possible.


Tasks

Preview Give feedback
@Pokom Pokom transferred this issue from another repository Nov 29, 2023
Pokom added a commit that referenced this issue Nov 29, 2023
As part of my efforts to improve the exporter command, I've created a
config struct to handle accepted input from the users. This will enable
us to further simplify the way we instantiate providers in the future.

- refs #2

Signed-off-by: pokom <[email protected]>
@Pokom
Copy link
Contributor Author

Pokom commented Nov 30, 2023

I'm going to split up this issue a bit since I think it was discussing two distinct problems:

  1. CLI configuration and how it's handled in code
  2. How to enable/disable collectors for each provider

I'll spin up a new issue to refactor how we setup collectors for each provider.

@Pokom Pokom self-assigned this Nov 30, 2023
@Pokom Pokom closed this as completed Nov 30, 2023
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

No branches or pull requests

1 participant