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

only add --foreground on 3.0 and newer #396

Merged
merged 1 commit into from
Jun 3, 2017
Merged
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
10 changes: 6 additions & 4 deletions manifests/agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
String $agent_config_owner = $zabbix::params::agent_config_owner,
String $agent_config_group = $zabbix::params::agent_config_group,
Boolean $manage_selinux = $zabbix::params::manage_selinux,
String $additional_service_params = $zabbix::params::additional_service_params,
) inherits zabbix::params {
# Check some if they are boolean

Expand Down Expand Up @@ -317,10 +318,11 @@

# Ensure that the correct config file is used.
zabbix::startup {'zabbix-agent':
pidfile => $pidfile,
agent_configfile_path => $agent_configfile_path,
zabbix_user => $zabbix_user,
require => Package[$zabbix_package_agent],
pidfile => $pidfile,
agent_configfile_path => $agent_configfile_path,
zabbix_user => $zabbix_user,
additional_service_params => $additional_service_params,
require => Package[$zabbix_package_agent],
}

if $agent_configfile_path != '/etc/zabbix/zabbix_agentd.conf' {
Expand Down
153 changes: 78 additions & 75 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@
$loadmodulepath = $zabbix::params::server_loadmodulepath,
$loadmodule = $zabbix::params::server_loadmodule,
Boolean $manage_selinux = $zabbix::params::manage_selinux,
String $additional_service_params = $zabbix::params::additional_service_params,
) inherits zabbix::params {

class { '::zabbix::web':
zabbix_url => $zabbix_url,
database_type => $database_type,
Expand Down Expand Up @@ -213,81 +215,82 @@
}

class { '::zabbix::server':
database_type => $database_type,
database_path => $database_path,
zabbix_version => $zabbix_version,
manage_firewall => $manage_firewall,
manage_repo => $manage_repo,
manage_database => $manage_database,
manage_service => $manage_service,
nodeid => $nodeid,
listenport => $listenport,
sourceip => $sourceip,
logfile => $logfile,
logfilesize => $logfilesize,
debuglevel => $debuglevel,
pidfile => $pidfile,
database_host => $database_host,
database_name => $database_name,
database_schema => $database_schema,
database_user => $database_user,
database_password => $database_password,
database_socket => $database_socket,
database_port => $database_port,
startpollers => $startpollers,
startipmipollers => $startipmipollers,
startpollersunreachable => $startpollersunreachable,
starttrappers => $starttrappers,
startpingers => $startpingers,
startdiscoverers => $startdiscoverers,
starthttppollers => $starthttppollers,
starttimers => $starttimers,
javagateway => $javagateway,
javagatewayport => $javagatewayport,
startjavapollers => $startjavapollers,
startvmwarecollectors => $startvmwarecollectors,
vmwarefrequency => $vmwarefrequency,
vmwarecachesize => $vmwarecachesize,
snmptrapperfile => $snmptrapperfile,
startsnmptrapper => $startsnmptrapper,
listenip => $listenip,
housekeepingfrequency => $housekeepingfrequency,
maxhousekeeperdelete => $maxhousekeeperdelete,
senderfrequency => $senderfrequency,
cachesize => $cachesize,
cacheupdatefrequency => $cacheupdatefrequency,
startdbsyncers => $startdbsyncers,
historycachesize => $historycachesize,
trendcachesize => $trendcachesize,
historytextcachesize => $historytextcachesize,
valuecachesize => $valuecachesize,
nodenoevents => $nodenoevents,
nodenohistory => $nodenohistory,
timeout => $timeout,
tlscafile => $tlscafile,
tlscertfile => $tlscertfile,
tlscrlfile => $tlscrlfile,
tlskeyfile => $tlskeyfile,
trappertimeout => $trappertimeout,
unreachableperiod => $unreachableperiod,
unavailabledelay => $unavailabledelay,
unreachabledelay => $unreachabledelay,
alertscriptspath => $alertscriptspath,
externalscripts => $externalscripts,
fpinglocation => $fpinglocation,
fping6location => $fping6location,
sshkeylocation => $sshkeylocation,
logslowqueries => $logslowqueries,
tmpdir => $tmpdir,
startproxypollers => $startproxypollers,
proxyconfigfrequency => $proxyconfigfrequency,
proxydatafrequency => $proxydatafrequency,
allowroot => $allowroot,
include_dir => $include_dir,
loadmodulepath => $loadmodulepath,
loadmodule => $loadmodule,
manage_selinux => $manage_selinux,
require => Class['zabbix::database'],
database_type => $database_type,
database_path => $database_path,
zabbix_version => $zabbix_version,
manage_firewall => $manage_firewall,
manage_repo => $manage_repo,
manage_database => $manage_database,
manage_service => $manage_service,
nodeid => $nodeid,
listenport => $listenport,
sourceip => $sourceip,
logfile => $logfile,
logfilesize => $logfilesize,
debuglevel => $debuglevel,
pidfile => $pidfile,
database_host => $database_host,
database_name => $database_name,
database_schema => $database_schema,
database_user => $database_user,
database_password => $database_password,
database_socket => $database_socket,
database_port => $database_port,
startpollers => $startpollers,
startipmipollers => $startipmipollers,
startpollersunreachable => $startpollersunreachable,
starttrappers => $starttrappers,
startpingers => $startpingers,
startdiscoverers => $startdiscoverers,
starthttppollers => $starthttppollers,
starttimers => $starttimers,
javagateway => $javagateway,
javagatewayport => $javagatewayport,
startjavapollers => $startjavapollers,
startvmwarecollectors => $startvmwarecollectors,
vmwarefrequency => $vmwarefrequency,
vmwarecachesize => $vmwarecachesize,
snmptrapperfile => $snmptrapperfile,
startsnmptrapper => $startsnmptrapper,
listenip => $listenip,
housekeepingfrequency => $housekeepingfrequency,
maxhousekeeperdelete => $maxhousekeeperdelete,
senderfrequency => $senderfrequency,
cachesize => $cachesize,
cacheupdatefrequency => $cacheupdatefrequency,
startdbsyncers => $startdbsyncers,
historycachesize => $historycachesize,
trendcachesize => $trendcachesize,
historytextcachesize => $historytextcachesize,
valuecachesize => $valuecachesize,
nodenoevents => $nodenoevents,
nodenohistory => $nodenohistory,
timeout => $timeout,
tlscafile => $tlscafile,
tlscertfile => $tlscertfile,
tlscrlfile => $tlscrlfile,
tlskeyfile => $tlskeyfile,
trappertimeout => $trappertimeout,
unreachableperiod => $unreachableperiod,
unavailabledelay => $unavailabledelay,
unreachabledelay => $unreachabledelay,
alertscriptspath => $alertscriptspath,
externalscripts => $externalscripts,
fpinglocation => $fpinglocation,
fping6location => $fping6location,
sshkeylocation => $sshkeylocation,
logslowqueries => $logslowqueries,
tmpdir => $tmpdir,
startproxypollers => $startproxypollers,
proxyconfigfrequency => $proxyconfigfrequency,
proxydatafrequency => $proxydatafrequency,
allowroot => $allowroot,
include_dir => $include_dir,
loadmodulepath => $loadmodulepath,
loadmodule => $loadmodule,
manage_selinux => $manage_selinux,
additional_service_params => $additional_service_params,
require => Class['zabbix::database'],
}

class { '::zabbix::database':
Expand Down
8 changes: 8 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,14 @@
$javagateway_timeout = '3'
$manage_selinux = $facts['selinux']

# services should run foreground
# but this only works in 3.0 and newer
$additional_service_params = versioncmp($zabbix_version, '3.0') ? {
1 => '--foreground',
0 => '--foreground',
-1 => '',
}

# Gem provider may vary based on version/type of puppet install.
# This can be a little complicated and may need revisited over time.
if str2bool($::is_pe) {
Expand Down
Loading