datadog / datadog-unix-agent Goto Github PK
View Code? Open in Web Editor NEWDatadog Unix Agent
License: Apache License 2.0
Datadog Unix Agent
License: Apache License 2.0
Host tags do not seem to be applied to the metrics as expected. They are clearly part of the host metadata being sent when the agent comes up:
https://github.com/DataDog/datadog-unix-agent/blob/master/metadata/metadata.py#L61
https://github.com/DataDog/datadog-unix-agent/blob/master/agent.py#L45
Expected:
Host tags to be associated with every tag coming from the host.
Actual:
Only metric tags available for aggregation on metrics.
OS - AIX 7200-05-03-2136
====================prtconf=================
System Model: IBM,9117-MMC
Processor Type: PowerPC_POWER7
Processor Implementation Mode: POWER 7
Processor Version: PV_7_Compat
Number Of Processors: 45
Processor Clock Speed: 3304 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 12 aibdbsrv06
Memory Size: 256000 MB
Good Memory Size: 256000 MB
Platform Firmware level: AM770_126
Firmware Version: IBM,AM770_126
Console Login: enable
Auto Restart: true
Full Core: false
NX Crypto Acceleration: Not Capable
In-Core Crypto Acceleration: Not Capable
Network Information
Host Name: aibdbsrv06
IP Address: 10.10.10.26
Sub Netmask: 255.255.255.0
Gateway: 10.10.10.1
Name Server: 10.10.12.2
Domain Name: awash.local
Paging Space Information
Total Paging Space: 4096MB
Percent Used: 10%
INSTALLED RESOURCE LIST
The following resources are installed on the machine.
+/- = Added or deleted from Resource List.
Model Architecture: chrp
Model Implementation: Multiple Processor, PCI bus
Hi,
I am not sure, if this is the correct repository to report this issue.
When I execute the script (I got it from https://s3.amazonaws.com/dd-agent/scripts/install_script.sh) with the environment variable DD_HOST_TAGS=foo:bar
it seems that the resulting configuration file datadog.yaml
is broken.
I traced the problem to install_script.sh#L239-L243 where the command
"sed \"s|# tags:.*|tags: "$formatted_host_tags"/\" $CONF"
"uncomments" the correct part in datadog.yaml but unfortunately also some other part related to snmp configuration.
Since that other part is in the "middle of nowhere", where all surrounding config is still commented, this results in a configuration file that the datadog agent cannot parse.
It would be great if this issue could be fixed.
Cheers.
Perhaps hostnames that include underscores can be automatically replaced with hyphens in order for the agent to start?
The current workaround is to add a hostname
parameter in the datadog.yaml
configuration file that specified a hostname without underscores.
Here is the error message:
> ./agent.py start
2018-08-09 12:24:20,918 | INFO | dd.agent | utils.pidfile(pidfile.py:36) | Pid file is: /tmp/datadog-unix-agent.pid
2018-08-09 12:24:20,919 | INFO | dd.agent | root(agent.py:227) | Start daemon
2018-08-09 12:24:20,919 | INFO | dd.agent | utils.daemon(daemon.py:95) | Starting...
2018-08-09 12:24:20,920 | DEBUG | dd.agent | utils.process(process.py:126) | Popen(['/bin/hostname', '-s'], stdout = -1) called
2018-08-09 12:24:20,931 | WARNING | dd.agent | utils.hostname(hostname.py:33) | Hostname: l490vp026_pub is not complying with RFC 1123
2018-08-09 12:24:20,931 | WARNING | dd.agent | utils.hostname(hostname.py:33) | Hostname: l490vp026_pub is not complying with RFC 1123
2018-08-09 12:24:20,931 | CRITICAL | dd.agent | utils.hostname(hostname.py:70) | Unable to reliably determine host name. You can define one in datadog.conf or in your hosts file
Traceback (most recent call last):
File "./agent.py", line 248, in <module>
sys.exit(main())
File "./agent.py", line 228, in main
agent.start(foreground=foreground)
File "/opt/datadog/datadog-unix-agent/utils/daemon.py", line 114, in start
self.run()
File "./agent.py", line 133, in run
hostname = get_hostname()
File "/opt/datadog/datadog-unix-agent/utils/hostname.py", line 71, in get_hostname
raise Exception('Unable to reliably determine host name. You can define one in datadog.conf or in your hosts file')
Exception: Unable to reliably determine host name. You can define one in datadog.conf or in your hosts file
Any Plans to migrate agents to Golang?
There are outstanding issues on PR #18 that should be addressed to possibly clean up the logic pertaining to the reporting, book-keeping of metric statistics.
The bulk of the PR is fine, however, so to avoid a continuous rebase I am going to proceed to merge it. The stats reporting is also non-critical and since it doesn't appear to be buggy (just sub-optimal, and maybe not the most maintainable).
This issue should be a reminder to revisit the relevant code and fixed if possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.