-
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add param binary_location for specify zabbix agent binary (only for systemd) * Remove some parameters in zabbix agent configuration if it's zabbix agent2 package * LogRemoteCommands * StartAgents * MaxLinesPerSecond * AllowRoot * User * LoadModulePath * Fix EnableRemoteCommands still use on zabbix agentd > 5 but remove on agent2 Conflicts: manifests/agent.pp spec/classes/agent_spec.rb templates/zabbix_agentd.conf.erb
- Loading branch information
Showing
12 changed files
with
246 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,7 @@ | |
# @param userparameter User-defined parameter to monitor. | ||
# @param loadmodulepath Full path to location of agent modules. | ||
# @param loadmodule Module to load at agent startup. | ||
# @param binary_location Location of th binary file, this feature is available only for systemd startup script | ||
# @param manage_startup_script | ||
# If the init script should be managed by this module. Attention: This might | ||
# cause problems with some config options of this module (e.g | ||
|
@@ -134,6 +135,18 @@ | |
# monitored_by_proxy => 'my_proxy_host', | ||
# server => '192.168.1.1', | ||
# } | ||
# | ||
# @example Using Zabbix Agent 2 | ||
# class { 'zabbix::agent': | ||
# package_name => 'zabbix-agent2', | ||
# agent_configfile_path => '/etc/zabbix/zabbix_agent2.conf', | ||
# agent_include => '/etc/zabbix/zabbix_agent2.d', | ||
# pidfile => '/var/run/zabbix/zabbix_agentd2.pid', | ||
# servicename => 'zabbix-agent2', | ||
# zabbix_package_agent => 'zabbix-agent2', | ||
# binary_location => '/usr/sbin/zabbix_agent2' | ||
# } | ||
# | ||
# @author Werner Dijkerman [email protected] | ||
class zabbix::agent ( | ||
$zabbix_version = $zabbix::params::zabbix_version, | ||
|
@@ -218,7 +231,10 @@ | |
String $additional_service_params = $zabbix::params::additional_service_params, | ||
String $service_type = $zabbix::params::service_type, | ||
Boolean $manage_startup_script = $zabbix::params::manage_startup_script, | ||
Optional[Stdlib::Absolutepath] $binary_location = $zabbix::params::agent_binary_location, | ||
) inherits zabbix::params { | ||
$agent2 = $zabbix_package_agent == 'zabbix-agent2' | ||
|
||
# Find if listenip is set. If not, we can set to specific ip or | ||
# to network name. If more than 1 interfaces are available, we | ||
# can find the ipaddress of this specific interface if listenip | ||
|
@@ -305,6 +321,7 @@ | |
additional_service_params => $additional_service_params, | ||
service_type => $service_type, | ||
service_name => 'zabbix-agent', | ||
binary_location => $binary_location, | ||
require => Package[$zabbix_package_agent], | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,18 +200,21 @@ | |
# @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 saml_settings A hash of additional SAML SSO settings. | ||
# | ||
# @example Single host setup: | ||
# class { 'zabbix': | ||
# zabbix_url => 'zabbix.dj-wasabi.nl', | ||
# } | ||
# | ||
# | ||
# @example This assumes that you want to use the postgresql database. If not and you want to supply your own database crendentials: | ||
# class { 'zabbix': | ||
# zabbix_url => 'zabbix.dj-wasabi.nl', | ||
# database_type => 'mysql', | ||
# database_user => 'zabbix', | ||
# database_password => 'ThisIsVeryDifficult.nl', | ||
# } | ||
# | ||
# @author Werner Dijkerman [email protected] | ||
class zabbix ( | ||
$zabbix_url = '', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.