{"id":19054409,"url":"https://github.com/datadog/datadog-unix-agent","last_synced_at":"2025-04-24T03:14:58.182Z","repository":{"id":31959325,"uuid":"117725026","full_name":"DataDog/datadog-unix-agent","owner":"DataDog","description":"Datadog Unix Agent","archived":false,"fork":false,"pushed_at":"2025-03-14T12:32:23.000Z","size":60915,"stargazers_count":12,"open_issues_count":7,"forks_count":20,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-24T03:14:48.833Z","etag":null,"topics":["aix","datadog","monitoring","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataDog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-01-16T18:38:33.000Z","updated_at":"2025-03-14T12:32:26.000Z","dependencies_parsed_at":"2025-04-17T23:38:21.290Z","dependency_job_id":null,"html_url":"https://github.com/DataDog/datadog-unix-agent","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdatadog-unix-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdatadog-unix-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdatadog-unix-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fdatadog-unix-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataDog","download_url":"https://codeload.github.com/DataDog/datadog-unix-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250552080,"owners_count":21449165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aix","datadog","monitoring","python"],"created_at":"2024-11-08T23:38:16.198Z","updated_at":"2025-04-24T03:14:58.158Z","avatar_url":"https://github.com/DataDog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datadog Unix Agent\n\nA Datadog Agent specifically designed for Unix-based systems.\n\nNote: This agent has been designed with portability in mind but has only been tested at the\ntime of this writing on AIX.\nIf you have any questions, please contact our [support team](https://docs.datadoghq.com/help/).\n\nThe goal of this agent is to provide support for miscellaneous Unix operating systems not supported\nby our currently available agents. To do so, it has been stripped of unnecessary bloat and cut around\nless relevant use-cases given the target platforms. Only a subset of key and OS-specific features have\nbeen implemented, please do not expect feature parity.\n\n## AIX\n\n### Omnibus Build\n\nAn omnibus build is available for the agent. The omnibus build provides a self-contained\nenvironment, shipping all required dependencies, including python3 and other depending shared\nobjects. The omnibus build will however depend on a small subset of system-level dependencies\nexpected to be present on any AIX LPAR image; namely: libc, libpthreads, libdl and libcrypy.\n\nUnfortunately, disparities exist between some of the system libs available symbols across AIX\ntechnology levels on the *same* AIX version. This is an AIX particularity and means that we can\nonly guarantee the agent will run successfully on machines matching our builders' technology\nlevel. That is:\n\n#### Target Platforms\n\nThe omnibus build has been build and tested on the target platforms at the time of this writing:\n\n- AIX 6.1 TL9 SP6\n- AIX 7.1 TL5 SP3\n- AIX 7.2 TL3 SP0\n- AIX 7.3 TL3 SP0\n\nShould you attempt to install and run the agent package on a lesser version your mileage will\nvary, you may or may not have all required symbols available. We are working to improve our\nsupport across al target platforms.\n\n#### Omnibus Bootstrap\n\nTo help with the setup of the omnibus builder we have a (still a bit flaky ;) script that should\nhelp you get up and building in a jiffy or two. It's a basic shell script located in the `omnibus/`\nfolder that will help you install, amongst others:\n- YUM (rpm package manager)\n- Required build toolchain (gcc, libffi, ...)\n- Ruby\n- Required tools (sudo, GNU tar, bundler)\n- Patch required `libyajl-gem`\n\n#### Build Baseline Requirements\n\nThe omnibus build now ships all these dependencies, most notably openssl and python, all properly\nlinked and only requiring AIX baseline system level dependencies expected to be available:\n- libc\n- libpthreads\n- libcrypt\n- libdl\n\n#### Build Runtime Requirements\n\nAs mentioned above all requirements are bundled with the omnibus installer. For more details take\na look at the `omnibus/` directory to take a look at the implementation.\n\n### Installation\n\nDownload links for the latest releases can be found [on this page](https://github.com/DataDog/datadog-unix-agent/releases).\n\nThe installer may be executed as follows (as root):\n\n```bash\ninstallp -aXYgd ./datadog-unix-agent-\u003cversion\u003e.powerpc.bff -e dd-aix-install.log datadog-unix-agent\n```\n\nThis will install the agent in `/opt/datadog-agent`.\n\nNote how we're logging to `dd-aix-install.log`, you may skip that by removing the `-e` switch.\n\n#### Running the agent\n\nThe expected configuration location is:\n```\n/etc/datadog-agent/datadog.yaml\n```\n\nThat said, config file will be searched in this order (with the first match being\ntaken):\n- `/etc/datadog-agent/datadog.yaml`\n- `./etc/datadog-agent/datadog.yaml`\n- `./datadog.yaml`\n\nThis should support legacy configuration locations from early adopters who may have\ninstalled earlier dev images. Please try to update to the preferred location to avoid\nissues in the future with potential deprecations.\n\nA sample configuration file may be found in `/etc/datadog-agent/datadog.yaml.example`.\n\nA basic configuration will typically require your datadog API key. Should you require\nto submit your metrics to the EU instance, the `site` configuration option is available.\nYou may also override the `dd_url` manually, but that should not be required.\n\nOccassionally a proxy configuration must be specified depending on your network setup.\n\nIn versions `\u003e=0.7.0`, an SRC subsystem is created so you can now manage the agent\nusing the usual AIX commands to manage it. Thus, with the configuration in place,\nyou may start the agent with:\n```bash\nstartsrc -s datadog-agent\n```\n\nYou may check the status with:\n```bash\nlssrc -s datadog-agent\n```\n\nAnd you may stop it with:\n```bash\nstopsrc -s datadog-agent\n```\n\nPlease note that an `inittab` entry is now created automatically on package installation\nand the agent will be brought up automatically when runlevel 2 is entered. If you wish\nto disable this behavior please run the corresponding `rmitab` command:\n```bash\nrmitab \"datadog-agent\"\n```\n\nThe default `inittab` configuration enables the service in `respawn` mode, such that if\nthe agent should crash, it will be automatically respawned. The goal of this behavior\nis to help avoid a loss in observability in the event of an agent crash. AIX service\nmanagement is a little rudimentary, so if this behavior is too invasive for your liking\nyou may change the behavior from `respawn` to `once`:\n```bash\nchitab \"datadog-agent:2:once:/usr/bin/startsrc -s datadog-agent\"\n```\n\n**Note: in this scenario the agent will not be automatically restarted in the event of\na crash.**\n\n##### Deprecated\n\nThe following instructions refer only to earlier iterations of this project and do not\napply to the `stable` agent (1.0.0) or dev versions `\u003e=0.7.0`. These are here for historic\nreference.\n\nWith older versions of the agent, you will have to resort to the manual start procedure\nfor the agent daemon:\n\n```bash\n/opt/datadog-agent/agent/agent.py -b start\n```\n\nAs well as the manual call to stop it:\n```bash\n/opt/datadog-agent/agent/agent.py stop\n```\n\nIf you want to run the agent in the foreground, please omit the `-b` switch.\n\nIf you wish to override any configuration setting defined in the config file, you\nmay resort to environment variables as follows:\n```bash\nDD_LOG_LEVEL=debug ./agent.py start\n```\n\n#### Running dogstatsd\n\nDogstatsd allows collecting and submitting custom metrics to datadog. It listens on\na UDP port and statsd metrics may be submitted to it. These will then be relayed\nto Datadog.\n\nDogstatsd relies on the same configuration file defined for the agent where a `dogstatsd`\nconfiguration section is available. The dogstatsd server will typically run within the\nsame agent process, but should you need a dedicated process it may also be launched in\nstandalone mode.\n\nTo enable dogstatsd, simply edit `/etc/datadog-agent/datadog.yaml` and set the relevant\nconfiguration options.\n\n```yaml\ndogstatsd:                        # Dogstatsd configuration options\n  enabled: true                   # disabled by default\n  bind_host: localhost            # address we'll be binding to\n  port: 8125                      # dogstatsd UDP listening port\n  non_local_traffic: false        # listen to non-local traffic\n```\n\n### Integrations\n\n#### System Integrations\n\nThe following system-level integrations are enabled by default:\n\n - CPU\n - Filesystem\n - IOStat\n - Load\n - Memory\n - Uptime\n\n#### Bundled Integrations\n\nAdditional integrations currently available:\n - Disk\n - LPARstats\n - Network \n - Process\n\nFor bundled integrations, a configuration file should be put in place to enable\nthe integration. Some of these, like the network check, might already be enabled\nby default. These configuration files should be found in `./etc/datadog-agent/conf.d`.\nThe name of the YAML configuration file should match that of the integration:\n`./etc/datadog-agent/conf.d/foo.yaml` will enable integration `foo`, and set its\nconfiguration.\n\nIf changes are made to an agent integration, the agent will have to be restarted,\nconfiguration changes are not picked up automatically.\n\nThese integrations are shipped as python wheels. You may develop your own should\nyout need to, all you have to do is follow the blueprint set by the bundled wheels\n[here](https://github.com/DataDog/datadog-unix-agent/tree/master/checks/bundled).\n\nSee more in the developer notes [here](#integrations).\n\n### Uninstall\nTo remove an installed agent you will run a similar `installp` command:\n```\ninstallp -e dd-aix-uninstall.log -uv datadog-unix-agent\n```\nNote how we're again logging to `dd-aix-install.log`, you may skip that by removing the `-e` switch.\n\n#### Removing Older Agents\n\n##### Deprecated\n\nThe following instructions should only apply to early adopters who may have installed\nearly `dev` versions of the unix agent. The following does **NOT** apply to agent installs\nthat used the BFF package. Kept here for historic reference.\n\nIf you had used the previous scripted installer to install a previous early-development version of the\nagent, the former location was `/opt/datadog/datadog-unix-agent`, you will have to remove that manually.\nPlease be mindful to preserve you configurations from that setup if you wish to reuse them with the new\nagent. You can use the same files, and drop them into the same relative paths in `/opt/datadog-agent`.\n\nThe reason the location was modified was to provide a consistent location across agent versions and\nplatforms, to match the user experience in Agent 5 and Agent 6.\n\nThis should allow you to disable the old running agent and safely delete the old location:\n\n```bash\ncd /opt/datadog/datadog-unix-agent\n. ./venv/bin/activate\n./agent.py stop\ndeactivate\ncd ~\n# remember to backup config files if required\nrm -rf /opt/datadog/datadog-unix-agent\n```\n\nRPM dependencies installed by the scripted installer are no longer required and may be removed if you\nso wish. This is the list of former RPM requirements:\n- ca-certificates-2016.10.7-2.aix6.1.ppc.rpm\n- curl-7.52.1-1.aix6.1.ppc.rpm\n- db-4.8.24-3.aix6.1.ppc.rpm\n- gdbm-1.8.3-5.aix5.2.ppc.rpm\n- gettext-0.19.7-1.aix6.1.ppc.rpm\n- glib2-2.14.6-2.aix5.2.ppc.rpm\n- python-2.7.10-1.aix6.1.ppc.rpm\n- python-devel-2.7.10-1.aix6.1.ppc.rpm\n- python-iniparse-0.4-1.aix6.1.noarch.rpm\n- python-pycurl-7.19.3-1.aix6.1.ppc.rpm\n- python-tools-2.7.10-1.aix6.1.ppc.rpm\n- python-urlgrabber-3.10.1-1.aix6.1.noarch.rpm\n- readline-6.1-2.aix6.1.ppc.rpm\n\n\n## Developer Notes\n\nThe agent runs on Python3.  You will typically want `setuptools`, `wheel` and `virtualenv`\non your python development environment. We also have some development tools requirements,\nyou may install them with:\n```bash\npip install -r requirements-dev.txt\n```\n\nYou may mostly work on this repo from any \\*nix environment. We do have some python\nbinary wheel dependencies, on linux these are typically provided as `manylinux`\npre-built wheels so just installing the requirements should work. Other platforms\n(like macOS) might also have pre-built wheels. And in the more popular environments,\neven if compiled wheels are not available, building the wheels during the pip\ninstallation should be seamless.\n\n```bash\npip install -r requirements.txt\n```\n\n### Building\n\n#### Omnibus build\n\nThis is the recommended way for building the agent. Hopefully setting up omnibus on\nthe builder will be scripted, but until then getting the builder ready is a manual\nprocess.\n\n##### Platforms\nYou will need a build machine that matches the target platform, thus:\n- AIX 6.1\n- AIX 7.1\n- AIX 7.2\n- AIX 7.3\n\n##### Omnibus Requirements\nTo setup omnibus on the target machine you will need:\n- [AIX Linux toolkit](https://www.ibm.com/developerworks/aix/library/aix-toolbox/alpha.html)\n- `gcc` (\u003e= 6.3.0 via yum)\n- `coreutils` (via yum - provided with the linux toolkit)\n- `sudo` (via yum)\n- `libffi` and `libffi-devel` (via yum): required to bootstrap ruby.\n- `ruby` and `ruby-devel` (via yum)\n- GNU `tar` (via yum)\n- `bundler` (via `gem install bundler`)\n\nNow let's install the omnibus dependencies, navigate to `omnibus/`:\n\n- `bundle install`: when the bundle get to `libyajl` it will fail on AIX, don't worry we\nhave a workaround. Please read on.\n\nOn AIX You will need to install a modified version of libyajl before proceeding (you can\nrun these commands in a scratch directory somewhere):\n- [`libyajl2-gem`](https://github.com/truthbk/libyajl2-gem) @ branch `jaime/aix`\n  - [yajl](https://github.com/lloyd/yajl/tree/12ee82ae5138ac86252c41f3ae8f9fd9880e4284):\n  you will have to check `yajl` out in this location `libyajl2-gem/ext/libyajl/vendor/yajl`\n- `bundle install`\n- `rake prep`\n- `rake gem`\n- `gem install --local ./pkg/libyajl-1.2.0.gem`\n\nOnce these steps are complete, you may go back to `omnibus/` in the agent repo and run\n`bundle install` or `bundle update` once again.\n\nIf you got here you're doing good and you're almost ready to go.\n\n##### Build Runtime Requirements + Troubleshooting\n\n- Make sure the ulimits are high enough if you receive out of memory errors (check them with `ulimit -a`):\n  - `ulimit -m unlimited` (for `max memory size`)\n  - `ulimit -s unlimited` (for `stack size`)\n  - `ulimit -d unlimited` (for `data seg size`)\n- Make sure you have enough space in `/opt` for the requirements + build. (check with `df -m`, increase with `chfs -a size=+2G /opt`)\n- Make sure you have enough space in `/var` for the omnibus build\n- Omnibus uses git, make sure you have configured git username, etc.\n- If you have issues installing `gcc` 6.3.0, you might need to manually remove `gcc-locale`\nbefore attempting the upgrade if `gcc` is already installed on your system..\n- Set the `PATH`: `export PATH=\"/opt/freeware/bin:$PATH\"`\n- Set the `CONFIG_SHELL`: `export CONFIG_SHELL=\"/bin/bash\"`\n- Set the `TERM`: for convenience `export TERM=xterm`\n\n\n*Note*: please note that the `omnibus-ruby` installer currently requires the `datadog-5.5.0-aix`\nbranch on AIX. That will probably be merged to `master`, but currently is required. No need\nfor the developer to do anything as that specific branch is the current default for AIX builds.\n\n*Note*: You can override `omnibus-ruby` gem version if necessary with\nthe `OMNIBUS_RUBY_VERSION` variable - followed by a `bundle update`.\n\n#### Building\n\nTriggering a build is the easiest part, typically:\n```\nbundle exec omnibus build agent --log-level=info\n```\n\n### Integrations\n\nThe agent has two types of checks or integrations.\n  - Core checks: built into the agent.\n  - Wheel checks: additional integrations we may package, bundle and install on an\n  agent environment.\n\nHere, we will mostly discuss wheel checks, as they provide the natural facilities to\nextend the agent.\n\nAll checks (both core and whell) depend on the AgentCheck base class, shipped in the\nproject's `checks.agent_check` module, and will inherit from it. This base class will\nship with the agent and can be considered part of the environment, wheel checks can\nexpect its availability.\n\nThe pattern for the wheel checks has been taken from [integrations-core](https://docs.datadoghq.com/developers/integrations/),\nso if you're familiar with that, you should be able to hit the ground running.\n\nA check wheel `foo` should have the following skeleton:\n\n```\nchecks/bundled/foo/README.md                                    # check README.\nchecks/bundled/foo/setup.py                                     # python package setup.\nchecks/bundled/foo/tests/                                       # tests - we use pytest.\nchecks/bundled/foo/datadog_checks/__init__.py                   # namespace module init - note: this file is not shipped with the wheel. \nchecks/bundled/foo/datadog_checks/foo/__about__.py              # foo module about - includes version info.\nchecks/bundled/foo/datadog_checks/foo/__init__.py               # foo module init.\nchecks/bundled/foo/datadog_checks/foo/foo.py                    # foo check implementation.\nchecks/bundled/foo/datadog_checks/foo/data/conf.yaml.example    # sample configuration.\nchecks/bundled/foo/pytest.ini                                   # any additional pytest config.\nchecks/bundled/foo/requirements-dev.txt                         # (optional) any additional dev requirements.\n```\n\nPlease take a look at any of the bundled checks [here](https://github.com/DataDog/datadog-unix-agent/tree/master/checks/bundled)\nfor inspiration.\n\n_Note:_ JMXFetch is included in the build but is not officially supported (the AIX Agent does not\ninclude the facilities to configure and start JMXFetch).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadog%2Fdatadog-unix-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadog%2Fdatadog-unix-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadog%2Fdatadog-unix-agent/lists"}