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

[Celerdata] integration with CelerData #2326

Merged
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
88b24be
[Celerdata] integration with CelerData
yandongxiao Mar 11, 2024
754c1ce
[CelerData] Fix some documents based on review comments
yandongxiao Mar 21, 2024
d0ee339
Update celerdata/README.md
yandongxiao Mar 22, 2024
27c8a88
Update celerdata/README.md
yandongxiao Mar 22, 2024
dcf5cc9
Update celerdata/README.md
yandongxiao Mar 22, 2024
152fe1d
Update celerdata/README.md
yandongxiao Mar 22, 2024
842dccd
Update celerdata/README.md
yandongxiao Mar 22, 2024
c67f067
Update celerdata/README.md
yandongxiao Mar 22, 2024
b167fc0
Update celerdata/README.md
yandongxiao Mar 22, 2024
eba1e0c
Update celerdata/README.md
yandongxiao Mar 22, 2024
8d48c4b
Update celerdata/README.md
yandongxiao Mar 22, 2024
0f6af40
Update celerdata/README.md
yandongxiao Mar 22, 2024
46c1918
Update celerdata/README.md
yandongxiao Mar 22, 2024
6020335
Update celerdata/README.md
yandongxiao Mar 22, 2024
842251c
Update metadata.csv
yandongxiao Mar 22, 2024
9ffd0d8
Update metadata.csv
yandongxiao Mar 22, 2024
083d02a
Update metadata.csv
yandongxiao Mar 22, 2024
fa50f6c
Update celerdata/assets/service_checks.json
yandongxiao Mar 26, 2024
bd90388
Update celerdata/assets/service_checks.json
yandongxiao Mar 26, 2024
66828b0
[CelerData] Add Dashboard
yandongxiao Mar 28, 2024
78e21f4
[CelerData] Add log pipeline
yandongxiao Mar 28, 2024
cf7776a
[CelerData] update celerdata_tests.yml to celerdata_tests.yaml
yandongxiao Mar 29, 2024
73a5c92
Update celerdata/metadata.csv
yandongxiao Apr 2, 2024
166cdde
[CelerData] Create a dictionary mapping of the metrics
yandongxiao Apr 7, 2024
4f9ec5c
[CelerData] Fix metrics names in metadata.csv
yandongxiao Apr 7, 2024
cfc982f
[CelerData] Fix format in metadata.csv
yandongxiao Apr 8, 2024
7abfbba
remove setup.py
yandongxiao Apr 10, 2024
80080dd
Update celerdata/README.md
yandongxiao Apr 10, 2024
1530c51
add some images
yandongxiao Apr 10, 2024
105d34d
update image size
yandongxiao Apr 10, 2024
ebc83bb
update image
yandongxiao Apr 10, 2024
86d380c
use svg format for log image
yandongxiao Apr 11, 2024
569e2d2
update Dashboard
yandongxiao Apr 12, 2024
a9377b1
Fix grammar issues
yandongxiao Apr 16, 2024
d0762b4
update logs pipeline
yandongxiao Apr 18, 2024
9f01c9f
update logs pipeline
yandongxiao Apr 18, 2024
875d8ad
fix wrong timestamp in celerdata_tests.yaml
yandongxiao Apr 23, 2024
0bed828
remove a test case from celerdata_tests.yaml
yandongxiao Apr 24, 2024
9c5dd69
trigger ci
yandongxiao Apr 24, 2024
65afdfc
trigger ci
yandongxiao Apr 26, 2024
1976d45
Fix: Some lines has too many column(s) detected, found 11, expected 10
yandongxiao Apr 26, 2024
2dfbcb6
Update .github/CODEOWNERS
yandongxiao May 4, 2024
4d99eb6
Update .github/CODEOWNERS
yandongxiao May 4, 2024
27f512d
Update celerdata/README.md
yandongxiao May 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ coverage:
target: 75
flags:
- zenoh_router
celerdata:
target: 75
flags:
- celerdata
cfssl:
target: 75
flags:
Expand Down Expand Up @@ -307,6 +311,11 @@ flags:
paths:
- bind9/datadog_checks/bind9
- bind9/tests
celerdata:
carryforward: true
paths:
- celerdata/datadog_checks/celerdata
- celerdata/tests
cfssl:
carryforward: true
paths:
Expand Down
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
/notion/ @makenotion/public-api @DataDog/ecosystems-review
/singlestoredb_cloud/ @tdasarathan @DataDog/ecosystems-review
/emqx/ @zhongwencool @zmstone @DataDog/ecosystems-review
/celerdata/ @yandongxiao yandongxiao@starrocks.com
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

