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

Zabbix-agent 3.4 #39925

Merged
merged 1 commit into from May 5, 2018
Merged

Zabbix-agent 3.4 #39925

merged 1 commit into from May 5, 2018

Conversation

PsyanticY
Copy link
Contributor

Motivation for this change

The latest Zabbix agent offered by Nixpkgs is currently 2.2 which is pretty old, the default package is even older (1.8) which include the agent and the server. I think it is time to move to a newer version of Zabbix. It would be better to merge this pull request thought ( #31123 ) as it include the version 3.4 of the agent and the server in the default.nix package instead of 1.8. If it is preferable to keep the default.nix the way it is, I think my PR can be usefull for people who want to use the 3.4 version of the agent.

When testing I used the following nix expression to make sure to use the 3.4 version instead of the default one:

     zabbix.agent = pkgs.zabbix34.agent or (lib.overrideDerivation pkgs.zabbix20.agent (a: rec {
       name = "zabbix-${version}";
       version = "3.4.8";
 
       src = pkgs.fetchurl {
         url = "https://netix.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz";
         sha256 = "cec14993d1ec2c9d8c51f6608c9408620f27174db92edc2347bafa7b841ccc07";
       };
     }));
   };
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.

@PsyanticY PsyanticY changed the title Adding Zabbix agent 3.4 packages Zabbix-agent 3.4 May 4, 2018
@matthewbauer
Copy link
Member

@GrahamcOfBorg build zabbix34

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: zabbix34

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8
shrinking /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8/sbin/zabbix_agentd
shrinking /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8/bin/zabbix_get
shrinking /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8/bin/zabbix_sender
gzipping man pages under /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8/share/man/
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8/lib  /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8/bin  /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8/sbin
patching script interpreter paths in /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8
checking for references to /build in /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8...
moving /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8/sbin/* to /nix/store/d37j5pjsnfh0jl3gc69lhy1ckri7qs8z-zabbix-agent-3.4.8/bin

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: zabbix34

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@@ -13002,6 +13002,7 @@ with pkgs;

zabbix20 = callPackage ../servers/monitoring/zabbix/2.0.nix { };
zabbix22 = callPackage ../servers/monitoring/zabbix/2.2.nix { };
zabbix34 = callPackage ../servers/monitoring/zabbix/3.4.nix { };
Copy link
Member

Choose a reason for hiding this comment

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

Do you know if zabbix34 is backwards compatible? If so, I think we would want to make this the default "zabbix" attribute (the top "zabbix" is still at 1.8!)/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matthewbauer Hi, thanks for taking a look into this. I know that zabbix server is compatible with zabbix agent with lower versions, (we actually have an Amazon linux zabbix server (3.4) communicating with nixos servers that has the agent version 2.2 (https://www.zabbix.com/documentation/3.4/manual/appendix/compatibility) . For the other way around i don't believe it is the case, and even if it is the case people strongly advise against it. Not sure if it is possible to upgrade the default Zabbix server and agent to 3.4 ?

Copy link
Member

Choose a reason for hiding this comment

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

Ok it's probably fine for now.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: zabbix34

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8
shrinking /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8/bin/zabbix_sender
shrinking /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8/bin/zabbix_get
shrinking /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8/sbin/zabbix_agentd
gzipping man pages under /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8/share/man/
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8/lib  /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8/bin  /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8/sbin
patching script interpreter paths in /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8
checking for references to /build in /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8...
moving /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8/sbin/* to /nix/store/lwszk59i20wcrmqfjn71mwyv8g67nsr6-zabbix-agent-3.4.8/bin

@matthewbauer matthewbauer merged commit ea1d75e into NixOS:master May 5, 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