Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding additional parameters for FPM configuration. #821

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@
# @param saml_sp_key The location of the SAML Service Provider Key file.
# @param saml_sp_cert The location of the SAML Service Provider Certificate.
# @param saml_idp_cert The location of the SAML Identity Provider Certificate.
# @param fpm_max_requests The number of requests each child process should execute before respawning.
# @param fpm_max_spare_servers The desired maximum number of idle server processes.
# @param saml_settings A hash of additional SAML SSO settings.
# @example Single host setup:
# class { 'zabbix':
Expand Down Expand Up @@ -341,6 +343,8 @@
Optional[Stdlib::Absolutepath] $saml_sp_key = $zabbix::params::saml_sp_key,
Optional[Stdlib::Absolutepath] $saml_sp_cert = $zabbix::params::saml_sp_cert,
Optional[Stdlib::Absolutepath] $saml_idp_cert = $zabbix::params::saml_idp_cert,
Optional[Integer[1, 10000]] $fpm_max_requests = $zabbix::params::fpm_max_requests,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default this to undef on params class

Optional[Integer[1, 1000]] $fpm_max_spare_servers = $zabbix::params::fpm_max_spare_servers,
Hash[String[1], Variant[ScalarData, Hash]] $saml_settings = $zabbix::params::saml_settings,
) inherits zabbix::params {
class { 'zabbix::web':
Expand Down Expand Up @@ -388,6 +392,8 @@
saml_sp_cert => $saml_sp_cert,
saml_idp_cert => $saml_idp_cert,
saml_settings => $saml_settings,
fpm_max_requests => $fpm_max_requests,
fpm_max_spare_servers => $fpm_max_spare_servers,
manage_selinux => $manage_selinux,
require => Class['zabbix::server'],
}
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
$saml_sp_cert = undef
$saml_idp_cert = undef
$saml_settings = {}
$fpm_max_spare_servers = 35

# Zabbix-server
$server_alertscriptspath = '/etc/zabbix/alertscripts'
Expand Down
2 changes: 2 additions & 0 deletions manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@
Optional[Stdlib::Absolutepath] $saml_sp_key = $zabbix::params::saml_sp_key,
Optional[Stdlib::Absolutepath] $saml_sp_cert = $zabbix::params::saml_sp_cert,
Optional[Stdlib::Absolutepath] $saml_idp_cert = $zabbix::params::saml_idp_cert,
Optional[Integer[1, 1000]] $fpm_max_requests = $zabbix::params::fpm_max_requests,
Optional[Integer[1, 100]] $fpm_max_spare_servers = $zabbix::params::fpm_max_spare_servers,
Hash[String[1], Variant[ScalarData, Hash]] $saml_settings = $zabbix::params::saml_settings,
$puppetgem = $zabbix::params::puppetgem,
Boolean $manage_selinux = $zabbix::params::manage_selinux,
Expand Down
5 changes: 4 additions & 1 deletion templates/web/php-fpm.d.zabbix.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_spare_servers = <%= $zabbix::web::fpm_max_spare_servers %>
<% if $zabbix::web::fpm_max_requests { %>
pm.max_requests = <%= $zabbix::web::fpm_max_requests %>
<% } %>

php_value[session.save_handler] = files
php_value[session.save_path] = /var<%= $zabbix::web::fpm_scl_prefix %>/lib/php/session/
Expand Down