Skip to content

Commit

Permalink
Merge pull request #7 from SimonSimonB/type-conversion
Browse files Browse the repository at this point in the history
Fix missing type conversion for HTTP port and scrape interval
  • Loading branch information
thedatabaseme authored Aug 10, 2023
2 parents 8292bc8 + 37e6183 commit 36efa07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ def get_archive_status(self):
logging.info("Reading environment configuration")

# Read the configuration
http_port = os.getenv('HTTP_PORT', 9351)
http_port = int(os.getenv('HTTP_PORT', 9351))
pg_host = os.getenv('PGHOST', 'localhost')
pg_port = os.getenv('PGPORT', '5432')
pg_user = os.getenv('PGUSER', 'postgres')
pg_database = os.getenv('PGDATABASE', 'postgres')
pg_password = os.getenv('PGPASSWORD')
pg_ssl_mode = os.getenv('PGSSLMODE', 'require')
wal_g_scrape_interval = os.getenv('WAL_G_SCRAPE_INTERVAL', 60)
wal_g_scrape_interval = int(os.getenv('WAL_G_SCRAPE_INTERVAL', 60))
first_start = True

# Start up the server to expose the metrics.
Expand Down

0 comments on commit 36efa07

Please sign in to comment.