Skip to content

About

Collects a host's logs and metrics then ships them over open protocols for Windows MacOS and Linux

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

146 Commits

Folders and files

hyperi-agent

CI Licence

An open source log and metrics agent for Windows, Linux and macOS that ships to any receiver speaking an open protocol.

  • Windows 10 and Server 2016 or later: the Event Log, IIS, SQL Server, DNS, DHCP, NPS, Exchange, AD CS and AD FS. Installed by MSI, set by Group Policy.
  • Linux, x86_64 and arm64: the journal, nginx, Apache, PostgreSQL, MySQL, BIND, Postfix and more, plus Docker hosts and Kubernetes nodes. Installed from signed deb, rpm and apk repos.
  • macOS: the unified log, or edge-integration-macos's Endpoint Security and unified log spool, or the log files you list in their place, under a LaunchDaemon. Set by Jamf or a managed profile.

The agents from the big log platforms have all gone back to steering your data into their backends. This one hasn't, and an Apache-2.0 release stays open for good. It finds the services on a host, reads their logs from each service's config, holds batches on disk through an outage, and delivers at least once over HTTPS, syslog, gRPC or OTLP. It opens no listening port and never changes what the host logs. Point it where you like, and move it when you change your mind.

Agents are a last resort. Nobody running IT infrastructure wants yet another agent on every host. So we collect in this order, and drop to the next only where the one before cannot reach:

  1. Agentless: what the platform already sends, set up centrally. Windows Event Forwarding, syslog.
  2. Platform-native, opinionated and automated: the platform's own logging, configured and deployed by us. Sysmon and the Windows audit policy (edge-integration-windows), auditd and rsyslog (edge-integration-linux), Endpoint Security and the unified log (edge-integration-macos).
  3. An agent, for what neither reaches: hosts outside a domain, log files, and channels WEF cannot carry, such as DNS server analytic logging. Ours is hyperi-agent. Third-party agents a site already runs, such as Elastic Beats, are taken natively too.

