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

Add ceph config spec #6563

Merged
merged 4 commits into from
May 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Next Next commit
Add ceph config spec
  • Loading branch information
mgarabed committed May 1, 2020
commit 2edd624942a43d932309d7efc1893553ca749929
67 changes: 67 additions & 0 deletions ceph/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Ceph
files:
- name: ceph.yaml
options:
- template: init_config
- template: instances
options:
- name: ceph_cmd
description: Ceph command to use.
value:
example: /usr/bin/ceph
type: string
- name: ceph_cluster
description: Cluster ceph to query.
value:
example: ceph
type: string
- name: use_sudo
description: |
If your environment requires sudo, please add the following line:

dd-agent ALL=(ALL) NOPASSWD:/usr/bin/ceph

to your sudoers file, and uncomment the option below:
value:
type: boolean
example: false
- name: collect_service_check_for
description: |
If you wish to customize the health checks sent as a service check, uncomment and edit the list below.
It collects by default the health check listed below.
The list of health checks is available here: http://docs.ceph.com/docs/master/rados/operations/health-checks/
The health checks are only available if you're running ceph luminous or later
value:
type: array
items:
type: string
example:
- OSD_DOWN
- OSD_ORPHAN
- OSD_FULL
- OSD_NEARFULL
- POOL_FULL
- POOL_NEAR_FULL
- PG_AVAILABILITY
- PG_DEGRADED
- PG_DEGRADED_FULL
- PG_DAMAGED
- PG_NOT_SCRUBBED
- PG_NOT_DEEP_SCRUBBED
- CACHE_POOL_NEAR_FULL
- TOO_FEW_PGS
- TOO_MANY_PGS
- OBJECT_UNFOUND
- REQUEST_SLOW
- REQUEST_STUCK
- template: instances/tags
- template: logs
example:
- type: file
path: /var/log/ceph/*.log
source: ceph
service: <APPLICATION_NAME>
log_processing_rules:
- type: multi_line
name: log_start_with_date
pattern: \d{4}-\d{2}-\d{2}
39 changes: 23 additions & 16 deletions ceph/datadog_checks/ceph/data/conf.yaml.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
init_config:
## All options defined here are available to all instances.
#
# init_config: {}

## Every instance is scheduled independent of the others.
#
instances:

-
Expand All @@ -20,9 +24,9 @@ instances:
##
## to your sudoers file, and uncomment the option below:
#
# use_sudo: true
# use_sudo: false

## @param collect_service_check_for - list of string - optional
## @param collect_service_check_for - list of strings - optional
## If you wish to customize the health checks sent as a service check, uncomment and edit the list below.
## It collects by default the health check listed below.
## The list of health checks is available here: http://docs.ceph.com/docs/master/rados/operations/health-checks/
Expand All @@ -48,22 +52,25 @@ instances:
# - REQUEST_SLOW
# - REQUEST_STUCK

## @param tags - list of key:value element - optional
## List of tags to attach to every metric, event and service check emitted by this integration.
## @param tags - list of strings - optional
## A list of tags to attach to every metric and service check emitted by this instance.
##
## Learn more about tagging: https://docs.datadoghq.com/tagging/
## Learn more about tagging at https://docs.datadoghq.com/tagging
#
# tags:
# - name:mars_cluster
# - <KEY_1>:<VALUE_1>
# - <KEY_2>:<VALUE_2>

## Log Section (Available for Agent >=6.0)
## Log Section
##
## type - mandatory - Type of log input source (tcp / udp / file / windows_event)
## port / path / channel_path - mandatory - Set port if type is tcp or udp. Set path if type is file. Set channel_path if type is windows_event
## service - mandatory - Name of the service that generated the log
## source - mandatory - Attribute that defines which Integration sent the logs
## tags: - optional - Add tags to the collected logs
## 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
## service - required - 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/
#
Expand All @@ -73,6 +80,6 @@ instances:
# source: ceph
# service: <APPLICATION_NAME>
# log_processing_rules:
# - type: multi_line
# name: log_start_with_date
# pattern: \d{4}-\d{2}-\d{2}
# - type: multi_line
# name: log_start_with_date
# pattern: \d{4}-\d{2}-\d{2}
3 changes: 3 additions & 0 deletions ceph/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"type": "check",
"integration_id": "ceph",
"assets": {
"configuration": {
"spec": "assets/configuration/spec.yaml"
},
"monitors": {},
"dashboards": {},
"service_checks": "assets/service_checks.json"
Expand Down