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

prometheus-keylight-exporter: init at 0.1.1 #89810

Merged
merged 3 commits into from Jun 11, 2020
Merged

prometheus-keylight-exporter: init at 0.1.1 #89810

merged 3 commits into from Jun 11, 2020

Conversation

mdlayher
Copy link
Member

@mdlayher mdlayher commented Jun 8, 2020

Motivation for this change
  • New Prometheus exporter for Elgato Key Light devices
  • Pushing my package upstream so I don't have to maintain an overlay locally.
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
[matt@servnerr-3:~/src/nixpkgs]$ nix-build -A prometheus-keylight-exporter
these derivations will be built:                                                                 
  /nix/store/p7yr2jywg2jv3dyxqsb4wd5dyppi226s-keylight-exporter-0.1.1.drv                                                                                                                          
building '/nix/store/p7yr2jywg2jv3dyxqsb4wd5dyppi226s-keylight-exporter-0.1.1.drv'...
...
/nix/store/7i3ydp9rysjbscwp2czzp8qkgypxifqd-keylight-exporter-0.1.1
                                                                                                 
[matt@servnerr-3:~/src/nixpkgs]$ ./result/bin/keylight_exporter -h
Usage of ./result/bin/keylight_exporter:
  -metrics.addr string
        address for Elgato Key Light exporter (default ":9288")
  -metrics.path string
        URL path for surfacing collected metrics (default "/metrics")

[matt@servnerr-3:~/src/nixpkgs]$ ./result/bin/keylight_exporter
2020/06/08 10:19:51 starting Elgato Key Light exporter on ":9288"

@mdlayher
Copy link
Member Author

mdlayher commented Jun 8, 2020

@GrahamcOfBorg build prometheus-keylight-exporter

Copy link
Contributor

@zowoq zowoq left a comment

Choose a reason for hiding this comment

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

One nit, otherwise lgtm. Builds/runs on darwin.

pkgs/servers/monitoring/prometheus/keylight-exporter.nix Outdated Show resolved Hide resolved
@mdlayher
Copy link
Member Author

mdlayher commented Jun 9, 2020

@zowoq Thanks!

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

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

Please add a NixOS module as well when packaging a new prometheus exporter. Details on how to do that can be found here: https://nixos.org/nixos/manual/index.html#module-services-prometheus-exporters-new-exporter

@Ma27 Ma27 requested a review from WilliButz June 10, 2020 12:32
@mdlayher
Copy link
Member Author

@Ma27 no problem, I was planning to add one anyway but wasn't sure if it should come in a separate PR. I'll work on that later today hopefully.

mdlayher and others added 2 commits June 10, 2020 12:17
Co-authored-by: zowoq <59103226+zowoq@users.noreply.github.com>
Signed-off-by: Matt Layher <mdlayher@gmail.com>
@mdlayher
Copy link
Member Author

@Ma27 @WilliButz module is added, tested, and ready for review!

@mdlayher
Copy link
Member Author

@GrahamcOfBorg test prometheus-exporters

Copy link
Member

@mmilata mmilata left a comment

Choose a reason for hiding this comment

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

Module LGTM!

@WilliButz WilliButz merged commit 016a538 into NixOS:master Jun 11, 2020
@mdlayher mdlayher deleted the mdl-keylight-exporter branch June 11, 2020 13:17
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.

None yet

5 participants