-
Notifications
You must be signed in to change notification settings - Fork 765
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New integration for gRPC Health Check (#1381)
* support gRPC Check * ddev validate ci --fix * update CODEOWNERS * fix based on ddev validate all * rename func and remove unused arg * fix links in readme * remove unnecessary part in readme * remove python2 support * fix conftest.py * update fixtures to increase expiry * upload grpc-logo.png * fix a link in readme * update codecov order * fix a link in readme * re-run cfssl * rename GrpcCheckCheck to GrpcCheck * reformat * replace - with _ * Revert "replace - with _" This reverts commit 219198e. * Update manifest.json * use self to get grpc_server_address * change log level to debug when healthy * copy .codecov.yaml from master and add grpc to it * remove auto_conf.yaml * update metadata * update README * update README * Update grpc_check/manifest.json * Update grpc_check/manifest.json Co-authored-by: Ofek Lev <[email protected]> Co-authored-by: Sarah Witt <[email protected]>
- Loading branch information
1 parent
185c1b6
commit 865b49b
Showing
47 changed files
with
2,032 additions
and
0 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 |
---|---|---|
|
@@ -56,6 +56,7 @@ | |
/gnatsd/ @stephenprater @jaredhoyt [email protected] | ||
/gnatsd_streaming/ @stephenprater @jaredhoyt [email protected] | ||
/gremlin/ [email protected] | ||
/grpc_check/ @keisku | ||
/harness_cloud_cost_management/ @akashbdj [email protected] | ||
/hasura_cloud/ @ShraddhaAg @shahidhk [email protected] | ||
/hbase_master/ @everpeace | ||
|
@@ -268,6 +269,9 @@ | |
/gremlin/*metadata.csv [email protected] @DataDog/documentation | ||
/gremlin/manifest.json [email protected] @DataDog/documentation | ||
/gremlin/README.md [email protected] @DataDog/documentation | ||
/grpc_check/*metadata.csv @keisku @DataDog/documentation | ||
/grpc_check/manifest.json @keisku @DataDog/documentation | ||
/grpc_check/README.md @keisku @DataDog/documentation | ||
/hasura_cloud/*metadata.csv @ShraddhaAg @shahidhk [email protected] @DataDog/documentation | ||
/hasura_cloud/manifest.json @ShraddhaAg @shahidhk [email protected] @DataDog/documentation | ||
/hasura_cloud/README.md @ShraddhaAg @shahidhk [email protected] @DataDog/documentation | ||
|
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 @@ | ||
# CHANGELOG - gRPC Check | ||
|
||
## 1.0.0 / 2022-08-02 |
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,70 @@ | ||
# Agent Check: grpc_check | ||
|
||
## Overview | ||
|
||
This check monitors endpoints implementing [gRPC Health Checking Protocol][1] through the Datadog Agent. | ||
|
||
## Setup | ||
|
||
Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. | ||
|
||
### Installation | ||
|
||
#### Host | ||
|
||
To install the grpc_check check on your host: | ||
|
||
```bash | ||
sudo -u dd-agent datadog-agent integration install -t datadog-grpc-check==1.0.0 | ||
``` | ||
|
||
#### Dockerfile | ||
|
||
Build the Agent image with this Dockerfile. | ||
|
||
```Dockerfile | ||
FROM datadog/agent:7 | ||
RUN agent integration install -r -t datadog-grpc-check==1.0.0 \ | ||
&& /opt/datadog-agent/embedded/bin/pip3 install grpcio grpcio-health-checking | ||
``` | ||
|
||
### Configuration | ||
|
||
1. Edit the `grpc_check.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your grpc_check performance data. See the [sample grpc_check.d/conf.yaml][4] for all available configuration options. | ||
|
||
2. [Restart the Agent][5]. | ||
|
||
### Validation | ||
|
||
[Run the Agent's status subcommand][6] and look for `grpc_check` under the Checks section. | ||
|
||
## Data Collected | ||
|
||
### Metrics | ||
|
||
See [metadata.csv][7] for a list of metrics provided by this integration. | ||
|
||
### Events | ||
|
||
The grpc_check integration does not include any events. | ||
|
||
### Service Checks | ||
|
||
The grpc_check integration does not include any service checks. | ||
|
||
See [service_checks.json][8] for a list of service checks provided by this integration. | ||
|
||
## Troubleshooting | ||
|
||
Need help? Contact [Datadog support][9]. | ||
|
||
[1]: https://github.com/grpc/grpc/blob/master/doc/health-checking.md | ||
[2]: https://app.datadoghq.com/account/settings#agent | ||
[3]: https://docs.datadoghq.com/agent/kubernetes/integrations/ | ||
[4]: https://github.com/DataDog/integrations-extras/blob/master/grpc_check/datadog_checks/check/data/conf.yaml.example | ||
[5]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent | ||
[6]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information | ||
[7]: https://github.com/DataDog/integrations-extras/blob/master/grpc_check/metadata.csv | ||
[8]: https://github.com/DataDog/integrations-extras/blob/master/grpc_check/assets/service_checks.json | ||
[9]: [email protected] | ||
[10]: https://docs.datadoghq.com/developers/integrations/new_check_howto/#developer-toolkit |
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,56 @@ | ||
name: gRPC Check | ||
files: | ||
- name: grpc_check.yaml | ||
options: | ||
- template: init_config | ||
options: | ||
- template: init_config/default | ||
- template: instances | ||
options: | ||
- name: grpc_server_address | ||
required: true | ||
description: tcp host:port to connect | ||
value: | ||
type: string | ||
example: <HOST>:<PORT> | ||
- name: grpc_server_service | ||
required: false | ||
description: service name to check | ||
value: | ||
type: string | ||
- name: timeout | ||
required: false | ||
description: duration of time in milliseconds to allow for the RPC. | ||
value: | ||
type: integer | ||
example: 1000 | ||
display_default: 1000 | ||
- name: rpc_header | ||
required: false | ||
description: "additional RPC headers in name: value format." | ||
value: | ||
type: array | ||
items: | ||
type: string | ||
example: | ||
- 'rpc-header-1: value1' | ||
- 'rpc-header-2: value2' | ||
- name: ca_cert | ||
required: false | ||
description: CA cert. | ||
value: | ||
type: string | ||
example: /path/to/ca.pem | ||
- name: client_cert | ||
required: false | ||
description: client certificate used for client identification and auth. | ||
value: | ||
type: string | ||
example: /path/to/client.pem | ||
- name: client_key | ||
required: false | ||
description: client certificate key. | ||
value: | ||
type: string | ||
example: /path/to/client-key.pem | ||
- template: instances/default |
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,20 @@ | ||
[ | ||
{ | ||
"agent_version": "7.0.0", | ||
"integration": "gRPC Check", | ||
"check": "grpc.healthy", | ||
"statuses": [ | ||
"ok", | ||
"critical" | ||
], | ||
"groups": [ | ||
"host", | ||
"instance", | ||
"grpc_server_service", | ||
"grpc_server_address", | ||
"status_code" | ||
], | ||
"name": "gRPC", | ||
"description": "Returns CRITICAL if the gRPC server is unhealthy. Returns OK if the gRPC server is healthy." | ||
} | ||
] |
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 @@ | ||
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore |
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 @@ | ||
__version__ = "1.0.0" |
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 @@ | ||
from .__about__ import __version__ | ||
from .check import GrpcCheck | ||
|
||
__all__ = ["__version__", "GrpcCheck"] |
Oops, something went wrong.