-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Describe the problem
While experimenting with do-agent, I wanted to see if do-agent could support additional metrics for monitoring, graphing and alerting on DigitalOcean. I ran do-agent --help
and saw options for enabling collectors that look familiar from the prometheus node_exporter to me. I tried to enable a collector using command-line flags, and received an error that I had to check the source code to understand.
Steps to reproduce
When I run do-agent --help
, I see many --collector.<name>
options, e.g.:
...
--collector.arp Enable the arp collector (default: enabled).
--collector.bcache Enable the bcache collector (default: enabled).
...
However, if I try to use these flags, e.g.:
# do-agent --collector.arp
do-agent: error: flag 'collector.arp' cannot be repeated, try --help
This didn't make sense to me as I had only specified --collector.arp
once.
Also, the help text for --collector.arp
says (default: enabled)
, however the collector is disabled for my platform https://github.com/digitalocean/do-agent/blob/master/cmd/do-agent/config_linux.go because disables arp.
I get the same results with the --no-collector.arp
flag too:
# do-agent --no-collector.arp
do-agent: error: flag 'collector.arp' cannot be repeated, try --help
I think that the --no-collector.<name>
options should be kept for the enabled collectors, e.g.: --no-collector.cpu
.
Expected behavior
--collector.arp
would enable the arp collector--collector.arp
help text would show the default for the current platform
OR
- The
--collector.arp
flag would not be valid for do-agent --collector.arp
help text including the default would not be shown
System Information
Distribution and version:
Debian GNU/Linux 10 (buster)
do-agent information:
do-agent (DigitalOcean Agent)
Version: 3.9.4
Revision: 766c949
Build Date: Fri Mar 12 20:37:53 UTC 2021
Go Version: go1.16.2
Website: https://github.com/digitalocean/do-agent
Copyright (c) 2021 DigitalOcean, Inc. All rights reserved.
This work is licensed under the terms of the Apache 2.0 license.
For a copy, see <https://www.apache.org/licenses/LICENSE-2.0.html>.