zenoss / ZenPacks.zenoss.PostgreSQL

PostgreSQL Monitoring
GNU General Public License v2.0
8 stars 7 forks source link

fix to support postgres versionnumber with text #26

Closed ThomasRasmussen closed 5 years ago

ThomasRasmussen commented 6 years ago

We discovered that when trying to monitor a PostgreSQL 10 database installed on an Ubuntu server, the postgresql version was: 10.2 (Ubuntu 10.2-1.pgdg16.04+1) This makes the poll_postgres.py to fail with: {"events": [{"eventClassKey": "postgresFailure", "summary": "postgres failure: invalid literal for int() with base 10: '2 (Ubuntu 10'", "severity": 4, "eventKey": "postgresFailure"}]} This pull-request will modify the core.py from pg8000 to only work on the version number of postgres by regex'ing everything else but number away. I have tested the fix on PostgreSQL versions: 9.5.2 9.6 10.2

All on Zenoss 4.2.5.

csmouse commented 5 years ago

PR has aged out. Closing.