Did I find the right examples for you? yes no

All Samples(19)  |  Call(8)  |  Derive(0)  |  Import(11)

src/d/d/dd-agent-HEAD/checks.d/elastic.py   dd-agent(Download)
from checks import AgentCheck
from checks.utils import add_basic_auth
from util import json, headers
 
 
    def _get_data(self, url, auth=None):
        """ Hit a given URL and return the parsed json
            `auth` is a tuple of (username, password) or None
        """
        req = urllib2.Request(url, None, headers(self.agentConfig))
    def _get_primary_addr(self, url, node_name, auth):
        """ Returns a list of primary interface addresses as seen by ES.
            Used in ES < 0.19
        """
        req = urllib2.Request(url, None, headers(self.agentConfig))

src/d/d/dd-agent-HEAD/checks.d/nginx.py   dd-agent(Download)
import re
import urllib2
 
from util import headers, json
from checks import AgentCheck
    def _get_data(self, instance):
        url = instance.get('nginx_status_url')
        req = urllib2.Request(url, None, headers(self.agentConfig))
        if 'user' in instance and 'password' in instance:
            add_basic_auth(req, instance['user'], instance['password'])

src/d/d/dd-agent-HEAD/checks.d/haproxy.py   dd-agent(Download)
 
from checks import AgentCheck
from util import json, headers
 
import time
        self.log.debug("HAProxy Fetching haproxy search data from: %s" % url)
 
        req = urllib2.Request(url, None, headers(self.agentConfig))
        request = urllib2.urlopen(req)
        response = request.read()

src/d/d/dd-agent-HEAD/checks.d/couchbase.py   dd-agent(Download)
import urllib2
import re
from util import json, headers
import sys
from checks import AgentCheck
    def _get_stats(self, url, instance):
        "Hit a given URL and return the parsed json"
        self.log.debug('Fetching Couchbase stats at url: %s' % url)
        req = urllib2.Request(url, None, headers(self.agentConfig))
        if 'user' in instance and 'password' in instance:

src/d/d/dd-agent-HEAD/checks.d/couch.py   dd-agent(Download)
import urllib2
from util import json, headers
from checks.utils import add_basic_auth
 
from checks import AgentCheck
    def _get_stats(self, url, instance):
        "Hit a given URL and return the parsed json"
        self.log.debug('Fetching Couchdb stats at url: %s' % url)
        req = urllib2.Request(url, None, headers(self.agentConfig))
 

src/d/d/dd-agent-HEAD/checks.d/lighttpd.py   dd-agent(Download)
import urllib2
 
from util import headers
from checks import AgentCheck
from checks.utils import add_basic_auth
        tags = instance.get('tags', [])
        self.log.debug("Connecting to %s" % url)
        req = urllib2.Request(url, None, headers(self.agentConfig))
        if 'user' in instance and 'password' in instance:
            add_basic_auth(req, instance['user'], instance['password'])

src/d/d/dd-agent-HEAD/checks.d/apache.py   dd-agent(Download)
import urllib2
 
from util import headers
from checks import AgentCheck
from checks.utils import add_basic_auth
 
        tags = instance.get('tags', [])
        req = urllib2.Request(url, None, headers(self.agentConfig))
        if 'apache_user' in instance and 'apache_password' in instance:
            add_basic_auth(req, instance['apache_user'], instance['apache_password'])

src/d/d/dd-agent-HEAD/checks.d/mesos.py   dd-agent(Download)
import time
 
from checks import AgentCheck
from util import json, headers
from hashlib import md5

src/d/d/dd-agent-HEAD/checks.d/marathon.py   dd-agent(Download)
import time
 
from checks import AgentCheck
from util import json, headers
from hashlib import md5

src/d/d/dd-agent-HEAD/checks.d/docker.py   dd-agent(Download)
import time
from urlparse import urlsplit, urljoin
from util import json, headers
try:
    from collections import defaultdict

  1 | 2  Next