diff --git a/lib/puppet/provider/zabbix_application/ruby.rb b/lib/puppet/provider/zabbix_application/ruby.rb index 1c8dd8d8c..4e970c1b5 100644 --- a/lib/puppet/provider/zabbix_application/ruby.rb +++ b/lib/puppet/provider/zabbix_application/ruby.rb @@ -2,6 +2,7 @@ require_relative '../zabbix' Puppet::Type.type(:zabbix_application).provide(:ruby, parent: Puppet::Provider::Zabbix) do + desc 'Puppet provider for Zabbix application using the Zabbix API.' confine feature: :zabbixapi def template_id diff --git a/lib/puppet/provider/zabbix_host/ruby.rb b/lib/puppet/provider/zabbix_host/ruby.rb index 8132b782c..e2426feeb 100644 --- a/lib/puppet/provider/zabbix_host/ruby.rb +++ b/lib/puppet/provider/zabbix_host/ruby.rb @@ -2,6 +2,7 @@ require_relative '../zabbix' Puppet::Type.type(:zabbix_host).provide(:ruby, parent: Puppet::Provider::Zabbix) do + desc 'Puppet provider for managing Zabbix hosts. It uses the Zabbix API to create, read, update and delete hosts.' confine feature: :zabbixapi def self.instances diff --git a/lib/puppet/provider/zabbix_hostgroup/ruby.rb b/lib/puppet/provider/zabbix_hostgroup/ruby.rb index 3e3d9924f..20ca2080a 100644 --- a/lib/puppet/provider/zabbix_hostgroup/ruby.rb +++ b/lib/puppet/provider/zabbix_hostgroup/ruby.rb @@ -2,6 +2,7 @@ require_relative '../zabbix' Puppet::Type.type(:zabbix_hostgroup).provide(:ruby, parent: Puppet::Provider::Zabbix) do + desc 'Puppet provider for managing Zabbix hostgroups. It defines methods to create, check if exists, and destroy Zabbix hostgroups using the Zabbix API.' confine feature: :zabbixapi def self.instances diff --git a/lib/puppet/provider/zabbix_proxy/ruby.rb b/lib/puppet/provider/zabbix_proxy/ruby.rb index 9df114a93..4e15138e1 100644 --- a/lib/puppet/provider/zabbix_proxy/ruby.rb +++ b/lib/puppet/provider/zabbix_proxy/ruby.rb @@ -2,6 +2,7 @@ require_relative '../zabbix' Puppet::Type.type(:zabbix_proxy).provide(:ruby, parent: Puppet::Provider::Zabbix) do + desc 'Puppet provider for managing Zabbix proxies. It uses the Zabbix API to create, read, update and delete hosts, as well as changing them between active and passive modes.' confine feature: :zabbixapi def initialize(value = {}) diff --git a/lib/puppet/provider/zabbix_template/ruby.rb b/lib/puppet/provider/zabbix_template/ruby.rb index 510bb6752..2f36b7934 100644 --- a/lib/puppet/provider/zabbix_template/ruby.rb +++ b/lib/puppet/provider/zabbix_template/ruby.rb @@ -2,6 +2,7 @@ require_relative '../zabbix' Puppet::Type.type(:zabbix_template).provide(:ruby, parent: Puppet::Provider::Zabbix) do + desc 'Puppet provider that manages Zabbix templates by importing and exporting them in XML format, and creating, updating, or deleting various Zabbix configuration objects. It includes conditional logic based on the Zabbix version being used.' confine feature: :zabbixapi def create diff --git a/lib/puppet/provider/zabbix_template_host/ruby.rb b/lib/puppet/provider/zabbix_template_host/ruby.rb index 32a32d4b8..b5269649e 100644 --- a/lib/puppet/provider/zabbix_template_host/ruby.rb +++ b/lib/puppet/provider/zabbix_template_host/ruby.rb @@ -2,6 +2,7 @@ require_relative '../zabbix' Puppet::Type.type(:zabbix_template_host).provide(:ruby, parent: Puppet::Provider::Zabbix) do + desc 'Puppet provider that manages the association between Zabbix templates and hosts. It allows creating, checking the existence of, and deleting the association between a Zabbix template and a host, using the Zabbix API.' confine feature: :zabbixapi def template_name @template_name ||= @resource[:name].split('@')[0] diff --git a/lib/puppet/provider/zabbix_userparameters/ruby.rb b/lib/puppet/provider/zabbix_userparameters/ruby.rb index b293678ad..a85f966fc 100644 --- a/lib/puppet/provider/zabbix_userparameters/ruby.rb +++ b/lib/puppet/provider/zabbix_userparameters/ruby.rb @@ -2,6 +2,7 @@ require_relative '../zabbix' Puppet::Type.type(:zabbix_userparameters).provide(:ruby, parent: Puppet::Provider::Zabbix) do + desc 'Puppet provider that manages Zabbix user parameters. It allows users to define custom monitoring parameters in Zabbix, and provides methods for creating and checking the existence of a user parameter. It also has a placeholder method for destroying the user parameter.' confine feature: :zabbixapi def create diff --git a/lib/puppet/type/zabbix_application.rb b/lib/puppet/type/zabbix_application.rb index 065ef84ac..cda0d4634 100644 --- a/lib/puppet/type/zabbix_application.rb +++ b/lib/puppet/type/zabbix_application.rb @@ -3,16 +3,18 @@ Puppet::Type.newtype(:zabbix_application) do @doc = %q(Manage zabbix applications + Example: + zabbix_application{"app1": ensure => present, template => 'template1', } It Raise exception on deleting an application which is a part of used template. - ) ensurable do + desc "Specifies whether the zabbix application should be 'present' or 'absent'." defaultvalues defaultto :present end diff --git a/lib/puppet/type/zabbix_host.rb b/lib/puppet/type/zabbix_host.rb index a5b929979..bc8ba8f4a 100644 --- a/lib/puppet/type/zabbix_host.rb +++ b/lib/puppet/type/zabbix_host.rb @@ -2,6 +2,7 @@ Puppet::Type.newtype(:zabbix_host) do ensurable do + desc "Specify whether the zabbix_host resource should be 'present' or 'absent' on the system." defaultvalues defaultto :present end diff --git a/lib/puppet/type/zabbix_hostgroup.rb b/lib/puppet/type/zabbix_hostgroup.rb index 29c141ee2..485fd1768 100644 --- a/lib/puppet/type/zabbix_hostgroup.rb +++ b/lib/puppet/type/zabbix_hostgroup.rb @@ -4,6 +4,7 @@ @doc = 'Manage zabbix hostgroups' ensurable do + desc "The desired state of the Zabbix hostgroup. Valid values are 'present' to ensure the group exists or 'absent' to ensure it is removed." defaultvalues defaultto :present end diff --git a/lib/puppet/type/zabbix_proxy.rb b/lib/puppet/type/zabbix_proxy.rb index bad3b7b1b..bf5ebdc43 100644 --- a/lib/puppet/type/zabbix_proxy.rb +++ b/lib/puppet/type/zabbix_proxy.rb @@ -2,6 +2,7 @@ Puppet::Type.newtype(:zabbix_proxy) do ensurable do + desc "Specifies whether the zabbix proxy should be 'present' or 'absent'." defaultvalues defaultto :present end diff --git a/lib/puppet/type/zabbix_template.rb b/lib/puppet/type/zabbix_template.rb index 00e552a18..b1a149056 100644 --- a/lib/puppet/type/zabbix_template.rb +++ b/lib/puppet/type/zabbix_template.rb @@ -2,6 +2,7 @@ Puppet::Type.newtype(:zabbix_template) do ensurable do + desc "Specifies whether the zabbix_template should exist or not. Valid values are 'present' and 'absent'." defaultvalues defaultto :present diff --git a/lib/puppet/type/zabbix_template_host.rb b/lib/puppet/type/zabbix_template_host.rb index a55cb4343..bae07aabe 100644 --- a/lib/puppet/type/zabbix_template_host.rb +++ b/lib/puppet/type/zabbix_template_host.rb @@ -1,17 +1,20 @@ # frozen_string_literal: true Puppet::Type.newtype(:zabbix_template_host) do - @doc = <<-DOC + @doc = %q{ Link or Unlink template to host. Only for Zabbix < 6.0! - Example. - Name should be in the format of "template_name@hostname" - zabbix_template_host{ 'mysql_template@db1': - ensure => present, - } - DOC + Example: + + zabbix_template_host{ 'mysql_template@db1': + ensure => present, + } + + (Name should be in the format of "template_name@hostname") + } ensurable do + desc 'Specifies whether the Zabbix template should be linked or unlinked to the host.' defaultvalues defaultto :present end diff --git a/lib/puppet/type/zabbix_userparameters.rb b/lib/puppet/type/zabbix_userparameters.rb index 13d81b489..eb70143ee 100644 --- a/lib/puppet/type/zabbix_userparameters.rb +++ b/lib/puppet/type/zabbix_userparameters.rb @@ -3,6 +3,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..')) Puppet::Type.newtype(:zabbix_userparameters) do ensurable do + desc 'Specifies whether the zabbix_userparameters should exist.' defaultvalues defaultto :present end diff --git a/types/historyics.pp b/types/historyics.pp index 053445124..72d51a4e2 100644 --- a/types/historyics.pp +++ b/types/historyics.pp @@ -1 +1,2 @@ +# @summary Type for size values in bytes (also allows k/K and m/M as appendix) type Zabbix::Historyics = Optional[Pattern[/^\d+[k|K|m|M]?$/]]