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 1 commit
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.
67 changes: 67 additions & 0 deletions celerdata/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Agent Check: celerdata

## Overview

[CelerData][1] is the only SQL engine that is fast enough to run the most demanding workloads directly on your data lakehouse, all powered by StarRocks and cloud-managed by CelerData.
emarsha94 marked this conversation as resolved.
Show resolved Hide resolved

StarRocks metrics enable database administrators to monitor their deployments. StarRocks provides a Prometheus-compatible information collection interface.

With this integration, we collect metrics and logs from StarRocks.


## 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 install the CelerData check on your host:
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

1. Download and install the [Datadog Agent][8].
2. To install the celerdata check on your host:
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

```shell
datadog-agent integration install -t datadog-celerdata==<INTEGRATION_VERSION>
emarsha94 marked this conversation as resolved.
Show resolved Hide resolved
```

### 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.
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

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.
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

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
StarRocks metrics are collected as documented [here][9].
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

See [metadata.csv][6] for the full list of metrics provided by this check.
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

### Service Checks

In the base check, Service check `celerdata_fe.prometheus.health` is submitted for FE component and `celerdata_be.prometheus.health` is submitted for BE component
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

### Events

CelerData does not include any events.
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved

## 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]: todo@starrocks.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/
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved
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
1 change: 1 addition & 0 deletions celerdata/assets/service_checks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
yandongxiao marked this conversation as resolved.
Show resolved Hide resolved
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
120 changes: 120 additions & 0 deletions celerdata/datadog_checks/celerdata/config_models/defaults.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# 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>


def instance_allow_redirects():
return True


def instance_auth_type():
return 'basic'


def instance_cache_metric_wildcards():
return True


def instance_cache_shared_labels():
return True


def instance_collect_counters_with_distributions():
return False


def instance_collect_histogram_buckets():
return True


def instance_disable_generic_tags():
return False


def instance_empty_default_hostname():
return False


def instance_enable_health_service_check():
return True


def instance_histogram_buckets_as_distributions():
return False


def instance_ignore_connection_errors():
return False


def instance_kerberos_auth():
return 'disabled'


def instance_kerberos_delegate():
return False


def instance_kerberos_force_initiate():
return False


def instance_log_requests():
return False


def instance_min_collection_interval():
return 15


def instance_non_cumulative_histogram_buckets():
return False


def instance_persist_connections():
return False


def instance_request_size():
return 16


def instance_skip_proxy():
return False


def instance_tag_by_endpoint():
return True


def instance_telemetry():
return False


def instance_timeout():
return 10


def instance_tls_ignore_warning():
return False


def instance_tls_use_host_header():
return False


def instance_tls_verify():
return True


def instance_use_latest_spec():
return False


def instance_use_legacy_auth_encoding():
return True


def instance_use_process_start_time():
return False