-
Notifications
You must be signed in to change notification settings - Fork 0
More flexibility in configuration #17
New issue
Have a question about this project? Sign up for 8000 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
Comments
Referring to these? https://github.com/tlkamp/litter-exporter/blob/main/main.go#L12-L22 I think that would be pretty easy to implement. I would be happy to do the implementation, but I'll also accept contributions :) |
Yup! Referring to those. Either way is fine with me, if you would like to write it, I won't argue. I'm actually trying to debug a different issue I'm having anyway. On the call to the |
I think you are likely having an auth configuration issue as everything is working fine for me. |
You're right. After a bit of digging, I found I actually needed the Not sure if that was expected... but the README implies the exporter should start without those flags... hence the confusion 😄 edit: Though I'm seeing now that if I were to read the content of the |
The architecture of the Litter Robot API appears to be an AWS API Gateway fronting a Python Lambda function, and the API Gateway seems to require the various tokens. The only way to obtain them has been to reverse engineer the mobile phone apps since the API isn't exactly public or documented, but the values mentioned in the example do work: I can set them as defaults in the CLI. |
The values in that docker-compose file do get this working for me. I don't currently have any litter robot related metrics showing up on the exporter, just the default ones that the prometheus library self-reports. But for now I'm assuming that's just because I got my Litter Robot last night and my cats haven't used it yet 😂 |
Possible! You should see some configuration related information at the very least. You can always cycle it manually to force it though :) |
Adds defaults for client ID, API key and client secret, which are set to values that have been reverse engineered from the mobile app. See #17
Adds defaults for client ID, API key and client secret, which are set to values that have been reverse engineered from the mobile app. See #17
Supports environment variables as configuration options. Uses Viper and Pflag to achieve this functionality. BREAKING CHANGE: Pflag does not support multi-character shorthands for flags, so double hyphens are now required for all flags being passed via CLI. Closes #17
@Starttoaster I have a PR open for environment variable support now. Please have a look and confirm this is what you imagined. Also note the breaking changes. |
Supports environment variables as configuration options. Uses Viper and Pflag to achieve this functionality. BREAKING CHANGE: Pflag does not support multi-character shorthands for flags, so double hyphens are now required for all flags being passed via CLI. Closes #17
🎉 This issue has been resolved in version 2.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Uh oh!
There was an error while loading. Please reload this page.
It would be a nice-to-have for setting these values with either a yaml config, or environment variables.
The yaml config would be nice for Kubernetes deployments, as you could mount a k8s Secret object in the container.
Environment variables are a bit of a lower hanging fruit. But would be nice to have as it's a pattern for configuring behavior inside containers that people are accustomed to.
I could help with this if you're interested. I'll probably have already forked this repo and done it for my own use.
The text was updated successfully, but these errors were encountered: