The Atatus Infrastructure Agent can mask sensitive values in your logs on your own host, before the logs are sent to Atatus. The original values never leave your server. Use it when data such as card numbers, Aadhaar numbers, passwords, or API keys must not travel over the network at all. One sensitive_data block in atatus.yml covers every log the agent ships: log files configured in conf.d, Kubernetes and Docker container logs, Windows event logs, syslog, and AWS S3 logs. You do not need to change each log source.

Agent-side masking or the Sensitive Data Classifier

Atatus can mask sensitive data in two places. They work well together: A common setup is to mask on the host what must never leave your network, and use the Sensitive Data Classifier for account-wide rules, search tags, and alerting.

Enable masking

1

Turn on log collection

Masking applies to the logs the agent collects, so log collection must be on. In /etc/atatus-infra-agent/atatus.yml, set:
2

Add the sensitive_data block

Add this block to the same file. It turns on every built-in rule:
3

Restart the agent

Restart the agent so it reads the new configuration:
4

Check that masking is on

The agent writes the active rules to /var/log/atatus-infra-agent/agent.log when it starts:
A masked value is replaced with [REDACTED: followed by the rule name and ], and the rest of the line is kept:
JSON log lines stay valid JSON. A masked JSON number becomes a string, for example "cvv":123 becomes "cvv":"[REDACTED:cvv]".
The agent ships a complete reference with every rule listed and commented: /etc/atatus-infra-agent/sensitive_data.yml.template. Copy its sensitive_data block into atatus.yml as a starting point.

Built-in rules

All built-in rules are on when enabled: true is set, except the two opt-in rules at the end of the table. Some values identify themselves, such as an email address or a card number, so the agent finds them anywhere in a log line. Others only mean something next to their field name, such as a CVV or a date of birth, so the agent masks them when they follow a matching key. Keys are matched in the common log formats (JSON, logfmt, key: value, XML, form data, and Ruby or Python hashes), ignoring case and _, -, and . separators. A key also matches at the end of a longer name, so mobileNo, mobile_no, and customer.mobile_no all match mobile.
Some values are left alone on purpose. Network fields such as remoteAddress or address=10.0.0.5:443 are not treated as postal addresses, certificate and token expiry timestamps are not treated as card expiry dates, and AWS access key IDs (AKIA...) are kept because they identify a key without granting access. The AWS secret access key is masked.

Customize the rules

List only the rules you want to change under rules:
These are the options you can set on a rule:

Add custom rules

You can add new data types in atatus.yml, without an agent upgrade, under custom_rules:
A pattern that does not start with fixed text has to be tried on every log line, which adds about 2 microseconds per line for each such rule. Add keywords to these rules so the pattern only runs on lines where it can match.
Use (?:...) for groups other than value, and \b at the edges of a pattern so it does not match inside longer words.

If the configuration is invalid

An unknown rule name, an invalid regular expression, or a replacement with quotes stops log collection. The agent writes the reason to /var/log/atatus-infra-agent/agent.log:
This is deliberate. When you ask for masking, the agent sends no logs rather than unmasked ones. Metrics are not affected. Fix the configuration and restart the agent to resume log collection.

Limits

  • Names, addresses, and dates of birth are found only next to a field name. A name in plain text (“Dear Ravi Kumar”), in a CSV row, or in an SQL VALUES (...) list is not masked. Add the field names your logs use with extra_keys.
  • Plain name is not a built-in key, because in infrastructure logs it usually names a pod, a container, or a service. If your logs use name for people, for example <Payer name="..."> in UPI XML, add it with consumer_name: extra_keys: [name].
  • A foreign phone number written without + and a country code, such as 415-555-2671, is masked only after a key such as phone.
  • For Windows event logs, the event fields (event_data and user_data) are scanned as well as the message. For other logs, the message is scanned.
  • Checksums remove most false matches but not all. Occasionally an ID that happens to pass a checksum, such as a 16-digit number passing Luhn, is masked.

Next steps