This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: datadog-agent | |
channels: | |
- !!python/unicode | |
'defaults' | |
dependencies: | |
- !!python/unicode | |
'enum34=1.1.6=py27_0' | |
- !!python/unicode | |
'openssl=1.0.2j=vc9_0' | |
- !!python/unicode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (C) Datadog, Inc. 2010-2016 | |
# All rights reserved | |
# Licensed under Simplified BSD License (see LICENSE) | |
# stdlib | |
from datetime import datetime | |
import _strptime # noqa | |
import os.path | |
from os import environ | |
import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/datadog-agent/embedded/bin/python | |
import sys | |
import requests | |
if __name__ == "__main__": | |
print("Using python interpreter at {}".format(sys.executable)) | |
print("Using requests version {}".format(requests.__version__)) | |
addr = sys.argv[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (C) Datadog, Inc. 2010-2016 | |
# All rights reserved | |
# Licensed under Simplified BSD License (see LICENSE) | |
# stdlib | |
import time | |
# 3p | |
import dns.resolver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (C) Datadog, Inc. 2010-2016 | |
# All rights reserved | |
# Licensed under Simplified BSD License (see LICENSE) | |
''' | |
As of zookeeper 3.4.0, the `mntr` admin command is provided for easy parsing of zookeeper stats. | |
This check first parses the `stat` admin command for a version number. | |
If the zookeeper version supports `mntr`, it is also parsed. | |
Duplicate information is being reported by both `mntr` and `stat` to keep backwards compatability. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (C) Datadog, Inc. 2010-2016 | |
# All rights reserved | |
# Licensed under Simplified BSD License (see LICENSE) | |
# stdlib | |
from datetime import datetime, timedelta | |
from hashlib import md5 | |
from Queue import Empty, Queue | |
import re | |
import ssl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (C) Datadog, Inc. 2010-2016 | |
# All rights reserved | |
# Licensed under Simplified BSD License (see LICENSE) | |
''' | |
Redis checks | |
''' | |
# stdlib | |
from collections import defaultdict | |
import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Collect status information for Windows services | |
""" | |
# project | |
from checks import AgentCheck | |
from checks.wmi_check import WinWMICheck | |
from utils.containers import hash_mutable | |
from utils.timeout import TimeoutException | |
class WindowsService(WinWMICheck): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import json | |
import subprocess | |
import argparse | |
import sys | |
def search_files(repo, data): | |
positives = 0 | |
for entry in data: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pattern_filter(items, whitelist=None, blacklist=None, key=None): | |
"""This filters `items` by a regular expression `whitelist` and/or | |
`blacklist`, with the `whitelist` taking precedence. An optional `key` | |
function can be provided that will be passed each item. | |
When you have only one type of list, consider using `pattern_whitelist` | |
or `pattern_blacklist` for increased performance. | |
""" | |
if (whitelist and blacklist): | |
_pattern_filter_chain(items, whitelist, blacklist, key) | |
elif whitelist: |