Skip to content

Commit

Permalink
Merge branch 'main' into automated/standardfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Stromweld authored May 20, 2024
2 parents 111d141 + 5e16092 commit 07878c6
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: ci

jobs:
lint-unit:
uses: sous-chefs/.github/.github/workflows/lint-unit.yml@3.0.0
uses: sous-chefs/.github/.github/workflows/lint-unit.yml@3.1.1
permissions:
actions: write
checks: write
Expand Down Expand Up @@ -46,9 +46,9 @@ jobs:
- name: Check out code
uses: actions/checkout@v4 # v4
- name: Install Chef
uses: actionshub/chef-install@2.0.4
uses: actionshub/chef-install@3.0.0
- name: Dokken
uses: actionshub/test-kitchen@2.1.0
uses: actionshub/test-kitchen@3.0.0
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ This file is used to list changes made in each version of the rsyslog cookbook.

Standardise files with files in sous-chefs/repo-management

Standardise files with files in sous-chefs/repo-management
## 9.2.21 - *2024-05-02*

## 9.2.20 - *2024-05-02*

## 9.2.19 - *2024-02-02*

## 9.2.18 - *2024-02-02*

Make `$InputTCPMaxSessions` configurable via
`node['rsyslog']['tcp_max_sessions']` attribute.

## 9.2.17 - *2023-12-21*

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ See `attributes/default.rb` for default values.
- `node['rsyslog']['rate_limit_interval']` - Value of the $SystemLogRateLimitInterval configuration directive in `/etc/rsyslog.conf`. Default is nil, leaving it to the platform default.
- `node['rsyslog']['rate_limit_burst']` - Value of the $SystemLogRateLimitBurst configuration directive in `/etc/rsyslog.conf`. Default is nil, leaving it to the platform default.
- `node['rsyslog']['action_queue_max_disk_space']` - Max amount of disk space the disk-assisted queue is allowed to use ([more info](http://www.rsyslog.com/doc/queues.html)).
- `node['rsyslog']['tcp_max_sessions']` - Maximum number of TCP sessions (ie. clients) this rsyslog server will handle. Default is 200.
- `node['rsyslog']['enable_tls']` - Whether or not to enable TLS encryption. When enabled, forces protocol to `tcp`. Default is `false`.
- `node['rsyslog']['tls_driver']` - Defaults to `ossl`.
- `node['rsyslog']['tls_ca_file']` - Path to TLS CA file. Required for both server and clients.
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
'ossl'
end
default['rsyslog']['action_queue_max_disk_space'] = '1G'
default['rsyslog']['tcp_max_sessions'] = 200
default['rsyslog']['tls_ca_file'] = nil
default['rsyslog']['tls_certificate_file'] = nil
default['rsyslog']['tls_key_file'] = nil
Expand Down
3 changes: 3 additions & 0 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ suites:
inspec_tests:
- name: rsyslog-default-integration-tests
path: test/integration/default
attributes:
rsyslog:
tcp_max_sessions: 123

- name: input_file_resource
attributes:
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
maintainer_email '[email protected]'
license 'Apache-2.0'
description 'Installs and configures rsyslog'
version '9.2.17'
version '9.2.21'
source_url 'https://github.com/sous-chefs/rsyslog'
issues_url 'https://github.com/sous-chefs/rsyslog/issues'
chef_version '>= 15.3'
Expand Down
2 changes: 2 additions & 0 deletions templates/default/rsyslog.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ $DefaultNetstreamDriverKeyFile <%= node['rsyslog']['tls_key_file'] %>

$ModLoad imtcp

$InputTCPMaxSessions <%= node['rsyslog']['tcp_max_sessions'] || 200 %>
$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
$InputTCPServerStreamDriverAuthMode <%= node['rsyslog']['tls_auth_mode'] || 'anon' %>
$InputTCPServerRun <%= node['rsyslog']['port'] %>
# Provide <%= node['rsyslog']['protocol'].upcase %> log reception
<% else -%>
<% if node['rsyslog']['protocol'] =~ /tcp/ %>
$ModLoad imtcp
$InputTCPMaxSessions <%= node['rsyslog']['tcp_max_sessions'] || 200 %>
$InputTCPServerRun <%= node['rsyslog']['port'] %>
<% end -%>
<% if node['rsyslog']['protocol'] =~ /udp/ %>
Expand Down
5 changes: 5 additions & 0 deletions test/integration/server/controls/server_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
control 'server' do
describe file '/etc/rsyslog.conf' do
it { should be_file }
its(:content) { should match /^\$InputTCPMaxSessions 123$/ }
end

describe file '/etc/rsyslog.d/35-server-per-host.conf' do
it { should be_file }
end
Expand Down

0 comments on commit 07878c6

Please sign in to comment.