-
Notifications
You must be signed in to change notification settings - Fork 43
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
Error installing sensu-plugins-postgres #1
Comments
This is an omnibus issue that's discussed here in the context of chef. There's no fix at the moment though |
So pretty much if you use the embedded ruby with Sensu this plugin will not work? |
At the moment yes |
sigh and the issue is closed.. |
I am actually going to leave it open for now as this question is asked quite frequently. |
anybody know if is there any alternative to this gem or script to retrieve postgres metrics? |
I'm having the same issue. Apparently this is caused by this: Using Ubuntu 12.04, which provides only ruby 1.8.7 (the 1.9.3 sub-version unfortunately is not supported by puppet). It's a silly solution, but it appears to at least to be one possibility while I cannot upgrade ruby and get rid of embedded ruby. |
I was able to get the pg gem installed into the sensu embedded ruby install by adapting chrisroberts' ruby recipe from the postgresql cookbook. This workaround links the pg gem against the openssl included in the embedded sensu ruby rather than the system one. This is definitely not ideal but it does allow the use of the postgresql plugins. |
@eheydrick thanks, I will try it. |
Another approach is to build the postgresql client into the sensu embedded directory. This gets postgresql linked against sensu's openssl and avoids issues trying to use the system postgresql and openssl. This chef recipe will accomplish this: https://gist.github.com/eheydrick/f337643bdca1bb70c453 |
Hello there I've been googling arround trying to find a solution but I can't still install plugin. Any hints? As far I can see it's something about sensu openssl and system's one, but I can't find the key Thanks! EDIT: I "solved" using ruby from the system, not the most clean way, but well... Still appreciate if anyone had any hint :) |
@delhora I did the same 'fix', used the system ruby for only this single sensu plugin. |
+1 for hitting this bug :( |
+1 |
2 similar comments
+1 |
+1 |
Since nearly two years there is this bug that makes it impossible to install this sensu-plugin? C'mon, really? |
+1 |
1 similar comment
+1 |
I'm getting following error when I try to run metric-postgres-graphite.rb, but when I run check-postgres-replication.rb shows ok.
|
For people not using Chef, i made the @eheydrick 's second solution to simple commands: |
@teadur could you please check my issue, thanks. |
@asifmuradkhan #28 this should fix it |
Hi |
@eheydrick thanks for a reasonable solution for now. |
@zakir-hyder I dont know why but i still can't install it ? same error. |
@jothoma1 did you try the workarounds described? |
I added explanation why it happens to the README: https://github.com/sensu-plugins/sensu-plugins-postgres/blob/master/README.md#known-issues Working solution is to install sensu-plugins-postgres gem system-wide outside embedded ruby. |
@majormoses Thanks, I have created an issue few minutes ago. |
@mrtrotl i am using embedeed, and with puppet automation, apparently when i installed psql i didn't installed psql-devel... |
@Chrisbuuren It' is interesting. I don't have much experiences with EPEL distros. In debian based distros is problem with incompatibility of sensu openssl and system libpg. Is there any possibility, that sensu is using same openssl as the CentOS/RHEL? |
OpenSSL 1.0.1e-fips this is what i use in Centos7...i don't know what debian machines use..or i don't understand the question |
The question was about openssl library in sensu and in CentOS, if that libraries are same (version, compile options). I have no other explanation of why it works in centos with system libpg and does not work in debian based distros. |
So is the official hack for this to patch embedded sensu or install against a system gem? Surprisingly I'm finding it more hackish to integrate the system-wide installed plugins with our existing Chef deployed sensu framework that leverages the Sensu cookbook in creating config files, etc. Maybe I misinterpreted the README? I've spent a lot of time getting these plugins to just work and I'm not sure which is the least intrusive/less hackish approach. |
@mikerev It is debian package, which integrates libpg into embedded sensu environment. This package make installation of pg gem to embedded ruby possible. |
@mrtrotl Understood, thank you for your contribution. The question I'm raising is that patching embedded is not what is recommended according to the README. It would be good to clear up confusion as to what the best approach is to get around this long-standing issue. I understand the purpose of the .deb (it just wraps what I have already codified in Chef) but it doesn't seem like there's any consensus between the maintainer(s) and people who are watching this thread/issue. Would just like some clarity on this before I commit to using these plugins in production and tying it into my framework. |
@mikerev yup, that was prior to someone dedicating the time to have a better solution. Now we have one and we should update it. I have transferred over the repo and will update the documentation that for debian based systems the new prefered method is to use the deb, for epel based systems until someone dedicates the time to make an rpm the old method works. I will probably get to that this weekend. |
@majormoses sounds good, thanks. |
@majormoses @mrtrotl it looks like this will not work for people using the apt repo on Ubuntu 14.04 due to the minimum version requirement for sensu. |
@majormoses That's true, this package was compiled against sensu 1.0.2. It should be possible to build package against older version, but You need to change dependencies in control file. I will try to find a way how to define the dependencies dynamically. |
@majormoses looks like if you just install the postgresql96-devel rpm package like @Chrisbuuren mentioned, the gem install works fine. Not sure if this is a late reply :) |
Never too late the removed labels was due to a label migration. That might work for epel but debian based installs still need the custom package mentioned from my understanding. |
the solution proposed by @ahes returns a buggy output:
Any idea how to fix this? |
@jeremyj that is not a bug but an env/deploy issue. There are potentially many reasons for that to happen and it is not specific to this gem if you want to hit me up in slack I am more than happy to help you clean that up. The slack link wont work forever (since we are an open source project and do not pay the blood money): https://sensucommunity.slack.com/archives/C68LV5M9U/p1529110949000014 but this was one example of a environment/deployment issue rather than an issue with the gem itself. |
Support for
@majormoses is this is a legacy issue? Any sense in keeping it open? |
@phumpal ya all the way to 2.4 has been deprecated: https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/ I am not sure if this issue exists in ruby 2.4 or later, if it does not then lets close this out. We could probably update this to 2.4: https://github.com/sensu-plugins/sensu-plugins-postgres/blob/2.3.2/sensu-plugins-postgres.gemspec#L31 |
I am gonna close this issue out, we can re-open if this is still an issue on modern rubies and systems. I would appreciate a PR to add something to the wiki if needed rather than leaving this open. |
I'm getting the following error when I try to install sensu-plugins-postgres
The text was updated successfully, but these errors were encountered: