-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
246 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# CHANGELOG - Mycheck | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
graft datadog_checks | ||
graft tests | ||
|
||
include MANIFEST.in | ||
include README.md | ||
include requirements.in | ||
include requirements.txt | ||
include requirements-dev.txt | ||
include manifest.json | ||
|
||
global-exclude *.py[cod] __pycache__ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Agent Check: Mycheck | ||
|
||
## Overview | ||
|
||
This check monitors [Mycheck][1]. | ||
|
||
## Setup | ||
|
||
### Installation | ||
|
||
The Mycheck check is included in the [Datadog Agent][2] package, so you do not | ||
need to install anything else on your server. | ||
|
||
### Configuration | ||
|
||
1. Edit the `mycheck.d/conf.yaml` file, in the `conf.d/` folder at the root of your | ||
Agent's configuration directory to start collecting your mycheck performance data. | ||
See the [sample mycheck.d/conf.yaml][3] for all available configuration options. | ||
|
||
2. [Restart the Agent][4] | ||
|
||
### Validation | ||
|
||
[Run the Agent's `status` subcommand][5] and look for `mycheck` under the Checks section. | ||
|
||
## Data Collected | ||
|
||
### Metrics | ||
|
||
Mycheck does not include any metrics. | ||
|
||
### Service Checks | ||
|
||
Mycheck does not include any service checks. | ||
|
||
### Events | ||
|
||
Mycheck does not include any events. | ||
|
||
## Troubleshooting | ||
|
||
Need help? Contact [Datadog Support][6]. | ||
|
||
[1]: **LINK_TO_INTEGERATION_SITE** | ||
[2]: https://app.datadoghq.com/account/settings#agent | ||
[3]: https://github.com/DataDog/integrations-core/blob/master/mycheck/datadog_checks/mycheck/data/conf.yaml.example | ||
[4]: https://docs.datadoghq.com/agent/faq/agent-commands/#start-stop-restart-the-agent | ||
[5]: https://docs.datadoghq.com/agent/faq/agent-commands/#agent-status-and-information | ||
[6]: https://docs.datadoghq.com/help/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# (C) Datadog, Inc. 2018 | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# (C) Datadog, Inc. 2018 | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
__version__ = '0.0.1' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# (C) Datadog, Inc. 2018 | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
from .__about__ import __version__ | ||
from .mycheck import MycheckCheck | ||
|
||
__all__ = [ | ||
'__version__', | ||
'MycheckCheck' | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
init_config: | ||
|
||
instances: | ||
- {} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# (C) Datadog, Inc. 2018 | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
from datadog_checks.checks import AgentCheck | ||
|
||
|
||
class MycheckCheck(AgentCheck): | ||
def check(self, instance): | ||
pass |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"display_name": "Mycheck", | ||
"maintainer": "help@datadoghq.com", | ||
"manifest_version": "1.0.0", | ||
"name": "mycheck", | ||
"metric_prefix": "mycheck.", | ||
"metric_to_check": "", | ||
"creates_events": false, | ||
"short_description": "", | ||
"guid": "9ea78f1c-c0dd-4dc0-8c49-13bd55e59057", | ||
"support": "core", | ||
"supported_os": [ | ||
"linux", | ||
"mac_os", | ||
"windows" | ||
], | ||
"public_title": "Datadog-Mycheck Integration", | ||
"categories": [ | ||
"" | ||
], | ||
"type": "check", | ||
"is_public": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
datadog-checks-dev |
Empty file.
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# (C) Datadog, Inc. 2018 | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
from codecs import open # To use a consistent encoding | ||
from os import path | ||
|
||
from setuptools import setup | ||
|
||
HERE = path.dirname(path.abspath(__file__)) | ||
|
||
# Get version info | ||
ABOUT = {} | ||
with open(path.join(HERE, 'datadog_checks', 'mycheck', '__about__.py')) as f: | ||
exec(f.read(), ABOUT) | ||
|
||
# Get the long description from the README file | ||
with open(path.join(HERE, 'README.md'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
|
||
CHECKS_BASE_REQ = 'datadog-checks-base' | ||
|
||
|
||
setup( | ||
name='datadog-mycheck', | ||
version=ABOUT['__version__'], | ||
description='The Mycheck check', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
keywords='datadog agent mycheck check', | ||
|
||
# The project's main homepage. | ||
url='https://github.com/DataDog/integrations-core', | ||
|
||
# Author details | ||
author='Datadog', | ||
author_email='packages@datadoghq.com', | ||
|
||
# License | ||
license='BSD-3-Clause', | ||
|
||
# See https://pypi.org/classifiers | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: System Administrators', | ||
'Topic :: System :: Monitoring', | ||
'License :: OSI Approved :: BSD License', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
], | ||
|
||
# The package we're going to ship | ||
packages=['datadog_checks', 'datadog_checks.mycheck'], | ||
|
||
# Run-time dependencies | ||
install_requires=[CHECKS_BASE_REQ], | ||
|
||
# Extra files to ship with the wheel package | ||
include_package_data=True, | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# (C) Datadog, Inc. 2018 | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# (C) Datadog, Inc. 2018 | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def instance(): | ||
return {} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# (C) Datadog, Inc. 2018 | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
from datadog_checks.mycheck import MycheckCheck | ||
|
||
|
||
def test_check(aggregator, instance): | ||
check = MycheckCheck('mycheck', {}, {}) | ||
check.check(instance) | ||
|
||
aggregator.assert_all_metrics_covered() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[tox] | ||
minversion = 2.0 | ||
skip_missing_interpreters = true | ||
basepython = py27 | ||
envlist = | ||
{py27,py36}-mycheck | ||
flake8 | ||
|
||
[testenv] | ||
platform = linux|darwin|win32 | ||
deps = | ||
../datadog_checks_base[deps] | ||
-rrequirements-dev.txt | ||
passenv = | ||
DOCKER* | ||
COMPOSE* | ||
commands = | ||
pip install --require-hashes -r requirements.txt | ||
pytest -v | ||
|
||
[testenv:flake8] | ||
skip_install = true | ||
deps = flake8 | ||
commands = flake8 . | ||
|
||
[flake8] | ||
exclude = .eggs,.tox,build | ||
max-line-length = 120 |