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

allow setting location of psql #44

Closed
peterjam28 opened this issue Jan 22, 2015 · 4 comments
Closed

allow setting location of psql #44

peterjam28 opened this issue Jan 22, 2015 · 4 comments
Labels
enhancement New feature or request

Comments

@peterjam28
Copy link

The path for psql in zabbix::database::postgresql is: -
/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

I have it installed in /opt/postgres/9.3/bin.
Can we have a parameter to set the path for non-standard.

I can create a symlink, but it seems a shame that it's necessary.

@dj-wasabi dj-wasabi added the enhancement New feature or request label Jan 22, 2015
@dj-wasabi
Copy link
Contributor

Hi Peterjam28

I just pushed an solution for this. The following classes are changed so they have an extra parameter database_path:

  • zabbix::server
  • zabbix::proxy
  • zabbix::database::postgresql
  • zabbix::database::mysql

You can use it like this:

class { 'zabbix':
  zabbix_url    => 'zabbix.example.com',
  database_path => '/opt/postgres/9.3/bin',
}

The value will be appended to the original "PATH" (/bin:/usr/bin:/usr/local/sbin:/usr/local/bin), so you don't have to worry about other path settings like '/bin' or '/sbin' for breaking the configuration.

In your setup, "PATH" will be like this when executing the psql commands:

/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/postgres/9.3/bin

Is this acceptable for you?

Kind regards,
Werner

@peterjam28
Copy link
Author

That is exactly what I was hoping for, thanks. Will this be in 1.0.2?
On 22 Jan 2015 19:12, "Werner Dijkerman" notifications@github.com wrote:

Hi Peterjam28

I just pushed an solution for this. The following classes are changed so
they have an extra parameter database_path:

  • zabbix::server
  • zabbix::proxy
  • zabbix::database::postgresql
  • zabbix::database::mysql

You can use it like this:

class { 'zabbix':
zabbix_url => 'zabbix.example.com',
database_path => '/opt/postgres/9.3/bin',
}

The value will be appended to the original "PATH" (
/bin:/usr/bin:/usr/local/sbin:/usr/local/bin), so you don't have to worry
about other path settings like '/bin' or '/sbin' for breaking the
configuration.

In your setup, "PATH" will be like this when executing the psql commands:

/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/postgres/9.3/bin

Is this acceptable for you?

Kind regards,
Werner


Reply to this email directly or view it on GitHub
#44 (comment)
.

@dj-wasabi
Copy link
Contributor

No, in 1.1.0.
When I got confirmation from an other issue (Hopefully today or tomorrow), I'll create an git tag and create the release for the forge.

@dj-wasabi
Copy link
Contributor

I uploaded release 1.1.0 to the forge.
I'll close this ticket. If you have any questions or problems at all, please reopen this ticket or create a new ticket please.

Kind regards,
Werner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants