# Example sentry-agent config. Copy to the platform's conventional path # (/etc/sentry-agent/agent.toml on Linux, C:\ProgramData\SentryAgent\agent.toml # on Windows), or pass --config /path/to/this/file. # # Every field has a built-in default (see src/config.rs), so this file only # needs to contain what you're overriding. An agent with NO config file at # all still runs: on Linux it defaults to journald, service = "default", # and expects mTLS material at /etc/sentry-agent/{ca,client,client-key}.pem # (Windows equivalents under C:\ProgramData\SentryAgent\). [agent] # host = "explicit-hostname-override" # defaults to /etc/hostname (Linux) or %COMPUTERNAME% (Windows) service = "my-service" [source] kind = "journald" # unit = "nginx.service" # omit to tail the whole journal # To tail a file instead (works on both Linux and Windows): # [source] # kind = "file" # path = "/var/log/nginx/access.log" # from_beginning = false # Windows Event Log (requires the agent to be built with the # `windows-eventlog` feature — see /agent/README.md): # [source] # kind = "eventlog" # channels = ["Application", "System", "Security"] # this is the default if omitted # ETW (requires the `etw` feature, and usually elevated privileges — read # /agent/README.md's privilege section before enabling this): # [source] # kind = "etw" # providers = ["{22FB2CD6-0E7B-422B-A0C7-2FAD1FD0E716}"] # GUIDs, not friendly names [batch] max_size = 500 flush_interval_ms = 2000 [heartbeat] # How often this agent proves it's still alive to the platform, sent as # its own record independent of whatever real log traffic is flowing -- # pair with an "absence" alert rule on the sentry.heartbeat attribute to # get paged when a host goes quiet. Accepts a plain number + unit: s # (seconds), m (minutes), or h (hours) -- same vocabulary as # earliest=/latest= in the query language. See # /docs/agent-heartbeat-monitoring.md. enabled = true interval = "60s" # interval = "5m" # interval = "1h" [ingest] endpoint = "https://ingest.internal:4317" [tls] ca_cert = "/etc/sentry-agent/ca.pem" client_cert = "/etc/sentry-agent/client.pem" client_key = "/etc/sentry-agent/client-key.pem"