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

Add missing proxy_mode variable to zabbix_proxy provider #447

Merged
merged 1 commit into from Sep 26, 2017
Merged

Add missing proxy_mode variable to zabbix_proxy provider #447

merged 1 commit into from Sep 26, 2017

Conversation

ghost
Copy link

@ghost ghost commented Sep 21, 2017

This is a fix for #334

I found a couple issues with the zabbix_proxy ruby code used for managing the proxy resources on the zabbix server. I think this is fixed in a proper way. I am not a Ruby developer, but it has fixed the issues I was experiencing with my manifests.

@@ -10,6 +10,10 @@ def create
# Set some vars
host = @resource[:hostname]
ipaddress = @resource[:ipaddress]

# Normally 0 is active and 1 is passive, in the API, its 5 and 6
proxy_mode = @resource[:mode] + 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the +5? And does this work because the puppet code passes in a string while the type doesn't munge it to an integer.

Copy link
Author

@ghost ghost Sep 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment explains it. I am not sure why, but in the api documentation active proxy is 5 and passive is 6 where in the config it's 0 and 1. So to make it work I simply add 5 to the value.

It works for me, this is in my production Puppet server.

@bastelfreak
Copy link
Member

Hi @Breaker1, thanks for the PR. Can you check your mail address here as well?

@ghost
Copy link
Author

ghost commented Sep 26, 2017

I have added the email address used to my account.

@bastelfreak bastelfreak added the bug Something isn't working label Sep 26, 2017
@bastelfreak bastelfreak changed the title Added missing proxy_mode variable to zabbix_proxy provider Add missing proxy_mode variable to zabbix_proxy provider Sep 26, 2017
@bastelfreak
Copy link
Member

Thanks!

@bastelfreak bastelfreak merged commit 8aae7cc into voxpupuli:master Sep 26, 2017
@ghost ghost deleted the fix_managing_proxy_servers branch September 26, 2017 18:32
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.

None yet

2 participants