Skip to content

Commit

Permalink
Default logtype to file
Browse files Browse the repository at this point in the history
Signed-off-by: Christos Papageorgiou <[email protected]>
  • Loading branch information
root-expert committed May 12, 2021
1 parent 50cae12 commit 3e5b5ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 29 deletions.
34 changes: 7 additions & 27 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,9 @@
$server_listenport = '10051'
$server_loadmodule = undef
$server_loadmodulepath = '/usr/lib/modules'
# provided by camptocamp/systemd
if $facts['systemd'] {
$server_logtype = 'system'
$server_logfile = undef
$server_logfilesize = undef
} else {
$server_logtype = 'file'
$server_logfile = '/var/log/zabbix/zabbix_server.log'
$server_logfilesize = '10'
}
$server_logtype = 'file'
$server_logfile = '/var/log/zabbix/zabbix_server.log'
$server_logfilesize = '10'
$server_logslowqueries = '0'
$server_maxhousekeeperdelete = '500'
$server_pidfile = '/var/run/zabbix/zabbix_server.pid'
Expand Down Expand Up @@ -355,13 +348,7 @@
$agent_zbx_templates = ['Template OS Linux', 'Template App SSH Service']
$apache_status = false
$monitored_by_proxy = undef
# provided by camptocamp/systemd
if $facts['systemd'] {
$agent_logtype = 'system'
$agent_logfile = undef
$agent_logfilesize = undef
}
elsif $facts['kernel'] == 'windows' {
if $facts['kernel'] == 'windows' {
$agent_logtype = 'file'
$agent_logfile = 'C:/ProgramData/zabbix/zabbix_agentd.log'
$agent_logfilesize = '100'
Expand Down Expand Up @@ -402,16 +389,9 @@
$proxy_loadmodule = undef
$proxy_loadmodulepath = '/usr/lib/modules'
$proxy_localbuffer = '0'
# provided by camptocamp/systemd
if $facts['systemd'] {
$proxy_logtype = 'system'
$proxy_logfile = undef
$proxy_logfilesize = undef
} else {
$proxy_logtype = 'file'
$proxy_logfile = '/var/log/zabbix/zabbix_proxy.log'
$proxy_logfilesize = '10'
}
$proxy_logtype = 'file'
$proxy_logfile = '/var/log/zabbix/zabbix_proxy.log'
$proxy_logfilesize = '10'
$proxy_logremotecommands = 0
$proxy_logslowqueries = '0'
$proxy_mode = '0'
Expand Down
4 changes: 2 additions & 2 deletions templates/zabbix_agentd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ LogType=<%= @logtype %><% end %>
### Option: LogFile
# Log file name for LogType 'file' parameter.
#
LogFile=<%= @logfile %>
LogFile=<%= @logfile %><% end -%>

### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
#
LogFileSize=<%= @logfilesize %><% end -%>
LogFileSize=<%= @logfilesize %>

### Option: DebugLevel
# Specifies debug level
Expand Down

0 comments on commit 3e5b5ce

Please sign in to comment.