1 { lib, fetchFromGitHub, elk7Version, buildGoModule, libpcap, nixosTests, systemd }:
3 let beat = package: extraArgs: buildGoModule (rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-DE7XpzVBu9qL7fMXXYRYLdVXrr0WB0IL0KAG0Zc3TVo=";
14 vendorSha256 = "sha256-TQrXUcLv7rFo3PP3bVx0wEC1WbtkJDsCm+/izHAxqBc=";
16 subPackages = [ package ];
19 homepage = "https://www.elastic.co/products/beats";
20 license = licenses.asl20;
21 maintainers = with maintainers; [ fadenb basvandijk dfithian ];
22 platforms = platforms.linux;
27 filebeat7 = beat "filebeat" {
28 meta.description = "Lightweight shipper for logfiles";
29 buildInputs = [ systemd ];
30 tags = [ "withjournald" ];
32 patchelf --set-rpath ${lib.makeLibraryPath [ (lib.getLib systemd) ]} "$out/bin/filebeat"
35 heartbeat7 = beat "heartbeat" { meta.description = "Lightweight shipper for uptime monitoring"; };
36 metricbeat7 = beat "metricbeat" {
37 meta.description = "Lightweight shipper for metrics";
39 assert metricbeat7.drvPath == nixosTests.elk.ELK-7.elkPackages.metricbeat.drvPath;
41 elk = nixosTests.elk.ELK-7;
44 packetbeat7 = beat "packetbeat" {
45 buildInputs = [ libpcap ];
46 meta.description = "Network packet analyzer that ships data to Elasticsearch";
47 meta.longDescription = ''
48 Packetbeat is an open source network packet analyzer that ships the
49 data to Elasticsearch.
51 Think of it like a distributed real-time Wireshark with a lot more
52 analytics features. The Packetbeat shippers sniff the traffic between
53 your application processes, parse on the fly protocols like HTTP, MySQL,
54 PostgreSQL, Redis or Thrift and correlate the messages into transactions.