Skip to content

Commit 482fd50

Browse files
committed
chore: update README and configuration files to include additional optional variables and logging settings
1 parent 4e0fd69 commit 482fd50

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,29 @@ ships Linux audit logs to Fluentd endpoints in real-time.
2424

2525
### Required Variables
2626

27-
- `auditship_fluent_url`: URL to Fluentd endpoint (default: `fluent://127.0.0.1:24224`)
27+
None. All variables have sensible defaults.
2828

2929
### Optional Variables
3030

31-
- `auditship_force_install`: Forces reinstallation even if binary exists (default: `false`)
31+
| Variable | Default | Description |
32+
|----------|---------|-------------|
33+
| `auditship_force_install` | `false` | Forces reinstallation even if binary exists |
34+
| `auditship_tag` | `auditd` | Tag to apply to audit logs |
35+
| `auditship_outputs` | `["-", "/var/log/auditship.json"]` | Array of output destinations (stdout and file) |
36+
| `auditship_log_file` | `/var/log/auditship.log` | Location of auditship log file |
37+
| `auditship_log_level` | `info` | Logging level (debug, info, warn, error) |
3238

3339
### Example Variable Configuration
3440

3541
```yaml
36-
auditship_fluent_url: "fluent://log-collector.example.com:24224"
3742
auditship_force_install: true
43+
auditship_tag: "security-audit"
44+
auditship_outputs:
45+
- "-" # stdout
46+
- "/var/log/auditship.json" # local file
47+
- "fluent://log-server.company.com:24224" # fluentd endpoint
48+
auditship_log_file: "/var/log/auditship.log"
49+
auditship_log_level: "debug"
3850
```
3951
4052
## Dependencies
@@ -52,13 +64,18 @@ None.
5264
- devopsworks.auditship
5365
```
5466
55-
### With Custom Fluentd Endpoint
67+
### With Custom Configuration
5668
5769
```yaml
5870
- hosts: servers
5971
become: true
6072
vars:
61-
auditship_fluent_url: "fluent://log-server.company.com:24224"
73+
auditship_tag: "security-audit"
74+
auditship_outputs:
75+
- "-" # stdout
76+
- "/var/log/auditship.json" # local file
77+
- "fluent://log-server.company.com:24224" # fluentd endpoint
78+
auditship_log_level: "debug"
6279
roles:
6380
- devopsworks.auditship
6481
```
@@ -94,12 +111,14 @@ ansible-galaxy install git+https://github.com/devops-works/ansible-auditship.git
94111
2. **Binary Download**: Downloads the compressed auditship binary for Linux AMD64
95112
3. **Installation**: Extracts and installs the binary to `/usr/local/bin/auditship`
96113
4. **Plugin Configuration**: Creates auditd plugin configuration in `/etc/audit/plugins.d/auditship.conf`
97-
5. **Log Rotation**: Downloads and installs logrotate configuration to `/etc/logrotate.d/auditship`
114+
5. **Main Configuration**: Creates main auditship configuration file at `/etc/auditship.conf`
115+
6. **Log Rotation**: Downloads and installs logrotate configuration to `/etc/logrotate.d/auditship`
98116

99117
## File Locations
100118

101119
- **Binary**: `/usr/local/bin/auditship`
102120
- **Plugin Config**: `/etc/audit/plugins.d/auditship.conf`
121+
- **Main Config**: `/etc/auditship.conf`
103122
- **Log Rotation**: `/etc/logrotate.d/auditship`
104123

105124
## Supported Platforms
@@ -175,6 +194,9 @@ ls -la /usr/local/bin/auditship
175194
# Verify plugin configuration
176195
cat /etc/audit/plugins.d/auditship.conf
177196

197+
# Verify main configuration
198+
cat /etc/auditship.conf
199+
178200
# Check auditd is using the plugin
179201
sudo service auditd status
180202
```

defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ auditship_tag: auditd
33
auditship_outputs:
44
- "-"
55
- /var/log/auditship.json
6-
auditship_log_file: /var/log/auditship.log
6+
auditship_log_file: /var/log/auditship.log
7+
auditship_log_level: info

templates/auditship.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ outputs:
44
- "{{ output }}"
55
{% endfor %}
66
log_file: {{ auditship_log_file }}
7+
log_level: {{ auditship_log_level }}

0 commit comments

Comments
 (0)