Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scylla new integration #5440

Merged
merged 37 commits into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
27b3545
Scylla new integration template
mgarabed Jan 10, 2020
6ec8bc9
Initial implementation
mgarabed Jan 10, 2020
e6be9ad
Reformat metrics, update tests
mgarabed Jan 11, 2020
c7e207a
Use noqa to satisfy both black and flake8
mgarabed Jan 13, 2020
aec512e
Correct metric groupings
mgarabed Jan 13, 2020
50169a2
Refactor metrics based on groupings
mgarabed Jan 16, 2020
f30716e
Fix formatting
mgarabed Jan 16, 2020
f43cf68
Fix style
mgarabed Jan 16, 2020
5dbc77d
Reformat
mgarabed Jan 22, 2020
a5772a1
Update tests
mgarabed Jan 22, 2020
87e2c71
Update metric group name
mgarabed Jan 27, 2020
63508db
Refactor scylla check based on proper instancing
mgarabed Jan 27, 2020
087d42d
WIP metrics.csv
mgarabed Jan 27, 2020
6c4514c
Fix metric renames
mgarabed Jan 27, 2020
aee1345
Remove Scylla Manager from integration check
mgarabed Jan 27, 2020
5e47748
Add integration test; support 3.2
mgarabed Jan 27, 2020
47587be
Add to azure checks
mgarabed Jan 27, 2020
4866fd3
Fix style
mgarabed Jan 27, 2020
1effbca
Parameterize envs; fix tests
mgarabed Jan 28, 2020
6896345
Update metdata
mgarabed Jan 28, 2020
7c20277
Fix CI
mgarabed Jan 28, 2020
dfb71ab
Fix log pattern condition
mgarabed Jan 28, 2020
ffb564f
Update conf.yaml based on comments
mgarabed Jan 28, 2020
a0a43fb
Update based on comments
mgarabed Jan 28, 2020
cc7ba9d
Clean up init logic
mgarabed Jan 28, 2020
caa8635
Update README
mgarabed Jan 28, 2020
970ce82
Reformat service checks file
mgarabed Jan 28, 2020
3ba9116
Use prometheus_url instead
mgarabed Jan 28, 2020
84cf561
Remove version metric as its collected by metadata
mgarabed Jan 28, 2020
1b515b5
count not counter
mgarabed Jan 29, 2020
c547def
Add guard for py2, address comments
mgarabed Jan 29, 2020
79e17e4
Address comments
mgarabed Jan 30, 2020
5225c4a
Style and cleanup
mgarabed Jan 30, 2020
78a1f03
Address documentation comments
mgarabed Feb 3, 2020
c7e9000
Update server tag
mgarabed Feb 3, 2020
bb56b04
Update metric type for histogram counts
mgarabed Feb 3, 2020
6c1ca71
Upgrade to Python 3.8
mgarabed Feb 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .azure-pipelines/templates/test-all-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ jobs:
- checkName: sap_hana
displayName: SAP HANA
os: linux
- checkName: scylla
displayName: Scylla
os: linux
- checkName: snmp
displayName: SNMP
os: linux
Expand Down
2 changes: 2 additions & 0 deletions scylla/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# CHANGELOG - Scylla

10 changes: 10 additions & 0 deletions scylla/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
graft datadog_checks
graft tests

include MANIFEST.in
include README.md
include requirements.in
include requirements-dev.txt
include manifest.json

global-exclude *.py[cod] __pycache__
53 changes: 53 additions & 0 deletions scylla/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Agent Check: Scylla

## Overview

This check monitors [Scylla][1] through the Datadog Agent.
mgarabed marked this conversation as resolved.
Show resolved Hide resolved
mgarabed marked this conversation as resolved.
Show resolved Hide resolved

Scylla is an open-source NoSQL data store that can act as "a drop-in Apache Cassandra alternative." It has rearchitected the Cassandra model tuned for modern hardware, reducing the size of required clusters while improving theoretical throughput and performance.

This integration collects a majority of the exposed metrics by default, with the ability to customize additional groups based on specific user needs.
mgarabed marked this conversation as resolved.
Show resolved Hide resolved

## Setup

Follow the instructions below to install and configure this check for an Agent running on a host.

### Installation

The Scylla check is included in the [Datadog Agent][2] package. No additional installation is needed on your server.

### Configuration

