Skip to content

Commit

Permalink
Update fluentd __init__ params
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristineTChen committed Aug 1, 2019
1 parent a5048ed commit ed568dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions fluentd/datadog_checks/fluentd/fluentd.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

# project
from datadog_checks.checks import AgentCheck
from datadog_checks.utils.headers import headers


class Fluentd(AgentCheck):
Expand All @@ -17,8 +16,8 @@ class Fluentd(AgentCheck):
GAUGES = ['retry_count', 'buffer_total_queued_size', 'buffer_queue_length']
_AVAILABLE_TAGS = frozenset(['plugin_id', 'type'])

def __init__(self, name, init_config, agentConfig, instances=None):
AgentCheck.__init__(self, name, init_config, agentConfig, instances)
def __init__(self, name, init_config, instances):
super(Fluentd, self).__init__(name, init_config, instances)
self.default_timeout = init_config.get('default_timeout', self.DEFAULT_TIMEOUT)

"""Tracks basic fluentd metrics via the monitor_agent plugin
Expand Down Expand Up @@ -51,11 +50,6 @@ def check(self, instance):
'fluentd_port:%s' % monitor_agent_port,
] + custom_tags

self.HTTP_CONFIG_REMAPPER = {
'headers': {'name': 'headers', 'default': headers(self.agentConfig)},
'timeout': {'name': 'timeout', 'default': self.default_timeout},
}

r = self.http.get(url)
r.raise_for_status()
status = r.json()
Expand Down
2 changes: 1 addition & 1 deletion fluentd/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ def dd_environment():

@pytest.fixture
def check():
return Fluentd(CHECK_NAME, {}, {})
return Fluentd(CHECK_NAME, {}, [DEFAULT_INSTANCE])

0 comments on commit ed568dd

Please sign in to comment.