Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.
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
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@
# variable (mainly for nginx use) to tell Graphite a user is authenticated.
# Useful when using an external auth handler with X-Accel-Redirect etc.
# Example value - HTTP_X_REMOTE_USER
# [*gr_apache_logformat*]
# Specify the log format to use for apache access logs
# [*gunicorn_arg_timeout*]
# value to pass to gunicorn's --timeout arg.
# Default is 30
Expand Down Expand Up @@ -726,6 +728,7 @@
$gr_graphiteweb_storage_dir = '/var/lib/graphite-web',
$gr_graphiteweb_install_lib_dir = undef,
$gr_apache_logdir = $::graphite::params::apache_logdir_graphite,
$gr_apache_logformat = 'common',
$gunicorn_arg_timeout = 30,
$gunicorn_bind = 'unix:/var/run/graphite.sock',
$gunicorn_workers = 2,
Expand Down
3 changes: 3 additions & 0 deletions spec/classes/graphite_config_apache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
:require => 'Package[mod_wsgi]',
:notify => 'Service[httpd]'})
}
it { is_expected.to contain_file('/etc/httpd/conf.d/graphite.conf').with_content(/CustomLog \/var\/log\/httpd\/graphite-web\/graphite-web-access.log common/) }
end

shared_context 'Debian supported platforms' do
Expand Down Expand Up @@ -60,6 +61,8 @@
:onlyif => 'test -f /etc/apache2/sites-enabled/000-default -o -f /etc/apache2/sites-enabled/000-default.conf',
:require => 'Package[libapache2-mod-wsgi]',})
}

it { is_expected.to contain_file('/etc/apache2/sites-available/graphite.conf').with_content(/CustomLog \/var\/log\/apache2\/graphite-web\/graphite-web-access.log common/) }
end

context 'Unsupported OS' do
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/apache2/sites-available/graphite.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ WSGISocketPrefix <%= scope.lookupvar('graphite::params::apache_wsgi_socket_prefi
<% if ![nil, '', :undef].include?(scope.lookupvar('graphite::gr_apache_noproxy')) %> NoProxy <%= scope.lookupvar('graphite::gr_apache_noproxy') %><% end %>

ErrorLog <%= scope.lookupvar('graphite::gr_apache_logdir') %>/graphite-web-error.log
CustomLog <%= scope.lookupvar('graphite::gr_apache_logdir') %>/graphite-web-access.log common
CustomLog <%= scope.lookupvar('graphite::gr_apache_logdir') %>/graphite-web-access.log <%= scope.lookupvar('graphite::gr_apache_logformat') %>

# I've found that an equal number of processes & threads tends
# to show the best performance for Graphite (ymmv).
Expand Down