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

grafana-reporter: init at 2.0.1 #38514

Merged
merged 2 commits into from Nov 10, 2018
Merged

Conversation

disassembler
Copy link
Member

@disassembler disassembler commented Apr 6, 2018

Motivation for this change

Adds grafana-reporter tool that generates PDF from grafana dashboard.

I'll be pushing a nixos module to this PR soon as well.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@disassembler
Copy link
Member Author

@GrahamcOfBorg build grafana_reporter

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: grafana_reporter

Partial log (click to expand)

shrinking /nix/store/vg17v8gfx3pvh1k7fxv5ax9mbb9y1gj3-reporter-2.0.1-bin/bin/.grafana-reporter-wrapped
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/vg17v8gfx3pvh1k7fxv5ax9mbb9y1gj3-reporter-2.0.1-bin/bin
patching script interpreter paths in /nix/store/vg17v8gfx3pvh1k7fxv5ax9mbb9y1gj3-reporter-2.0.1-bin
checking for references to /tmp/nix-build-reporter-2.0.1.drv-0 in /nix/store/vg17v8gfx3pvh1k7fxv5ax9mbb9y1gj3-reporter-2.0.1-bin...
shrinking RPATHs of ELF executables and libraries in /nix/store/wzvbp8dwyv6ql7fnaa767lgqw2yigh9f-reporter-2.0.1
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/wzvbp8dwyv6ql7fnaa767lgqw2yigh9f-reporter-2.0.1
checking for references to /tmp/nix-build-reporter-2.0.1.drv-0 in /nix/store/wzvbp8dwyv6ql7fnaa767lgqw2yigh9f-reporter-2.0.1...
/nix/store/vg17v8gfx3pvh1k7fxv5ax9mbb9y1gj3-reporter-2.0.1-bin

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: grafana_reporter

Partial log (click to expand)

installing
/private/tmp/nix-build-reporter-2.0.1.drv-0/go /private/tmp/nix-build-reporter-2.0.1.drv-0
/private/tmp/nix-build-reporter-2.0.1.drv-0
post-installation fixup
strip is /nix/store/0fzpxnsanc02i4jsb1yhchjp4p62b2n3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/w10jz71dyph17jznpq49il8fd9vl6nhi-reporter-2.0.1-bin/bin
patching script interpreter paths in /nix/store/w10jz71dyph17jznpq49il8fd9vl6nhi-reporter-2.0.1-bin
strip is /nix/store/0fzpxnsanc02i4jsb1yhchjp4p62b2n3-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/mz81n1q015fig0vkn2623dwvihyby3rh-reporter-2.0.1
/nix/store/w10jz71dyph17jznpq49il8fd9vl6nhi-reporter-2.0.1-bin

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: grafana_reporter

Partial log (click to expand)

shrinking /nix/store/5qglx2skn890j8z2caxmzwkhrdlqnwhr-reporter-2.0.1-bin/bin/.grafana-reporter-wrapped
strip is /nix/store/3zq400fri5dv7d30lpxlqm2v9y1iis6j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/5qglx2skn890j8z2caxmzwkhrdlqnwhr-reporter-2.0.1-bin/bin
patching script interpreter paths in /nix/store/5qglx2skn890j8z2caxmzwkhrdlqnwhr-reporter-2.0.1-bin
checking for references to /build in /nix/store/5qglx2skn890j8z2caxmzwkhrdlqnwhr-reporter-2.0.1-bin...
shrinking RPATHs of ELF executables and libraries in /nix/store/7pzlmca91svr1hjqpbfrhi573jbbxs8s-reporter-2.0.1
strip is /nix/store/3zq400fri5dv7d30lpxlqm2v9y1iis6j-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/7pzlmca91svr1hjqpbfrhi573jbbxs8s-reporter-2.0.1
checking for references to /build in /nix/store/7pzlmca91svr1hjqpbfrhi573jbbxs8s-reporter-2.0.1...
/nix/store/5qglx2skn890j8z2caxmzwkhrdlqnwhr-reporter-2.0.1-bin

systemd.services.grafana_reporter = {
description = "Grafana Reporter Service Daemon";
wantedBy = ["multi-user.target"];
after = ["networking.target"];
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure it's network.target, I can't find a networking.target unit in my systemctl. The grafana and openfire services are the only ones using networking.target, so that should be fixed too at some point.

wantedBy = ["multi-user.target"];
after = ["networking.target"];
serviceConfig = {
ExecStart = "${pkgs.grafana_reporter.bin}/bin/grafana-reporter -proto ${cfg.grafana.protocol}:// -ip ${cfg.grafana.addr}:${toString cfg.grafana.port} -port :${toString cfg.port} -templates ${cfg.templateDir}";
Copy link
Member

Choose a reason for hiding this comment

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

I occasionally like to do

{
  ExecStart = let args = concatStringsSep [
    "-proto ..."
    ...
  ]; in "grafana-reporter ${args}";
}

To make the line shorter.

@infinisil
Copy link
Member

Ping?

@infinisil infinisil merged commit 9c984b0 into NixOS:master Nov 10, 2018
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

3 participants