# Community Partners + Documentation
/1e/*metadata.csv support@1e.com @DataDog/documentation @DataDog/ecosystems-review
Expand Down Expand Up @@ -1236,3 +1237,10 @@
/emqx/assets/monitors @zhongwencool @zmstone @DataDog/documentation @DataDog/monitor-app @DataDog/agent-integrations
/emqx/assets/logs/ @zhongwencool @zmstone @DataDog/agent-integrations @DataDog/logs-backend
/emqx/README.md @zhongwencool @zmstone @DataDog/documentation @DataDog/ecosystems-review

/celerdata/*metadata.csv @yandongxiao yandongxiao@starrocks.com @DataDog/documentation
/celerdata/manifest.json @yandongxiao yandongxiao@starrocks.com @DataDog/documentation
/celerdata/README.md @yandongxiao yandongxiao@starrocks.com @DataDog/documentation
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved
/celerdata/assets/dashboards @yandongxiao yandongxiao@starrocks.com @DataDog/documentation @DataDog/dashboards-backend @DataDog/agent-integrations
/celerdata/assets/monitors @yandongxiao yandongxiao@starrocks.com @DataDog/documentation @DataDog/monitor-app @DataDog/agent-integrations
/celerdata/assets/logs/ @yandongxiao yandongxiao@starrocks.com @DataDog/agent-integrations @DataDog/logs-backend
19 changes: 19 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,25 @@ jobs:
test-py3: ${{ inputs.test-py3 }}
setup-env-vars: "${{ inputs.setup-env-vars }}"
secrets: inherit
j9eb5f31:
uses: DataDog/integrations-core/.github/workflows/test-target.yml@master
with:
job-name: celerdata
target: celerdata
platform: linux
runner: '["ubuntu-22.04"]'
repo: "${{ inputs.repo }}"
python-version: "${{ inputs.python-version }}"
standard: ${{ inputs.standard }}
latest: ${{ inputs.latest }}
agent-image: "${{ inputs.agent-image }}"
agent-image-py2: "${{ inputs.agent-image-py2 }}"
agent-image-windows: "${{ inputs.agent-image-windows }}"
agent-image-windows-py2: "${{ inputs.agent-image-windows-py2 }}"
test-py2: ${{ inputs.test-py2 }}
test-py3: ${{ inputs.test-py3 }}
setup-env-vars: "${{ inputs.setup-env-vars }}"
secrets: inherit
jcb3c31b:
uses: DataDog/integrations-core/.github/workflows/test-target.yml@master
with:
Expand Down
8 changes: 8 additions & 0 deletions celerdata/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CHANGELOG - celerdata

## 1.0.0 / 2024-03-11

***Added***:

* Initial Release
* StarRocks provides a Prometheus-compatible information collection interface, and this integration collects metrics and logs from StarRocks.
64 changes: 64 additions & 0 deletions celerdata/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Agent Check: celerdata

## Overview

[CelerData][1], based on the open source project StarRocks, is a commercial SQL engine designed for high-speed data analytics directly on your data lake house. It offers a cloud-managed solution that enhances the performance and scalability of running complex queries and workloads.

This integration allows users to collect Prometheus metrics and logs. By leveraging this integration, customers can gain insights into query performance, system health, and resource utilization, enabling them to optimize their data analytics operations effectively.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this collecting starRocks metrics and sent using prometheus?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StarRocks has a current integration where we feed prometheus. We're reusing this to feed datadog.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry - just to confirm, StarRocks has an integration that collects prometheus metrics and you are sending the metrics StarRocks collects to Datadog?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this integration use openmetrics to send data to datadog.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emarsha94 I'm curious why you asking about this. Do you have a recommendation?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overview should be clear enough that a new customer / someone who has never heard of the product can understand what the integration does and the purpose/value. Can you update the overview so that is clear what StarRocks is and what metrics/specific data your integration is monitoring?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


## 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][2] for guidance on applying these instructions.

### Installation

To collect StarRocks [metrics][9] and logs:

1. Download and install the [Datadog Agent][8].
2. Install the CelerData check on your host with the following command:

```shell
datadog-agent integration install -t datadog-celerdata==1.0.0
```

### Configuration

1. Edit the `celerdata.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory, to start collecting metrics and logs. See the [celerdata.d/conf.yaml.example][3] for all available configuration options.

2. Datadog listens on port 5000 for the `dogstatsd_stats_port` and `expvar_port`. In your `celerdata.conf` file, you will need to change the `server.discovery.listen_address` and the `server.discovery.advertised_address` to use a port other than 5000.

3. [Restart the Agent][4].

### Validation

[Run the Agent's status subcommand][5] and look for `celerdata` under the Checks section.

## Data Collected

### Metrics

yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

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

### Service Checks

See [service_checks.json][10] for a list of service checks provided by this integration.

### Events

The CelerData integration does not include any events.

## Troubleshooting

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

[1]: https://celerdata.com/
[2]: https://docs.datadoghq.com/agent/autodiscovery/integrations
[3]: https://github.com/DataDog/integrations-extras/blob/master/celerdata/datadog_checks/celerdata/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-extras/blob/master/celerdata/metadata.csv
[7]: support@celerdata.com
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved
[8]: https://app.datadoghq.com/account/settings/agent/latest
[9]: https://docs.starrocks.io/docs/administration/metrics/
[10]: https://github.com/DataDog/integrations-extras/blob/master/celerdata/service_checks.json
73 changes: 73 additions & 0 deletions celerdata/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: celerdata

files:

- name: celerdata.yaml
options:
- template: instances
options:
- template: instances/openmetrics
overrides:
openmetrics_endpoint.display_priority: 5
openmetrics_endpoint.value.example: http://127.0.0.1:8030/metrics
openmetrics_endpoint.description: |
The URL exposing metrics in the OpenMetrics format.
You should configure this based on the component you're monitoring.
For FE component, use something like http://127.0.0.1:8030/metrics
For BE component, use something like http://127.0.0.1:8040/metrics
- template: logs
description: |
Log Section

type - required - Type of log input source (tcp / udp / file / windows_event).
port / path / channel_path - required - Set port if type is tcp or udp.
Set path if type is file.
Set channel_path if type is windows_event.
source - required - Attribute that defines which integration sent the logs.
encoding - optional - For file specifies the file encoding. Default is utf-8. Other
possible values are utf-16-le and utf-16-be.
service - optional - The name of the service that generates the log.
Overrides any `service` defined in the `init_config` section.
tags - optional - Add tags to the collected logs.

Discover Datadog log collection: https://docs.datadoghq.com/logs/log_collection/
You should configure this based on the component you're monitoring.
For FE component, use items which has service: fe.
For BE component, use items which has service: be.
example:
- type: file
path: /path/to/fe.log
service: fe
source: celerdata
- type: file
path: /path/to/fe.out
service: fe
source: celerdata
- type: file
path: /path/to/fe.warn.log
service: fe
source: celerdata
- type: file
path: /path/to/fe.audit.log
service: fe
source: celerdata
- type: file
path: /path/to/fe.big_query.log
service: fe
source: celerdata
- type: file
path: /path/to/fe.dump.log
service: fe
source: celerdata
- type: file
path: /path/to/be.INFO
service: starrocks_be
source: celerdata
- type: file
path: /path/to/be.out
service: be
source: celerdata
- type: file
path: /path/to/be.WARNING
service: be
source: celerdata
31 changes: 31 additions & 0 deletions celerdata/assets/service_checks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[

Check failure on line 1 in celerdata/assets/service_checks.json

View workflow job for this annotation

GitHub Actions / run / Validate

celerdata_fe.prometheus.health: integration name `CelerData` must match manifest display_name `celerdata` celerdata_be.prometheus.health: integration name `CelerData` must match manifest display_name `celerdata` Can Connect is not a unique name
{
"agent_version": "7.35.0",
"integration": "CelerData",
"check": "celerdata_fe.prometheus.health",
"statuses": [
"ok",
"critical"
],
"groups": [
"host"
],
"name": "Can Connect",
"description": "Returns CRITICAL if the Agent cannot connect to CelerData to collect metrics. Returns OK otherwise."
},
{
"agent_version": "7.35.0",
"integration": "CelerData",
"check": "celerdata_be.prometheus.health",
"statuses": [
"ok",
"critical"
],
"groups": [
"host"
],
"name": "Can Connect",
"description": "Returns CRITICAL if the Agent cannot connect to CelerData to collect metrics. Returns OK otherwise."
}
]

1 change: 1 addition & 0 deletions celerdata/datadog_checks/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore
1 change: 1 addition & 0 deletions celerdata/datadog_checks/celerdata/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '1.0.0'
4 changes: 4 additions & 0 deletions celerdata/datadog_checks/celerdata/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .__about__ import __version__
from .celerdata import CelerdataCheck

__all__ = ['__version__', 'CelerdataCheck']
17 changes: 17 additions & 0 deletions celerdata/datadog_checks/celerdata/celerdata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from datadog_checks.base import OpenMetricsBaseCheckV2


class CelerdataCheck(OpenMetricsBaseCheckV2):
__NAMESPACE__ = 'celerdata'

def __init__(self, name, init_config, instances):
super(CelerdataCheck, self).__init__(name, init_config, instances)

def get_default_config(self):
"""
Returns the default OpenMetrics configuration.
"""
return {
'metrics': ['.*'],
Copy link
Contributor

@steveny91 steveny91 Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

            'metrics': ['.*'],

The best practice here is to create a dictionary mapping of the metrics we want to collect called metrics.py. Example: https://github.com/DataDog/integrations-core/blob/master/gitlab/datadog_checks/gitlab/metrics.py

Using the accept everything wildcard approach in my opinion a bit too vague when it comes to future troubleshooting and maintenance.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

'exclude_metrics': [r'.*8060.*'],
}
14 changes: 14 additions & 0 deletions celerdata/datadog_checks/celerdata/config_models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is autogenerated.
# To change this file you should edit assets/configuration/spec.yaml and then run the following commands:
# ddev -x validate config -s <INTEGRATION_NAME>
# ddev -x validate models -s <INTEGRATION_NAME>

from .instance import InstanceConfig


class ConfigMixin:
_config_model_instance: InstanceConfig

@property
def config(self) -> InstanceConfig:
return self._config_model_instance