Skip to content

Commit

Permalink
support username as alternative to user
Browse files Browse the repository at this point in the history
  • Loading branch information
ian28223 committed May 12, 2021
1 parent dea6910 commit 37caab5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clickhouse/datadog_checks/clickhouse/clickhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, name, init_config, instances):
self._server = self.instance.get('server', '')
self._port = self.instance.get('port')
self._db = self.instance.get('db', 'default')
self._user = self.instance.get('user', 'default')
self._user = self.instance.get('user', self.instance.get('username', 'default'))
self._password = self.instance.get('password', '')
self._connect_timeout = float(self.instance.get('connect_timeout', 10))
self._read_timeout = float(self.instance.get('read_timeout', 10))
Expand Down
2 changes: 1 addition & 1 deletion oracle/datadog_checks/oracle/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Oracle(AgentCheck):
def __init__(self, name, init_config, instances):
super(Oracle, self).__init__(name, init_config, instances)
self._server = self.instance.get('server')
self._user = self.instance.get('user')
self._user = self.instance.get('user') or self.instance.get('username')
self._password = self.instance.get('password')
self._service = self.instance.get('service_name')
self._jdbc_driver = self.instance.get('jdbc_driver_path')
Expand Down
2 changes: 1 addition & 1 deletion snowflake/datadog_checks/snowflake/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, instance=None):
instance = {}

account = instance.get('account')
user = instance.get('user')
user = instance.get('user') or instance.get('username')
password = instance.get('password')
role = instance.get('role')
database = instance.get('database', 'SNOWFLAKE')
Expand Down
2 changes: 1 addition & 1 deletion supervisord/datadog_checks/supervisord/supervisord.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def check(self, instance):
@staticmethod
def _connect(instance):
sock = instance.get('socket')
user = instance.get('user')
user = instance.get('user') or instance.get('username')
password = instance.get('pass') or instance.get('password')
if sock is not None:
host = instance.get('host', DEFAULT_SOCKET_IP)
Expand Down

0 comments on commit 37caab5

Please sign in to comment.