Skip to content

Commit

Permalink
Document glusterfs logs support (DataDog#8411)
Browse files Browse the repository at this point in the history
* Add log collection

* Add glusterfs logs to config

* Update glusterfs/README.md

Co-authored-by: ruthnaebeck <[email protected]>

* Update glusterfs/README.md

Co-authored-by: ruthnaebeck <[email protected]>

* Update glusterfs/README.md

Co-authored-by: ruthnaebeck <[email protected]>

* Add log source

Co-authored-by: ruthnaebeck <[email protected]>
  • Loading branch information
ChristineTChen and ruthnaebeck authored Jan 22, 2021
1 parent cca7661 commit 905e7af
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 3 deletions.
31 changes: 30 additions & 1 deletion glusterfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,34 @@ No additional installation is needed on your server.

2. [Restart the Agent][4].

#### Log collection


1. Collecting logs is disabled by default in the Datadog Agent, enable it in your `datadog.yaml` file:

```yaml
logs_enabled: true
```

2. Edit this configuration block in your `glusterfs.d/conf.yaml` file to start collecting your GlusterFS logs:

```yaml
logs:
- type: file
path: /var/log/glusterfs/glusterd.log
source: glusterfs
- type: file
path: /var/log/glusterfs/cli.log
source: glusterfs
```


Change the `path` parameter value based on your environment. See the [sample conf.yaml][3] for all available configuration options.

3. [Restart the Agent][4].

See [Datadog's documentation][9] for additional information on how to configure the Agent for log collection in Kubernetes environments.

### Validation

[Run the Agent's status subcommand][5] and look for `glusterfs` under the Checks section.
Expand Down Expand Up @@ -87,4 +115,5 @@ Need help? Contact [Datadog support][7].
[5]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information
[6]: https://github.com/DataDog/integrations-core/blob/master/glusterfs/metadata.csv
[7]: https://docs.datadoghq.com/help/
[8]: https://github.com/gluster/gstatus#install
[8]: https://github.com/gluster/gstatus#install
[9]: https://docs.datadoghq.com/agent/kubernetes/log/
9 changes: 9 additions & 0 deletions glusterfs/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ files:
This changes the collection interval of the check. For more information, see:
https://docs.datadoghq.com/developers/write_agent_check/#collection-interval
- template: logs
example:
- type: file
path: /var/log/glusterfs/glusterd.log
source: glusterfs
- type: file
path: /var/log/glusterfs/cli.log
source: glusterfs
23 changes: 23 additions & 0 deletions glusterfs/datadog_checks/glusterfs/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,26 @@ instances:
## This is useful for cluster-level checks.
#
# empty_default_hostname: false

## 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/
#
# logs:
# - type: file
# path: /var/log/glusterfs/glusterd.log
# source: glusterfs
# - type: file
# path: /var/log/glusterfs/cli.log
# source: glusterfs
7 changes: 5 additions & 2 deletions glusterfs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"gluster"
],
"categories": [
"data store"
"data store",
"log collection"
],
"type": "check",
"is_public": false,
Expand All @@ -35,7 +36,9 @@
},
"saved_views": {},
"service_checks": "assets/service_checks.json",
"logs": {},
"logs": {
"source": "glusterfs"
},
"metrics_metadata": "metadata.csv"
}
}

0 comments on commit 905e7af

Please sign in to comment.