1. Edit the `scylla.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your scylla performance data. See the [sample scylla.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 `scylla` under the Checks section.

## Data Collected

### Metrics

See [metadata.csv][6] for a list of metrics provided by this check.

### Service Checks

`scylla.prometheus.health`: Returns `CRITICAL` if the Agent cannot reach the metrics endpoints, `OK` otherwise.

### Events

Scylla does not include any events.
mgarabed marked this conversation as resolved.
Show resolved Hide resolved

## Troubleshooting

Need help? Contact [Datadog support][7].

[1]: https://scylla.io
[2]: https://docs.datadoghq.com/agent
[3]: https://github.com/DataDog/integrations-core/blob/master/scylla/datadog_checks/scylla/data/conf.yaml.example
[4]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent
[5]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information
[6]: https://github.com/DataDog/integrations-core/blob/master/scylla/metadata.csv
[7]: https://docs.datadoghq.com/help
17 changes: 17 additions & 0 deletions scylla/assets/service_checks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"agent_version": "6.18.0",
"integration": "Scylla",
"groups": [
"host",
"endpoint"
],
"check": "scylla.prometheus.health",
"statuses": [
"ok",
"critical"
],
"name": "Scylla prometheus health",
"description": "Returns `CRITICAL` if the check cannot access the metrics endpoint. Returns `OK` otherwise."
}
]
4 changes: 4 additions & 0 deletions scylla/datadog_checks/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
4 changes: 4 additions & 0 deletions scylla/datadog_checks/scylla/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
__version__ = '0.0.1'
7 changes: 7 additions & 0 deletions scylla/datadog_checks/scylla/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .scylla import ScyllaCheck

__all__ = ['__version__', 'ScyllaCheck']
149 changes: 149 additions & 0 deletions scylla/datadog_checks/scylla/data/conf.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
init_config:

instances:

## @param prometheus_url - string - required
## The URL where your database metrics are exposed by Prometheus.
#
- prometheus_url: http://localhost:9180/metrics

## @param metric_groups - list of strings - optional
## List of additional scylla metric groups to collect in addition to the default
#
# metric_groups:
# - scylla.alien
# - scylla.batchlog
# - scylla.commitlog
# - scylla.compaction
# - scylla.cql
# - scylla.database
# - scylla.execution
# - scylla.hints
# - scylla.httpd
# - scylla.io
# - scylla.lsa
# - scylla.memory
# - scylla.memtables
# - scylla.query
# - scylla.scheduler
# - scylla.sstables
# - scylla.thrift
# - scylla.tracing

## @param tags - list of key:value elements - optional
## List of tags to attach to every metrics, events and service checks emitted by this integration.
## Learn more about tagging: https://docs.datadoghq.com/tagging/
#
# tags:
# - <KEY_1>:<VALUE_1>
# - <KEY_2>:<VALUE_2>

## @param timeout - integer - optional - default: 10
## Overrides the default timeout value in second
#
# timeout: 10

## @param health_service_check - boolean - optional - default: true
## Send a service check reporting about the health of the prometheus endpoint
## It's named scylla.prometheus.health
#
# health_service_check: true

## @param label_to_hostname - string - optional
## Override the hostname with the value of one label.
#
# label_to_hostname: <LABEL>

## @param label_joins - object - optional
## The label join allows to target a metric and retrieve it's label via a 1:1 mapping
#
# label_joins:
# target_metric:
# label_to_match: <MATCHED_LABEL>
# labels_to_get:
# - <EXTRA_LABEL_1>
# - <EXTRA_LABEL_2>

## @param labels_mapper - list of key:value elements - optional
## The label mapper allows you to rename labels.
## Format is <LABEL_TO_RENAME>: <NEW_LABEL_NAME>
#
# labels_mapper:
# flavor: origin

## @param type_overrides - list of key:value elements - optional
## Type override allows you to override a type in the prometheus payload
## or type an untyped metrics (they're ignored by default)
## Supported <METRIC_TYPE> are `gauge`, `counter`, `histogram`, `summary`
#
# type_overrides:
# <METRIC_NAME>: <METRIC_TYPE>

## @param send_histograms_buckets - boolean - optional - default: true
## Set send_histograms_buckets to true to send the histograms bucket.
#
# send_histograms_buckets: true

## @param send_distribution_buckets - boolean - optional - default: false
## Set `send_distribution_buckets` to `true` to send histograms as Datadog distribution metrics.
##
## Learn more about distribution metrics: https://docs.datadoghq.com/developers/metrics/distributions/
#
# send_distribution_buckets: false

## @param send_monotonic_counter - boolean - optional - default: true
## Set send_monotonic_counter to true to send counters as monotonic counter.
#
# send_monotonic_counter: true

## @param send_distribution_counts_as_monotonic - boolean - optional - default: false
## Set send_distribution_counts_as_monotonic to true to send histograms & summary
## counters as monotonic counters (instead of gauges).
#
# send_distribution_counts_as_monotonic: false
mgarabed marked this conversation as resolved.
Show resolved Hide resolved

## @param exclude_labels - list of strings - optional
## List of label to be excluded
mgarabed marked this conversation as resolved.
Show resolved Hide resolved
#
# exclude_labels:
# - timestamp

## @param tls_verify - boolean - optional - default: true
## Instructs the check to validate the TLS certificate of services.
#
# tls_verify: true

## @param tls_ignore_warning - boolean - optional - default: false
## If `tls_verify` is disabled, security warnings are logged by the check.
## Disable those by setting `tls_ignore_warning` to true.
#
# tls_ignore_warning: false

## @param tls_cert - string - optional
## The path to a single file in PEM format containing a certificate as well as any
## number of CA certificates needed to establish the certificate's authenticity for
## use when connecting to services. It may also contain an unencrypted private key to use.
#
# tls_cert: <CERT_PATH>

## @param tls_private_key - string - optional
## The unencrypted private key to use for `tls_cert` when connecting to services. This is
## required if `tls_cert` is set and it does not already contain a private key.
#
# tls_private_key: <PRIVATE_KEY_PATH>

## @param tls_ca_cert - string - optional
## The path to a file of concatenated CA certificates in PEM format or a directory
## containing several CA certificates in PEM format. If a directory, the directory
## must have been processed using the c_rehash utility supplied with OpenSSL. See:
## https://www.openssl.org/docs/manmaster/man3/SSL_CTX_load_verify_locations.html
#
# tls_ca_cert: <CA_CERT_PATH>

## @param extra_headers - list of key:value elements - optional
## A list of additional HTTP headers to send in queries to the openmetrics endpoint.
## Can be combined with autodiscovery template variables. Eg: "Authorization: Bearer %%env_TOKEN%%".
## Note: if the "Authorization" header is present it will be replaced when "bearer_token_auth" is enabled.
#
# extra_headers:
# <HEADER_NAME>: <HEADER_VALUE>
Loading