lol

datadog-agent: init at 6.1.4

DataDog have adopted a subtle naming convention:

- dd-agent refers to the v5 Python implementation
- datadog-agent refers to the v6 golang implementation

authored by

Rodney Lorrimar and committed by
Vincent Ambo
637cc2a3 6b486cf9

+435 -2
+76
pkgs/tools/networking/dd-agent/6.nix
··· 1 + { stdenv, fetchFromGitHub, buildGoPackage, makeWrapper, pythonPackages, pkgconfig }: 2 + 3 + let 4 + inherit (pythonPackages) python; 5 + 6 + # keep this in sync with github.com/DataDog/agent-payload dependency 7 + payloadVersion = "4.7"; 8 + 9 + in buildGoPackage rec { 10 + name = "datadog-agent-${version}"; 11 + version = "6.1.4"; 12 + owner = "DataDog"; 13 + repo = "datadog-agent"; 14 + 15 + src = fetchFromGitHub { 16 + inherit owner repo; 17 + rev = "a8ee76deb11fa334470d9b8f2356214999980894"; 18 + sha256 = "06grcwwbfvcw1k1d4nqrasrf76qkpik1gsw60zwafllfd9ffhl1v"; 19 + }; 20 + 21 + subPackages = [ 22 + "cmd/agent" 23 + "cmd/dogstatsd" 24 + "cmd/py-launcher" 25 + "cmd/cluster-agent" 26 + ]; 27 + goDeps = ./deps.nix; 28 + goPackagePath = "github.com/${owner}/${repo}"; 29 + 30 + nativeBuildInputs = [ pkgconfig makeWrapper ]; 31 + PKG_CONFIG_PATH = "${python}/lib/pkgconfig"; 32 + 33 + buildFlagsArray = let 34 + ldFlags = stdenv.lib.concatStringsSep " " [ 35 + "-X ${goPackagePath}/pkg/version.Commit=${src.rev}" 36 + "-X ${goPackagePath}/pkg/version.AgentVersion=${version}" 37 + "-X ${goPackagePath}/pkg/serializer.AgentPayloadVersion=${payloadVersion}" 38 + "-X ${goPackagePath}/pkg/collector/py.pythonHome=${python}" 39 + "-r ${python}/lib" 40 + ]; 41 + in [ 42 + "-ldflags=${ldFlags}" 43 + ]; 44 + buildFlags = "-tags cpython"; 45 + 46 + # DataDog use paths relative to the agent binary, so fix these. 47 + postPatch = '' 48 + sed -e "s|PyChecksPath =.*|PyChecksPath = \"$bin/${python.sitePackages}\"|" \ 49 + -e "s|distPath =.*|distPath = \"$bin/share/datadog-agent\"|" \ 50 + -i cmd/agent/common/common_nix.go 51 + ''; 52 + 53 + # Install the config files and python modules from the "dist" dir 54 + # into standard paths. 55 + postInstall = '' 56 + mkdir -p $bin/${python.sitePackages} $bin/share/datadog-agent 57 + cp -R $src/cmd/agent/dist/{conf.d,trace-agent.conf} $bin/share/datadog-agent 58 + cp -R $src/cmd/agent/dist/{checks,utils,config.py} $bin/${python.sitePackages} 59 + 60 + cp -R $src/pkg/status/dist/templates $bin/share/datadog-agent 61 + 62 + wrapProgram "$bin/bin/agent" \ 63 + --set PYTHONPATH "$bin/${python.sitePackages}" 64 + ''; 65 + 66 + meta = with stdenv.lib; { 67 + description = '' 68 + Event collector for the DataDog analysis service 69 + -- v6 new golang implementation. 70 + ''; 71 + homepage = https://www.datadoghq.com; 72 + license = licenses.bsd3; 73 + platforms = platforms.all; 74 + maintainers = with maintainers; [ thoughtpolice domenkozar rvl ]; 75 + }; 76 + }
+4 -1
pkgs/tools/networking/dd-agent/default.nix pkgs/tools/networking/dd-agent/5.nix
··· 89 89 ''; 90 90 91 91 meta = { 92 - description = "Event collector for the DataDog analysis service"; 92 + description = '' 93 + Event collector for the DataDog analysis service 94 + -- v5 Python implementation 95 + ''; 93 96 homepage = https://www.datadoghq.com; 94 97 license = stdenv.lib.licenses.bsd3; 95 98 platforms = stdenv.lib.platforms.all;
+353
pkgs/tools/networking/dd-agent/deps.nix
··· 1 + [ 2 + { 3 + goPackagePath = "github.com/DataDog/agent-payload"; 4 + fetch = { 5 + type = "git"; 6 + url = "https://github.com/DataDog/agent-payload"; 7 + rev = "3b793015ecfa5b829e8a466bd7cce836891502cc"; 8 + sha256 = "0lg7c1whmvk4a13mrivdjfzfxqan07kvs2calgylncy7yf4szdp6"; 9 + }; 10 + } 11 + { 12 + goPackagePath = "github.com/DataDog/gohai"; 13 + fetch = { 14 + type = "git"; 15 + url = "https://github.com/DataDog/gohai"; 16 + rev = "d80d0f562a71fa2380fbeccc93ba5a2e325606e4"; 17 + sha256 = "1frslms7f5i8dc8n0v9pb64mf4zdj3q2c005qxajl8j8i9nhj7yb"; 18 + }; 19 + } 20 + { 21 + goPackagePath = "github.com/DataDog/mmh3"; 22 + fetch = { 23 + type = "git"; 24 + url = "https://github.com/DataDog/mmh3"; 25 + rev = "2cfb68475274527a10701355c739f31dd404718c"; 26 + sha256 = "09jgzxi08pkxllxk3f5qwipz96jxrw5v035fj2bkid1d4akn8y0b"; 27 + }; 28 + } 29 + { 30 + goPackagePath = "github.com/beevik/ntp"; 31 + fetch = { 32 + type = "git"; 33 + url = "https://github.com/beevik/ntp"; 34 + rev = "cb3dae3a7588ae35829eb5724df611cd75152fba"; 35 + sha256 = "0nc6f7d0xw23y18z9qxrmm8kvnywihassyk706mn9v4makmhalnz"; 36 + }; 37 + } 38 + { 39 + goPackagePath = "github.com/cihub/seelog"; 40 + fetch = { 41 + type = "git"; 42 + url = "https://github.com/cihub/seelog"; 43 + rev = "f561c5e57575bb1e0a2167028b7339b3a8d16fb4"; 44 + sha256 = "0r3228hvgljgpaggj6b9mvxfsizfw25q2c1761wsvcif8gz49cvl"; 45 + }; 46 + } 47 + { 48 + goPackagePath = "github.com/docker/docker"; 49 + fetch = { 50 + type = "git"; 51 + url = "https://github.com/docker/docker"; 52 + rev = "092cba3727bb9b4a2f0e922cd6c0f93ea270e363"; 53 + sha256 = "0l9kjibnpwcgk844sibxk9ppyqniw9r0np1mzp95f8f461jb0iar"; 54 + }; 55 + } 56 + { 57 + goPackagePath = "github.com/dsnet/compress"; 58 + fetch = { 59 + type = "git"; 60 + url = "https://github.com/dsnet/compress"; 61 + rev = "cc9eb1d7ad760af14e8f918698f745e80377af4f"; 62 + sha256 = "159liclywmyb6zx88ga5gn42hfl4cpk1660zss87fkx31hdq9fgx"; 63 + }; 64 + } 65 + { 66 + goPackagePath = "github.com/fatih/color"; 67 + fetch = { 68 + type = "git"; 69 + url = "https://github.com/fatih/color"; 70 + rev = "507f6050b8568533fb3f5504de8e5205fa62a114"; 71 + sha256 = "0k1v9dkhrxiqhg48yqkwzpd7x40xx38gv2pgknswbsy4r8w644i7"; 72 + }; 73 + } 74 + { 75 + goPackagePath = "github.com/fsnotify/fsnotify"; 76 + fetch = { 77 + type = "git"; 78 + url = "https://github.com/fsnotify/fsnotify"; 79 + rev = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"; 80 + sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g"; 81 + }; 82 + } 83 + { 84 + goPackagePath = "github.com/go-ini/ini"; 85 + fetch = { 86 + type = "git"; 87 + url = "https://github.com/go-ini/ini"; 88 + rev = "bda519ae5f4cbc60d391ff8610711627a08b86ae"; 89 + sha256 = "05vcc3ssxyrk8g3sr4gs888vllgjqfq11na63qz2pvaiy7m0rqrs"; 90 + }; 91 + } 92 + { 93 + goPackagePath = "github.com/gogo/protobuf"; 94 + fetch = { 95 + type = "git"; 96 + url = "https://github.com/gogo/protobuf"; 97 + rev = "1ef32a8b9fc3f8ec940126907cedb5998f6318e4"; 98 + sha256 = "0zk2n0n35ksskr5cd83k5k8wg21ckrcggjy88bym2s21ngj5w4fh"; 99 + }; 100 + } 101 + { 102 + goPackagePath = "github.com/golang/snappy"; 103 + fetch = { 104 + type = "git"; 105 + url = "https://github.com/golang/snappy"; 106 + rev = "553a641470496b2327abcac10b36396bd98e45c9"; 107 + sha256 = "0kssxnih1l722hx9219c7javganjqkqhvl3i0hp0hif6xm6chvqk"; 108 + }; 109 + } 110 + { 111 + goPackagePath = "github.com/gorilla/mux"; 112 + fetch = { 113 + type = "git"; 114 + url = "https://github.com/gorilla/mux"; 115 + rev = "ded0c29b24f96f46cf349e6701b099db601cf8ec"; 116 + sha256 = "125dxfxs7his95fd2r28bn1rpb78pldfgm3lmw84ha1c0v5gfh33"; 117 + }; 118 + } 119 + { 120 + goPackagePath = "github.com/hashicorp/hcl"; 121 + fetch = { 122 + type = "git"; 123 + url = "https://github.com/hashicorp/hcl"; 124 + rev = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168"; 125 + sha256 = "1qalfsc31fra7hcw2lc3s20aj7al62fq3j5fn5kga3mg99b82nyr"; 126 + }; 127 + } 128 + { 129 + goPackagePath = "github.com/kardianos/osext"; 130 + fetch = { 131 + type = "git"; 132 + url = "https://github.com/kardianos/osext"; 133 + rev = "ae77be60afb1dcacde03767a8c37337fad28ac14"; 134 + sha256 = "056dkgxrqjj5r18bnc3knlpgdz5p3yvp12y4y978hnsfhwaqvbjz"; 135 + }; 136 + } 137 + { 138 + goPackagePath = "github.com/magiconair/properties"; 139 + fetch = { 140 + type = "git"; 141 + url = "https://github.com/magiconair/properties"; 142 + rev = "2c9e9502788518c97fe44e8955cd069417ee89df"; 143 + sha256 = "1w0rl9rla61m0qbha75jg48yiq1vs91sfy96rgqa6nags9v9b1rl"; 144 + }; 145 + } 146 + { 147 + goPackagePath = "github.com/mholt/archiver"; 148 + fetch = { 149 + type = "git"; 150 + url = "https://github.com/mholt/archiver"; 151 + rev = "e4ef56d48eb029648b0e895bb0b6a393ef0829c3"; 152 + sha256 = "1krxyh6iq0s0rwhz7gg6dn795j9qq64rsgq9nivav7fhrqpgr6hb"; 153 + }; 154 + } 155 + { 156 + goPackagePath = "github.com/mitchellh/mapstructure"; 157 + fetch = { 158 + type = "git"; 159 + url = "https://github.com/mitchellh/mapstructure"; 160 + rev = "00c29f56e2386353d58c599509e8dc3801b0d716"; 161 + sha256 = "1vw8fvhax0d567amgvxr7glcl12lvzg2sbzs007q5k5bbwn1szyb"; 162 + }; 163 + } 164 + { 165 + goPackagePath = "github.com/nwaples/rardecode"; 166 + fetch = { 167 + type = "git"; 168 + url = "https://github.com/nwaples/rardecode"; 169 + rev = "e06696f847aeda6f39a8f0b7cdff193b7690aef6"; 170 + sha256 = "1aj7l8ii7hxnn3q4wzxlx3f92b1aspck6ncyqgb4h2g228phcibw"; 171 + }; 172 + } 173 + { 174 + goPackagePath = "github.com/patrickmn/go-cache"; 175 + fetch = { 176 + type = "git"; 177 + url = "https://github.com/patrickmn/go-cache"; 178 + rev = "a3647f8e31d79543b2d0f0ae2fe5c379d72cedc0"; 179 + sha256 = "10020inkzrm931r4bixf8wqr9n39wcrb78vfyxmbvjavvw4zybgs"; 180 + }; 181 + } 182 + { 183 + goPackagePath = "github.com/pelletier/go-toml"; 184 + fetch = { 185 + type = "git"; 186 + url = "https://github.com/pelletier/go-toml"; 187 + rev = "66540cf1fcd2c3aee6f6787dfa32a6ae9a870f12"; 188 + sha256 = "1n8na0yg90gm0rpifmzrby5r385vvd62cdam3ls7ssy02bjvfw15"; 189 + }; 190 + } 191 + { 192 + goPackagePath = "github.com/pierrec/lz4"; 193 + fetch = { 194 + type = "git"; 195 + url = "https://github.com/pierrec/lz4"; 196 + rev = "ed8d4cc3b461464e69798080a0092bd028910298"; 197 + sha256 = "0flsn2ka108lb63gkxfzl90bkhndh1znnscv4v1k6j5h2s3zksls"; 198 + }; 199 + } 200 + { 201 + goPackagePath = "github.com/pierrec/xxHash"; 202 + fetch = { 203 + type = "git"; 204 + url = "https://github.com/pierrec/xxHash"; 205 + rev = "a0006b13c722f7f12368c00a3d3c2ae8a999a0c6"; 206 + sha256 = "1hf7hqrqx0cbgx0alfwnqs0mrxg9rnwsijn5d0lv06w6vzqbvnzj"; 207 + }; 208 + } 209 + { 210 + goPackagePath = "github.com/shirou/gopsutil"; 211 + fetch = { 212 + type = "git"; 213 + url = "https://github.com/shirou/gopsutil"; 214 + rev = "57f370e13068146efe1cb7129f79e5d51da8a242"; 215 + sha256 = "1ij0bbnfjj65afin8vhccr3cxvg6r0awmvcvb2ilza5wbbsslggb"; 216 + }; 217 + } 218 + { 219 + goPackagePath = "github.com/spf13/afero"; 220 + fetch = { 221 + type = "git"; 222 + url = "https://github.com/spf13/afero"; 223 + rev = "63644898a8da0bc22138abf860edaf5277b6102e"; 224 + sha256 = "13piahaq4vw1y1sklq5scrsflqx0a8hzmdqfz1fy4871kf2gl8qw"; 225 + }; 226 + } 227 + { 228 + goPackagePath = "github.com/spf13/cast"; 229 + fetch = { 230 + type = "git"; 231 + url = "https://github.com/spf13/cast"; 232 + rev = "8965335b8c7107321228e3e3702cab9832751bac"; 233 + sha256 = "177bk7lq40jbgv9p9r80aydpaccfk8ja3a7jjhfwiwk9r1pa4rr2"; 234 + }; 235 + } 236 + { 237 + goPackagePath = "github.com/spf13/cobra"; 238 + fetch = { 239 + type = "git"; 240 + url = "https://github.com/spf13/cobra"; 241 + rev = "ef82de70bb3f60c65fb8eebacbb2d122ef517385"; 242 + sha256 = "1q1nsx05svyv9fv3fy6xv6gs9ffimkyzsfm49flvl3wnvf1ncrkd"; 243 + }; 244 + } 245 + { 246 + goPackagePath = "github.com/spf13/jwalterweatherman"; 247 + fetch = { 248 + type = "git"; 249 + url = "https://github.com/spf13/jwalterweatherman"; 250 + rev = "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394"; 251 + sha256 = "132p84i20b9s5r6fs597lsa6648vd415ch7c0d018vm8smzqpd0h"; 252 + }; 253 + } 254 + { 255 + goPackagePath = "github.com/spf13/pflag"; 256 + fetch = { 257 + type = "git"; 258 + url = "https://github.com/spf13/pflag"; 259 + rev = "583c0c0531f06d5278b7d917446061adc344b5cd"; 260 + sha256 = "0nr4mdpfhhk94hq4ymn5b2sxc47b29p1akxd8b0hx4dvdybmipb5"; 261 + }; 262 + } 263 + { 264 + goPackagePath = "github.com/spf13/viper"; 265 + fetch = { 266 + type = "git"; 267 + url = "https://github.com/spf13/viper"; 268 + rev = "8dc2790b029dc41e2b8ff772c63c26adbb1db70d"; 269 + sha256 = "147zq6v34pgb79r4m0m2mwm8739jxwawxs8mpqvvhq7gxwvhng40"; 270 + }; 271 + } 272 + { 273 + goPackagePath = "github.com/stretchr/testify"; 274 + fetch = { 275 + type = "git"; 276 + url = "https://github.com/stretchr/testify"; 277 + rev = "c679ae2cc0cb27ec3293fea7e254e47386f05d69"; 278 + sha256 = "1rrdn7k83j492rzhqwkh6956sj8m2nbk44d7r1xa9nsn3hfwj691"; 279 + }; 280 + } 281 + { 282 + goPackagePath = "github.com/ulikunitz/xz"; 283 + fetch = { 284 + type = "git"; 285 + url = "https://github.com/ulikunitz/xz"; 286 + rev = "0c6b41e72360850ca4f98dc341fd999726ea007f"; 287 + sha256 = "0a6l7sp67ipxim093qh6fvw8knbxj24l7bj5lykcddi5gwfi78n3"; 288 + }; 289 + } 290 + { 291 + goPackagePath = "github.com/urfave/negroni"; 292 + fetch = { 293 + type = "git"; 294 + url = "https://github.com/urfave/negroni"; 295 + rev = "22c5532ea862c34fdad414e90f8cc00b4f6f4cab"; 296 + sha256 = "0jxd10cr3imm96xa01mdgyad4nq6mc7yr49z830fv3vywfr7bac8"; 297 + }; 298 + } 299 + { 300 + goPackagePath = "golang.org/x/net"; 301 + fetch = { 302 + type = "git"; 303 + url = "https://go.googlesource.com/net"; 304 + rev = "640f4622ab692b87c2f3a94265e6f579fe38263d"; 305 + sha256 = "097m4qhcljhp180171j5fjhq4740iirfkkajfd7yrxqhp4s9hljx"; 306 + }; 307 + } 308 + { 309 + goPackagePath = "golang.org/x/sys"; 310 + fetch = { 311 + type = "git"; 312 + url = "https://go.googlesource.com/sys"; 313 + rev = "6f686a352de66814cdd080d970febae7767857a3"; 314 + sha256 = "1z3pwvxlzq8kghjdsd9xmf184iiz13h8h66ipp626k4rc7kydr03"; 315 + }; 316 + } 317 + { 318 + goPackagePath = "golang.org/x/text"; 319 + fetch = { 320 + type = "git"; 321 + url = "https://go.googlesource.com/text"; 322 + rev = "7922cc490dd5a7dbaa7fd5d6196b49db59ac042f"; 323 + sha256 = "06sicjc24hv7v9p1l6psaq87w4lycx3mjixd6gsd1wnd4jhqvlnr"; 324 + }; 325 + } 326 + { 327 + goPackagePath = "gopkg.in/yaml.v2"; 328 + fetch = { 329 + type = "git"; 330 + url = "https://gopkg.in/yaml.v2"; 331 + rev = "5420a8b6744d3b0345ab293f6fcba19c978f1183"; 332 + sha256 = "0dwjrs2lp2gdlscs7bsrmyc5yf6mm4fvgw71bzr9mv2qrd2q73s1"; 333 + }; 334 + } 335 + { 336 + goPackagePath = "github.com/sbinet/go-python"; 337 + fetch = { 338 + type = "git"; 339 + url = "https://github.com/sbinet/go-python"; 340 + rev = "6d13f941744b9332d6ed00dc2cd2722acd79a47e"; 341 + sha256 = "0x5q4nyv6gck9q33g54gy2ajmyjksxjmzh0jfqqn97jpgf4qfaym"; 342 + }; 343 + } 344 + { 345 + goPackagePath = "github.com/mitchellh/reflectwalk"; 346 + fetch = { 347 + type = "git"; 348 + url = "https://github.com/mitchellh/reflectwalk"; 349 + rev = "63d60e9d0dbc60cf9164e6510889b0db6683d98c"; 350 + sha256 = "1hpq6sjr6l1h25x68mz13q7sd52dv1mjfxbl5p7m3j7cv85khnvc"; 351 + }; 352 + } 353 + ]
+2 -1
pkgs/top-level/all-packages.nix
··· 15672 15672 15673 15673 dbvisualizer = callPackage ../applications/misc/dbvisualizer {}; 15674 15674 15675 - dd-agent = callPackage ../tools/networking/dd-agent { }; 15675 + dd-agent = callPackage ../tools/networking/dd-agent/5.nix { }; 15676 + datadog-agent = callPackage ../tools/networking/dd-agent/6.nix { }; 15676 15677 15677 15678 ddgr = callPackage ../applications/misc/ddgr { }; 15678 15679