diff --git a/README.md b/README.md index fb6fc3c..318d1df 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Requirements | Requirement | Version/Comment | |:---------------------------------|:----------------| | Mirantis OpenStack compatibility | 7.0 | -| Zabbix plugin for Fuel | 2.0.0 | +| Zabbix plugin for Fuel | 2.5.0 | Installation Guide ================== diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/params.pp b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/params.pp index 13c7bed..bf8f653 100644 --- a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/params.pp +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/params.pp @@ -29,4 +29,10 @@ class plugin_zabbix_snmptrapd::params { } } + $zabbix_base_conf_dir = '/etc/zabbix' + $zabbix_extra_conf_subdir = 'conf.d' + $zabbix_extra_conf_dir = "${zabbix_base_conf_dir}/${zabbix_extra_conf_subdir}" + $server_snmp_config = "${zabbix_extra_conf_dir}/zabbix_snmp.conf" + $server_snmp_config_template = 'plugin_zabbix_snmptrapd/zabbix_snmp.conf.erb' + } diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/zabbix.pp b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/zabbix.pp index 44a3270..4f1687f 100644 --- a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/zabbix.pp +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/zabbix.pp @@ -15,17 +15,12 @@ # class plugin_zabbix_snmptrapd::zabbix { - file_line { 'enable SNMPTrapper in Zabbix': - path => '/etc/zabbix/zabbix_server.conf', - match => 'StartSNMPTrapper', - line => 'StartSNMPTrapper=1', - notify => Service['p_zabbix-server'], - } - - file_line { 'set SNMPTrapperFile in Zabbix': - path => '/etc/zabbix/zabbix_server.conf', - match => 'SNMPTrapperFile', - line => 'SNMPTrapperFile=/var/log/snmptt/snmptt.log', + file { $plugin_zabbix_snmptrapd::params::server_snmp_config: + ensure => present, + owner => 'root', + group => 'root', + mode => '0644', + content => template($plugin_zabbix_snmptrapd::params::server_snmp_config_template), notify => Service['p_zabbix-server'], } diff --git a/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/templates/zabbix_snmp.conf.erb b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/templates/zabbix_snmp.conf.erb new file mode 100644 index 0000000..93f3ba8 --- /dev/null +++ b/deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/templates/zabbix_snmp.conf.erb @@ -0,0 +1,10 @@ +### Managed by Puppet ### +# This is SNMP config file for ZABBIX server process +# To get more information about ZABBIX, +# go http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +#SNMP Trapper +StartSNMPTrapper=1 +SNMPTrapperFile=/var/log/snmptt/snmptt.log