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

Postgres exception #408

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion newrelic_plugin_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ def license_key(self):
:rtype: str

"""
return self.config.application.license_key
licensekey = os.getenv('NEWRELIC_LICENSE_KEY')
if licensekey==None:
licensekey = self.config.application.license_key
return licensekey

def poll_plugin(self, plugin_name, plugin, config):
"""Kick off a background thread to run the processing task.
Expand Down
5 changes: 4 additions & 1 deletion newrelic_plugin_agent/plugins/postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def add_stats(self, cursor):
self.add_index_stats(cursor)
self.add_statio_stats(cursor)
self.add_table_stats(cursor)
self.add_replication_stats(cursor)
try:
self.add_replication_stats(cursor)
except:
LOGGER.exception("error retrieving replication status")
self.add_transaction_stats(cursor)

# add_wal_metrics needs superuser to get directory listings
Expand Down