The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
add sumo logic
Justin D'Souzaa53fcf23e3b4
diff --git a/README.md b/README.mdindex c28b598e..baaecddd 100644--- a/README.md+++ b/README.md@@ -40,9 +40,9 @@ events your team can inspect and retain locally.Beacon is built to be easy to deploy for Security and IT teams through[MDM deployment](https://docs.asymptotelabs.ai/cli/security-it-teams) and to-connect to Wazuh, Elastic, Datadog, Splunk HEC, or customer-managed SIEM-pipelines, while remaining visibility-first and local-first during normal-endpoint collection.+connect to Wazuh, Elastic, Datadog, Sumo Logic, Splunk HEC, or+customer-managed SIEM pipelines, while remaining visibility-first and+local-first during normal endpoint collection.## Supported Surfaces@@ -73,6 +73,7 @@ security pipelines.| Wazuh | Localfile configuration and Beacon Wazuh content pack || Elastic | Filebeat or Elastic Agent content pack over local JSONL || Datadog | Datadog Agent custom log collection over local JSONL |+| Sumo Logic | HTTP Logs & Metrics Source content pack over local JSONL || Splunk HEC | Optional endpoint forwarding during install or repair || Customer-managed SIEM pipelines | Forwarding from local Beacon JSONL under customer control |@@ -97,7 +98,7 @@ leaving forwarding under customer control.- **Beacon endpoint layer:** Local processing normalizes events, appliesretention and redaction settings, and writes durable endpoint telemetry.- **Output layer:** Teams inspect events in the local dashboard, retain JSONL,- or forward records into Wazuh, Elastic, Datadog, Splunk HEC, and+ or forward records into Wazuh, Elastic, Datadog, Sumo Logic, Splunk HEC, andcustomer-managed SIEM pipelines.Beacon filters generic process and runtime metrics, such as Node.js event loop,diff --git a/cli/beacon/README.md b/cli/beacon/README.mdindex 113b6a23..79325a0a 100644--- a/cli/beacon/README.md+++ b/cli/beacon/README.md@@ -60,6 +60,19 @@ that may need review../beacon endpoint wazuh validate```+## Sumo Logic++```bash+./beacon endpoint sumo print-config+./beacon endpoint sumo install-pack --output ./beacon-sumo-pack+./beacon endpoint sumo validate+```++The Sumo pack keeps Beacon as a local JSONL producer and documents forwarding+`runtime.jsonl` into a customer-managed Sumo Hosted Collector HTTP Logs &+Metrics Source. Use a tailing forwarder for production so offsets are+checkpointed and the whole file is not repeatedly uploaded.+## Optional Integrations```bashdiff --git a/cli/beacon/cmd/endpoint.go b/cli/beacon/cmd/endpoint.goindex 832d0345..17c5fb20 100644--- a/cli/beacon/cmd/endpoint.go+++ b/cli/beacon/cmd/endpoint.go@@ -23,6 +23,7 @@ import ("github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/integrations/openclaw""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/lifecycle""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/schema"+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/sumo""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/wazuh""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/writer""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/version"@@ -130,6 +131,11 @@ var endpointDatadogCmd = &cobra.Command{Short: "Manage Datadog integration content",}+var endpointSumoCmd = &cobra.Command{+ Use: "sumo",+ Short: "Manage Sumo Logic integration content",+}+var endpointIntegrationsCmd = &cobra.Command{Use: "integrations",Short: "Manage admin-configured endpoint integrations",@@ -357,6 +363,29 @@ var endpointDatadogValidateCmd = &cobra.Command{RunE: runEndpointDatadogValidate,}+var endpointSumoPrintConfigCmd = &cobra.Command{+ Use: "print-config",+ Short: "Print a Sumo HTTP Source smoke-test uploader for Beacon endpoint events",+ Run: func(cmd *cobra.Command, args []string) {+ cfg := loadOrDefaultConfig()+ fmt.Print(sumo.UploadSmokeTest(cfg.LogPath))+ },+}++var endpointSumoInstallPackCmd = &cobra.Command{+ Use: "install-pack",+ Short: "Write Sumo Logic HTTP Source forwarding content to a directory",+ SilenceUsage: true,+ RunE: runEndpointSumoInstallPack,+}++var endpointSumoValidateCmd = &cobra.Command{+ Use: "validate",+ Short: "Write and describe a Sumo Logic validation event",+ SilenceUsage: true,+ RunE: runEndpointSumoValidate,+}+func init() {rootCmd.AddCommand(endpointCmd)@@ -369,6 +398,7 @@ func init() {endpointCmd.AddCommand(endpointWazuhCmd)endpointCmd.AddCommand(endpointElasticCmd)endpointCmd.AddCommand(endpointDatadogCmd)+ endpointCmd.AddCommand(endpointSumoCmd)endpointCmd.AddCommand(endpointIntegrationsCmd)endpointCmd.AddCommand(endpointHooksCmd)endpointWazuhCmd.AddCommand(endpointWazuhPrintConfigCmd)@@ -381,6 +411,9 @@ func init() {endpointDatadogCmd.AddCommand(endpointDatadogPrintConfigCmd)endpointDatadogCmd.AddCommand(endpointDatadogInstallPackCmd)endpointDatadogCmd.AddCommand(endpointDatadogValidateCmd)+ endpointSumoCmd.AddCommand(endpointSumoPrintConfigCmd)+ endpointSumoCmd.AddCommand(endpointSumoInstallPackCmd)+ endpointSumoCmd.AddCommand(endpointSumoValidateCmd)endpointIntegrationsCmd.AddCommand(endpointCoworkCmd)endpointIntegrationsCmd.AddCommand(endpointOpenClawCmd)endpointHooksCmd.AddCommand(endpointHooksInstallCmd)@@ -450,6 +483,12 @@ func init() {c.Flags().StringVar(&endpointOpts.logPath, "log-path", "", "Runtime JSONL log path")}endpointDatadogInstallPackCmd.Flags().StringVar(&endpointOpts.outputDir, "output", "", "Output directory for Datadog content pack")+ for _, c := range []*cobra.Command{endpointSumoPrintConfigCmd, endpointSumoInstallPackCmd, endpointSumoValidateCmd} {+ c.Flags().BoolVar(&endpointOpts.userMode, "user", true, "Use per-user endpoint paths")+ c.Flags().BoolVar(&endpointOpts.systemMode, "system", false, "Use system endpoint paths and launch daemon")+ c.Flags().StringVar(&endpointOpts.logPath, "log-path", "", "Runtime JSONL log path")+ }+ endpointSumoInstallPackCmd.Flags().StringVar(&endpointOpts.outputDir, "output", "", "Output directory for Sumo Logic content pack")for _, c := range []*cobra.Command{endpointCoworkPrintConfigCmd, endpointCoworkSetupCmd, endpointCoworkStatusCmd, endpointCoworkValidateCmd} {c.Flags().BoolVar(&endpointOpts.userMode, "user", true, "Use per-user endpoint paths")c.Flags().BoolVar(&endpointOpts.systemMode, "system", false, "Use system endpoint paths and launch daemon")@@ -725,6 +764,31 @@ func runEndpointDatadogValidate(cmd *cobra.Command, args []string) error {return nil}+func runEndpointSumoInstallPack(cmd *cobra.Command, args []string) error {+ cfg := loadOrDefaultConfig()+ outputDir := endpointOpts.outputDir+ if outputDir == "" {+ outputDir = sumo.DefaultOutputDir+ }+ if err := sumo.InstallPack(outputDir, cfg.LogPath); err != nil {+ return err+ }+ fmt.Printf("Sumo Logic content pack written to %s\n", outputDir)+ return nil+}++func runEndpointSumoValidate(cmd *cobra.Command, args []string) error {+ cfg := loadOrDefaultConfig()+ path, err := writeValidationEvent(cfg, "sumo")+ if err != nil {+ return err+ }+ fmt.Printf("Validation event written to %s\n", path)+ fmt.Println("Expected Sumo fields: _sourceCategory=security/agentbeacon product=agentbeacon telemetry=ai_agent")+ fmt.Println(`Expected validation query: _sourceCategory=security/agentbeacon "Beacon endpoint Sumo validation event"`)+ return nil+}+func runEndpointOpenClawValidate() error {cfg := loadOrDefaultConfig()setup := func() {@@ -1021,6 +1085,9 @@ func writeValidationEvent(cfg endpointconfig.Config, destination string) (stringif destination == "datadog" {message = "Beacon endpoint datadog validation event"mode = "agent_file"+ } else if destination == "sumo" {+ message = "Beacon endpoint Sumo validation event"+ mode = "http_source_jsonl"}event := schema.NewEvent(schema.NewEventOptions{Action: "agent.detected",diff --git a/cli/beacon/cmd/endpoint_test.go b/cli/beacon/cmd/endpoint_test.goindex e3a0564b..fb2a89cf 100644--- a/cli/beacon/cmd/endpoint_test.go+++ b/cli/beacon/cmd/endpoint_test.go@@ -133,6 +133,30 @@ func TestEndpointDatadogCommandsRegistered(t *testing.T) {}}+func TestEndpointSumoCommandsRegistered(t *testing.T) {+ for _, path := range [][]string{+ {"sumo", "print-config"},+ {"sumo", "install-pack"},+ {"sumo", "validate"},+ } {+ cmd, _, err := endpointCmd.Find(path)+ if err != nil {+ t.Fatalf("Find %v returned error: %v", path, err)+ }+ if cmd == nil || cmd.Use != path[len(path)-1] {+ t.Fatalf("sumo command %v not registered: %#v", path, cmd)+ }+ for _, name := range []string{"user", "system", "log-path"} {+ if cmd.Flags().Lookup(name) == nil {+ t.Fatalf("sumo command %v missing --%s flag", path, name)+ }+ }+ }+ if endpointSumoInstallPackCmd.Flags().Lookup("output") == nil {+ t.Fatal("sumo install-pack command missing --output flag")+ }+}+func TestEnsureElasticPackDoesNotOverwriteExistingPack(t *testing.T) {dir := t.TempDir()composePath := filepath.Join(dir, "docker-compose.yml")diff --git a/cli/beacon/internal/endpoint/sumo/pack/README.md b/cli/beacon/internal/endpoint/sumo/pack/README.mdnew file mode 100644index 00000000..9af1d957--- /dev/null+++ b/cli/beacon/internal/endpoint/sumo/pack/README.md@@ -0,0 +1,121 @@+# Beacon Endpoint Agent Sumo Logic Pack++This pack forwards Beacon endpoint JSONL events into a Sumo Logic Hosted+Collector HTTP Logs & Metrics Source. Beacon still writes one local source of+truth: `runtime.jsonl`. Sumo source URLs and tokens stay in your log shipper or+deployment tooling, not in Beacon endpoint configuration.++## Prerequisites++- Beacon endpoint installed and writing local JSONL.+- A Sumo Logic Hosted Collector with an HTTP Logs & Metrics Source.+- The Source URL copied as either a presigned URL or an Auth Header URL with a+ separate `x-sumo-token` value.++Recommended Sumo source metadata:++```text+_sourceCategory=security/agentbeacon+source name=agentbeacon+fields=product=agentbeacon,telemetry=ai_agent,env=prod+```++If you use Sumo fields, confirm the fields exist and are enabled in the Sumo+Fields table schema so they are not dropped at ingest.++## Install++Generate this pack:++```bash+beacon endpoint sumo install-pack --output ./beacon-sumo-pack+```++The generated smoke-test script points at the Beacon log path selected by the+CLI:++- User mode: `~/.beacon/endpoint/logs/runtime.jsonl`+- System mode: `/var/log/beacon-agent/runtime.jsonl`+- Custom mode: the value passed with `--log-path`++For MDM or managed endpoint deployment, prefer Beacon system mode so your+customer-managed log shipper can tail `/var/log/beacon-agent/runtime.jsonl`+without per-user home directory ACLs.++## One-Shot Smoke Test++Use the generated script to upload the current file once. This is only for+validation; do not use it as production forwarding because it re-uploads the+whole file every time.++With a presigned Sumo Source URL:++```bash+export SUMO_URL="https://collectors.sumologic.com/receiver/v1/http/..."+./beacon-sumo-pack/sumo-upload-smoke-test.sh+```++With Sumo's Auth Header option:++```bash+export SUMO_URL="https://collectors.sumologic.com/receiver/v1/http"+export SUMO_TOKEN="..."+./beacon-sumo-pack/sumo-upload-smoke-test.sh+```++You can override the defaults:++```bash+export BEACON_LOG="$HOME/.beacon/endpoint/logs/runtime.jsonl"+export SUMO_SOURCE_CATEGORY="security/agentbeacon"+export SUMO_FIELDS="product=agentbeacon,telemetry=ai_agent,env=prod"+```++The script uses `curl -T` so JSONL line breaks are preserved for Sumo message+boundary detection.++## Production Forwarding++For production, use your fleet's existing log shipper or Sumo's OpenTelemetry+Collector distribution to tail `runtime.jsonl` and POST batches to the Sumo HTTP+Source. The forwarder should:++- checkpoint file offsets,+- batch newline-delimited JSON records,+- keep uncompressed POST payloads near Sumo's 100 KB to 1 MB guidance,+- gzip payloads with `Content-Encoding: gzip`,+- retry transient failures without duplicating the whole file.++Keep each Beacon event as one JSON object per line. In the Sumo HTTP Source+advanced log options, avoid `One Message Per Request` when sending batched JSONL+payloads. Use automatic message boundary detection or a boundary configuration+that treats each JSON line as a distinct log record.++## Validate++Write a fresh Beacon validation event:++```bash+beacon endpoint sumo validate+```++Run the one-shot smoke test or wait for your production forwarder to ship the+new line. In Sumo Logic, validate with Live Tail first because normal Search can+lag while data is indexed.++Suggested Live Tail or Search filters:++```text+_sourceCategory=security/agentbeacon product=agentbeacon telemetry=ai_agent+```++```text+_sourceCategory=security/agentbeacon "Beacon endpoint Sumo validation event"+```++## Content Retention++Beacon content retention defaults to `full`, so prompt text, tool input, command+output, raw tool payloads, and other retained content may be forwarded to Sumo.+Use Beacon's `metadata` or `redacted` content retention modes for stricter+deployments.diff --git a/cli/beacon/internal/endpoint/sumo/pack/sumo-upload-smoke-test.sh.tmpl b/cli/beacon/internal/endpoint/sumo/pack/sumo-upload-smoke-test.sh.tmplnew file mode 100644index 00000000..e8138321--- /dev/null+++ b/cli/beacon/internal/endpoint/sumo/pack/sumo-upload-smoke-test.sh.tmpl@@ -0,0 +1,34 @@+#!/bin/sh+set -eu++BEACON_LOG="${BEACON_LOG:-{{LOG_PATH}}}"+SUMO_SOURCE_CATEGORY="${SUMO_SOURCE_CATEGORY:-security/agentbeacon}"+SUMO_FIELDS="${SUMO_FIELDS:-product=agentbeacon,telemetry=ai_agent,env=prod}"++if [ -z "${SUMO_URL:-}" ]; then+ echo "SUMO_URL is required. Use the HTTP Logs & Metrics Source URL from Sumo Logic." >&2+ exit 2+fi++if [ ! -r "$BEACON_LOG" ]; then+ echo "Beacon runtime log is not readable: $BEACON_LOG" >&2+ exit 2+fi++args="-X POST -H X-Sumo-Category: $SUMO_SOURCE_CATEGORY -H X-Sumo-Fields: $SUMO_FIELDS -T $BEACON_LOG"++if [ -n "${SUMO_TOKEN:-}" ]; then+ # Use Sumo's Auth Header source URL with a separate token when available.+ curl -X POST \+ -H "x-sumo-token: $SUMO_TOKEN" \+ -H "X-Sumo-Category: $SUMO_SOURCE_CATEGORY" \+ -H "X-Sumo-Fields: $SUMO_FIELDS" \+ -T "$BEACON_LOG" \+ "$SUMO_URL"+else+ curl -X POST \+ -H "X-Sumo-Category: $SUMO_SOURCE_CATEGORY" \+ -H "X-Sumo-Fields: $SUMO_FIELDS" \+ -T "$BEACON_LOG" \+ "$SUMO_URL"+fidiff --git a/cli/beacon/internal/endpoint/sumo/sumo.go b/cli/beacon/internal/endpoint/sumo/sumo.gonew file mode 100644index 00000000..51b39b62--- /dev/null+++ b/cli/beacon/internal/endpoint/sumo/sumo.go@@ -0,0 +1,71 @@+package sumo++import (+ "embed"+ "fmt"+ "os"+ "path/filepath"+ "strings"+)++//go:embed pack/*+var packFS embed.FS++const (+ DefaultLogPath = "/var/log/beacon-agent/runtime.jsonl"+ DefaultOutputDir = "beacon-sumo-pack"+)++type File struct {+ Name string+ Content string+}++func Files() []File {+ return []File{+ {Name: "README.md", Content: mustRead("pack/README.md")},+ {Name: "sumo-upload-smoke-test.sh", Content: UploadSmokeTest(DefaultLogPath)},+ {Name: "sample-event.jsonl", Content: mustRead("pack/sample-event.jsonl")},+ }+}++func UploadSmokeTest(logPath string) string {+ if logPath == "" {+ logPath = DefaultLogPath+ }+ return strings.ReplaceAll(mustRead("pack/sumo-upload-smoke-test.sh.tmpl"), "{{LOG_PATH}}", logPath)+}++func InstallPack(outputDir, logPath string) error {+ if outputDir == "" {+ outputDir = DefaultOutputDir+ }+ if err := os.MkdirAll(outputDir, 0755); err != nil {+ return err+ }+ for _, file := range Files() {+ content := file.Content+ if file.Name == "sumo-upload-smoke-test.sh" {+ content = UploadSmokeTest(logPath)+ }+ if err := os.WriteFile(filepath.Join(outputDir, file.Name), []byte(content), fileMode(file.Name)); err != nil {+ return err+ }+ }+ return nil+}++func fileMode(name string) os.FileMode {+ if strings.HasSuffix(name, ".sh") {+ return 0755+ }+ return 0644+}++func mustRead(path string) string {+ data, err := packFS.ReadFile(path)+ if err != nil {+ panic(fmt.Sprintf("sumo pack asset %s: %v", path, err))+ }+ return string(data)+}diff --git a/cli/beacon/internal/endpoint/sumo/sumo_test.go b/cli/beacon/internal/endpoint/sumo/sumo_test.gonew file mode 100644index 00000000..0dd73b51--- /dev/null+++ b/cli/beacon/internal/endpoint/sumo/sumo_test.go@@ -0,0 +1,107 @@+package sumo++import (+ "bufio"+ "encoding/json"+ "os"+ "path/filepath"+ "strings"+ "testing"+)++func TestUploadSmokeTestUsesConfiguredPath(t *testing.T) {+ got := UploadSmokeTest("/tmp/beacon/runtime.jsonl")+ if !strings.Contains(got, "/tmp/beacon/runtime.jsonl") {+ t.Fatalf("script did not include configured path: %s", got)+ }+ if strings.Contains(got, "{{LOG_PATH}}") {+ t.Fatalf("script still contains template token: %s", got)+ }+ for _, want := range []string{+ "SUMO_URL",+ "SUMO_TOKEN",+ "X-Sumo-Category",+ "X-Sumo-Fields",+ "x-sumo-token",+ "curl -X POST",+ "-T \"$BEACON_LOG\"",+ "security/agentbeacon",+ "product=agentbeacon,telemetry=ai_agent,env=prod",+ } {+ if !strings.Contains(got, want) {+ t.Fatalf("script missing %q: %s", want, got)+ }+ }+}++func TestInstallPackWritesExpectedFiles(t *testing.T) {+ dir := t.TempDir()+ if err := InstallPack(dir, "/tmp/beacon/runtime.jsonl"); err != nil {+ t.Fatalf("InstallPack returned error: %v", err)+ }+ for _, name := range []string{"README.md", "sumo-upload-smoke-test.sh", "sample-event.jsonl"} {+ if _, err := os.Stat(filepath.Join(dir, name)); err != nil {+ t.Fatalf("expected %s: %v", name, err)+ }+ }+ scriptPath := filepath.Join(dir, "sumo-upload-smoke-test.sh")+ script, err := os.ReadFile(scriptPath)+ if err != nil {+ t.Fatal(err)+ }+ if !strings.Contains(string(script), "/tmp/beacon/runtime.jsonl") {+ t.Fatalf("generated script missing configured log path: %s", script)+ }+ info, err := os.Stat(scriptPath)+ if err != nil {+ t.Fatal(err)+ }+ if info.Mode().Perm()&0111 == 0 {+ t.Fatalf("generated script should be executable, mode=%s", info.Mode())+ }+}++func TestSampleEventsCoverValidationHookAndOTelShapes(t *testing.T) {+ scanner := bufio.NewScanner(strings.NewReader(mustRead("pack/sample-event.jsonl")))+ var sawValidation, sawHook, sawOTel bool+ for scanner.Scan() {+ var doc map[string]interface{}+ if err := json.Unmarshal(scanner.Bytes(), &doc); err != nil {+ t.Fatalf("sample-event.jsonl is not valid JSONL: %v", err)+ }+ if destination, ok := doc["destination"].(map[string]interface{}); ok && destination["type"] == "sumo" {+ sawValidation = true+ }+ if _, ok := doc["tool"].(map[string]interface{}); ok {+ sawHook = true+ }+ if raw, ok := doc["raw"].(map[string]interface{}); ok && raw["otel_signal"] != nil {+ sawOTel = true+ }+ }+ if err := scanner.Err(); err != nil {+ t.Fatal(err)+ }+ if !sawValidation || !sawHook || !sawOTel {+ t.Fatalf("sample events should include validation, hook-rich, and OTel shapes; validation=%t hook=%t otel=%t", sawValidation, sawHook, sawOTel)+ }+}++func TestPackREADMEMentionsSumoSetupAndProductionForwarding(t *testing.T) {+ readme := mustRead("pack/README.md")+ for _, want := range []string{+ "beacon endpoint sumo validate",+ "HTTP Logs & Metrics Source",+ "_sourceCategory=security/agentbeacon",+ "product=agentbeacon,telemetry=ai_agent,env=prod",+ "100 KB to 1 MB",+ "Content-Encoding: gzip",+ "Live Tail",+ "content retention",+ "/var/log/beacon-agent/runtime.jsonl",+ } {+ if !strings.Contains(readme, want) {+ t.Fatalf("pack README missing %q", want)+ }+ }+}diff --git a/packaging/macos/README.md b/packaging/macos/README.mdindex 0d8bd475..99943ca8 100644--- a/packaging/macos/README.md+++ b/packaging/macos/README.md@@ -84,6 +84,22 @@ loads the local collector LaunchDaemon. The shared endpoint wrapper installssystem-level configuration and writes logs to`/var/log/beacon-agent/runtime.jsonl`.+For Sumo Logic, keep Beacon as the local JSONL producer and deploy a+customer-managed shipper that tails `/var/log/beacon-agent/runtime.jsonl` into a+Hosted Collector HTTP Logs & Metrics Source. Generate Beacon's Sumo content pack+for setup guidance, a one-shot smoke test, and sample events:++```bash+/opt/beacon/bin/beacon endpoint sumo install-pack --system --output ./beacon-sumo-pack+/opt/beacon/bin/beacon endpoint sumo validate --system+```++Recommended Sumo metadata is `_sourceCategory=security/agentbeacon`, source+name `agentbeacon`, and fields+`product=agentbeacon,telemetry=ai_agent,env=prod`. For production forwarding,+use a tailing shipper that checkpoints offsets, batches JSONL records, sends+gzip-compressed POST payloads, and avoids repeatedly uploading the whole file.+Environment variables take precedence, followed by MDM script parameters:```text