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
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.