What it does

  • Tails log files by glob, and resumes each file where it left off after a restart or a crash.
  • Delivers at least once: a stream's position moves only past records the receiver answered with a delivered_status code, or that went to the reject file. Syslog has no acknowledgement, so there a batch counts as delivered once written and flushed.
  • Posts JSON batches to an HTTPS intake, sends syslog over TLS or TCP, or pushes over gRPC with TLS, or plain to a receiver on the same machine (Vector's PushEvents). It also sends OTLP logs to an OpenTelemetry collector over gRPC or HTTP/protobuf.
  • Holds batches in a disk spool of the size you set while the receiver is down, and holds back the sources once it is full.
  • Drops, masks or trims records at the host with CEL rules, per source or before the sink.
  • Sends host and agent metrics over OTLP once you turn them on: CPU time by mode, memory, disks, network and the agent's pipeline.
  • Narrows a batch the receiver refuses down to the bad record, and parks that record in a reject file.
  • Shows records live with hyperi-agent tap, to an administrator or the agent's account.

What we do differently

  • Config over code. Every service the agent knows is a YAML definition, and a site adds one for its in-house app the same way, with no code and no release from us. hyperi-agent services list prints the catalogue (docs/services.md).
  • Discovery. It finds the services on a host and reads their log paths from each service's config, not from a list of default paths.
  • Secrets and personal data masked by default (filters).
  • Opinionated defaults. On Windows and Linux, with no sources listed, it reads what matters for the host's OS and roles, within a budget so it can't swamp the receiver.
  • Fleet management with the tools you have. Group Policy on Windows, Jamf and managed profiles on macOS, a YAML file anywhere. No management server.
  • Open at both ends. An Apache-2.0 licence, and open protocols out.

If you know these:

You run What changes
Elastic Beats Beats' Elasticsearch output has taken Elastic's clusters alone since 7.13. Filebeat modules start from each product's default paths, where this reads the service's config.
NXLog Community Edition NXLog points Community Edition users to its commercial platform. Here the fleet runs on Group Policy and Jamf.
Fluent Bit, Vector, OpenTelemetry Collector Pipelines, built for the inbound flow: receiving, transforming and routing. Not host agents like Beats. hyperi-agent feeds them over OTLP, syslog or Vector's gRPC.

hyperi-agent started as proprietary code bound to EdgeStream Hub and DFE, for our PaaS and BYOC products. It is now Apache-2.0 and open protocol, with no dependency on either product. Per-platform detail, from the Event Log query lists to Kubernetes pod logs, is in docs/collection.md.

Quick start

Build from source:

git clone https://github.com/hyperi-io/hyperi-agent.git && cd hyperi-agent
cargo build --release
./target/release/hyperi-agent validate --config agent.yaml --explain

With a config that tails /var/log/*.log, the last command prints each source and why it runs:

logs (file): listed in the config
agent.yaml: ok, 1 sources, plus a heartbeat every 300s

hyperi-agent run --config agent.yaml then runs it in the foreground.

To install, put the config in place and run the platform's installer. It starts the service once a config is there:

Platform Config Install
Windows 10, Server 2016 or later C:\ProgramData\HyperI\Agent\agent.yaml msiexec /i hyperi-agent-<version>.msi /qn
Linux /etc/hyperi-agent/agent.yaml sudo sh install.sh, from HyperI's signed apt, dnf, zypper or apk repo
macOS /Library/Application Support/HyperI/Agent/agent.yaml sudo sh install.sh from the release's macOS folder

docs/install.md covers the MSI's ENDPOINT and TOKENFILE properties, the Windows update task, upgrades, the service accounts and where each logs.

Configuration

One YAML file. A key the agent does not know is an error naming the file and the key.

sources:
  - type: file
    name: logs
    paths: ['/var/log/*.log']
sink:
  type: http
  endpoints:
    - url: https://intake.example/ingest
      auth: { type: bearer, token: '...' }

Leave sources out and the agent picks a default: on Linux the auth and audit logs, the system log and the package logs, on Windows the Event Log selection for the host's roles, and on macOS edge-integration-macos's audit and syslog spool, or the unified log where the integration isn't installed. Each leaves out what another default source sends, and known noise such as cron's root sessions (default collection). Config files and credentials must be writable by root or the agent's account alone.

A config change applies on a reload: systemctl reload hyperi-agent or kill -HUP on Linux and macOS, sc.exe control HyperIAgent paramchange on Windows. A config the agent refuses leaves it running on the one it has.

docs/configuration.md covers the keys most sites touch: default collection and its budget, endpoints and TLS, the disk spool, the heartbeat, metrics, tap and the CPU cap. Every key, with its type and default, is in docs/reference/agent-config.md, generated from schema/agent-config.schema.json.

Privacy

The agent sends records only to the destinations its config names, and nothing to HyperI. It makes two other kinds of request:

  • When a TLS check of a destination fails, it asks DNS over HTTPS resolvers (Cloudflare, Quad9 and Google by default) for that destination's name, to spot a hijack or a captive portal. dns.fallback: [] turns this off (delivery).
  • On Windows, the update task, off unless the MSI's UpdateTask feature is chosen, fetches the release feed from downloads.hyperi.io.

Documentation

  • Install and configuration: each platform's installer and service, and the keys most sites set.
  • Architecture: what the agent is made of, how a line reaches the receiver, and why.
  • Delivery, default collection and what the agent trusts: the detail behind the architecture page.
  • Filters: CEL rules that drop records at the host, per source or before the sink.
  • Metrics: what the agent measures about the host and itself, the series' names, and which filesystems and interfaces count.
  • Managed config: Group Policy, Jamf and macOS managed preferences, and how they layer over agent.yaml.
  • Working on the code: layout, the commands that test a change, and what tends to bite.
  • hyperi-agent validate --explain prints what a given config will run, and why. hyperi-agent tap prints the records the running agent sends, as JSON lines. --before-filter shows them after each source's filter rules and before the sink's, --source <name> narrows them to one source, and --filter '<CEL>' to the ones the expression matches.

Help, contributing and licence

About

Collects a host's logs and metrics then ships them over open protocols for Windows MacOS and Linux

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages