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

Ensure consistent use of logtype and logfile across agent/server/proxy #765

Merged
merged 8 commits into from
May 6, 2021

Conversation

shaunbugler
Copy link
Contributor

Pull Request (PR) description

LogType and LogFile were used inconsistently across agent/server/proxy, this PR ensures params, templates and tests are all consistent across the 3 services

This Pull Request (PR) fixes the following issues

####zabbix::agent

  • logtype param was not defined in zabbix::params, also had different type enforcement that other classes
    ####zabbix::server
  • logfile param had different type enforcement that other classes
    ####zabbix::proxy
  • logtype had different type enforcement that other classes
    ####zabbix::init
  • ensure we can pass in LogType to zabbix::server

Added tests to ensure we only include LogFile/LogFileSize in configuration if LogType is set to 'file'.
Also ensure we document the LogType param correctly for all the above.

Rename camp2camp as camptocamp

@bastelfreak
Copy link
Member

@shaunbugler thanks for the PR. can you please rebase against our latest master?

manifests/init.pp Outdated Show resolved Hide resolved
@bastelfreak bastelfreak added the bug Something isn't working label May 6, 2021
@shaunbugler shaunbugler marked this pull request as draft May 6, 2021 10:02
@shaunbugler shaunbugler marked this pull request as ready for review May 6, 2021 10:10
@bastelfreak
Copy link
Member

@shaunbugler please take a look at the failing tests

@shaunbugler
Copy link
Contributor Author

Sorry my change to add types to init I didn't run tests before commiting, have fixed now, tests should pass

@bastelfreak bastelfreak merged commit c7ce6b7 into voxpupuli:master May 6, 2021
@Rewerson
Copy link

Rewerson commented May 12, 2021

Got a problem with this part:

 if $facts['systemd'] {
    $proxy_logtype                          = 'system'
    $proxy_logfile                          = undef
    $proxy_logfilesize                      = undef

Ok, puppet found systemd, but in my manifest I want to use log file. So I defined logtype as file, and needed logfile path (custom, not one that was defined earlier in module). But earlier also I got logfilesize, now it's broken, because there is empty value in config.
And how should I find out what parameters are now optional, and what are required?
I suggest to init $proxy_logfile and $proxy_logfilesize how they were inited before latest update.
Or if not, put this in documentation, if I want to use syslog, I don't need to touch anything. And if I want to redefine it to file, what required parameters are.

@root-expert
Copy link
Member

logfile doesn't have a default value according to zabbix's documentation.
So this is something you should define yourself if you set logtype to file.

As for the broken logfilesize feel free to provide a PR 😃

@aredoff
Copy link

aredoff commented May 12, 2021

But as a result, it turns out that by setting the parameter in proxy_logtype to the file, we get a non-working agent.
Which is not obvious.

@root-expert
Copy link
Member

#772 feel free to comment @aredoff @Rewerson

oraziobattaglia added a commit to oraziobattaglia/puppet-zabbix that referenced this pull request Aug 28, 2021
Added details to host network interface for SNMP

Added details to host network interface for SNMP

Added details to host network interface for SNMP

Added details to host network interface for SNMP

Added details to host network interface for SNMP

Added details to host network interface for SNMP

Added spec acceptance test for interfacetype and interfacedetails

Added context test3.example.com to acceptance test

Fix include in test3 context

Fix hash syntax in test3 context

Change template for snmp in acceptance test

Fix case for var template_snmp

Removed conflicts on templates used for snmp host test acceptance

Trying to fix interface details data types

Sub double quote with single quote in include

Trying to understand if interface details is nil

Fix trailing whitespace :-O!

Zabbix version 4.0 doesn't have the interface details hash, excluded from test

Wip (#1)

* Added details to result_hosts

* Add TODO file

* Run test specific to zabbix >= 4.0

* Add param documentation

* Fix spaces

* Remove TODO file

metadata: increase max versions of dependency modules

Enable Puppet 7 support

To make this work, we also enforce UTF8 for the acceptance tests. The
also voxpupuli/modulesync_config#708

Adjust for new option in configurations.

templateDashboards is replacing templateScreens option in 5.2+

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add Ubuntu 18.04 and 20.04 support

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Enable Debian 10 acceptance tests

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Remove packages installation before running acceptance tests

* This is already being handled by prepare_host function.

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Allow non-default port database importing

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Fix README regarding zbx_group(s) deprecation and fix small bug so deprecation actually work

modulesync 4.1.0

rubocop: autofix

rubocop: cleanup unused variables

beaker tests: set locale

Support sslcertlocation & sslkeylocation for zabbix proxy

Support sslcalocation for zabbix proxy

Ensure consistent use of logtype and logfile across agent/server/proxy (voxpupuli#765)

* Fix reference to camptocamp/systemd

* logfile param is now consistent across agent/server/proxy

* Add logtype param to proxy

* Add logtype to class parameters documentation

* Ensure logtype is passed to server from init and it is typed consistently

* logfile param is now consistent across agent/server/proxy

* Support sslcertlocation & sslkeylocation for zabbix proxy

* Ensure datatype for logtype and logfile in zabbix::init

Co-authored-by: Shaun Bugler - Xneelo <sb@xneelo.com>

Add ability to set $DB[DOUBLE_IEEE754] to true in zabbix.conf.php. (voxpupuli#735)

* Add ability to set $DB[DOUBLE_IEEE754] to true in zabbix.conf.php.

Zabbix 5.0 and greater enable extended range of float values.
>This is by default for new installations.
>However, when upgrading existing installations, a manual database
>upgrade patch must be applied

The $DB[DOUBLE_IEEE754] value must be set to true in zabbix.conf.php.
Otherwise, the message "Database history tables upgraded: No" will
continue to be displayed in the web frontend.
https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values

* Update spec/classes/web_spec.rb

* Update manifests/web.pp

Co-authored-by: Joshua Snapp <jksnapp@ncsu.edu>
Co-authored-by: Tim Meusel <tim@bastelfreak.de>

Allow to pass LDAP settings to zabbix class

* Also strong type ldap parameters

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Implement additional SAML settings

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

release 9.0.0

[blacksmith] Bump version to 9.0.1-rc0

Deprecate EnableRemoteCommands

* https://www.zabbix.com/documentation/5.0/manual/appendix/config/zabbix_agentd

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add {Allow,Deny}Key options

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add {TLSCipher}* options for agent

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add DBTLS options

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add {TLSCipher}* options for proxy/server

Add StartAlerters option

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add StartEscalators option

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add StartLLDProcessors option

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add StartPreprocessors option

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Optimize acceptance tests

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

switch from camptocamp/systemd to voxpupuli/systemd

Ensure correct logfile/logfilesize values when defaulting logtype to system

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add Vault parameters to server

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add Vault parameters to proxy

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

[temp] Pass ignore_version parameter to zabbixapi

* Don't fail if version is not supported by the gem, until the gem has been updated for zabbix 5.4

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Drop zabbix_application support for zabbix 5.4

* Zabbix applications were replaced with Item tags in version 5.4
* applications and screens parameters were removed from configurations.import
* selectApplications parameter was removed from templates.get in version 5.4

Source: https://www.zabbix.com/documentation/5.4/manual/api/changes_5.2_-_5.4

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add supported_versions helper

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Add zabbix-sql-scripts installation/zabbix server 5.4 is not supported on RHEL7

* zabbix 5.4 changed the location of the sql scripts, now there's a standalone package called zabbix-sql-scripts which installs the scripts in `/usr/share/doc/zabbix-sql-scripts/*

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

RHEL7 needs scl packages and on 5.4 version

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Release 9.1.0

[blacksmith] Bump version to 9.1.1-rc0

Update README.md with new badges/transfer notice

modulesync 4.1.0

Use puppet-strings annotations/Generate REFERENCE.md

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Drop Reference from README

Signed-off-by: Christos Papageorgiou <root.expert.xda@gmail.com>

Modulesync 4.2.0

Fix suggested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants