mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
368a677c97
This overhauls the Datadog module a bit to be much more useful. In particular, it adds support for nginx and postgresql monitoring integrations to dd-agent. These have to exist in separate files under /etc/dd-agent, so the module just exposes then as separate options. In the future, more integrations could be added this way. In the process of doing this, I also had to rename the dd-agent user to datadog. Note the UIDs did not change, so this is strictly backwards compatible. The reason for this is to make it easier to create a 'datadog' postgres user with access to pg_stats, as 'dd-agent' typically isn't a valid username. This allows the out of the box configurations to be used. Signed-off-by: Austin Seipp <aseipp@pobox.com>
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ stdenv, fetchurl, python, pythonPackages, sysstat, unzip, tornado
|
|
, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "4.2.1";
|
|
name = "dd-agent-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/DataDog/dd-agent/archive/${version}.zip";
|
|
sha256 = "0s1lg7rqx86z0y111105gwkknzplq149cxd7v3yg30l22wn68dmv";
|
|
};
|
|
|
|
buildInputs = [ python unzip makeWrapper pythonPackages.psycopg2 ];
|
|
propagatedBuildInputs = [ python tornado ];
|
|
|
|
postUnpack = "export sourceRoot=$sourceRoot/packaging";
|
|
|
|
makeFlags = [ "BUILD=$(out)" ];
|
|
|
|
installTargets = [ "install_base" "install_full" ];
|
|
|
|
postInstall = ''
|
|
mv $out/usr/* $out
|
|
rmdir $out/usr
|
|
wrapProgram $out/bin/dd-forwarder \
|
|
--prefix PYTHONPATH : $PYTHONPATH
|
|
wrapProgram $out/bin/dd-agent \
|
|
--prefix PYTHONPATH : $PYTHONPATH
|
|
wrapProgram $out/bin/dogstatsd \
|
|
--prefix PYTHONPATH : $PYTHONPATH
|
|
'';
|
|
|
|
meta = {
|
|
description = "Event collector for the DataDog analysis service";
|
|
homepage = http://www.datadoghq.com;
|
|
license = stdenv.lib.licenses.bsd3;
|
|
platforms = stdenv.lib.platforms.all;
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice iElectric ];
|
|
};
|
|
}
|