{"id":26057645,"url":"https://github.com/wavefronthq/wavefront-cli","last_synced_at":"2025-04-11T05:06:46.285Z","repository":{"id":43163647,"uuid":"74177756","full_name":"wavefrontHQ/wavefront-cli","owner":"wavefrontHQ","description":"Wavefront CLI Tool","archived":false,"fork":false,"pushed_at":"2023-09-27T10:50:44.000Z","size":193,"stargazers_count":5,"open_issues_count":3,"forks_count":8,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-11T05:06:39.051Z","etag":null,"topics":["linux","python","wavefront"],"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/wavefrontHQ.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-19T00:47:01.000Z","updated_at":"2024-02-25T15:58:46.000Z","dependencies_parsed_at":"2022-09-02T20:51:34.148Z","dependency_job_id":"e55906ec-df75-4ade-921b-1a0399463528","html_url":"https://github.com/wavefrontHQ/wavefront-cli","commit_stats":{"total_commits":86,"total_committers":13,"mean_commits":6.615384615384615,"dds":0.7093023255813953,"last_synced_commit":"e361d1b911dded37996397d2141b46a0af155bea"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavefrontHQ%2Fwavefront-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavefrontHQ%2Fwavefront-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavefrontHQ%2Fwavefront-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavefrontHQ%2Fwavefront-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wavefrontHQ","download_url":"https://codeload.github.com/wavefrontHQ/wavefront-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345265,"owners_count":21088244,"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":["linux","python","wavefront"],"created_at":"2025-03-08T11:58:12.550Z","updated_at":"2025-04-11T05:06:46.224Z","avatar_url":"https://github.com/wavefrontHQ.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wavefront-cli\n\n[![travis build status](https://travis-ci.com/wavefrontHQ/wavefront-cli.svg?branch=master)](https://travis-ci.com/wavefrontHQ/wavefront-cli)\n\n\nThe Wavefront Integration Command Line Interface (CLI) is a utility for installing and configuring the Wavefront proxy, Telegraf\ncollector agent, and integrations. The CLI uses native package managers to install packages (i.e. yum, apt-get) and therefore should be run as sudo.\n\n## Requirements\n\nThe Wavefront Integration CLI is currently supported on Linux environments only and is broadly compatible with:\n\n-   Amazon Linux AMI\n-   CentOS\n-   Debian\n-   RedHat Enterprise Linux\n-   Ubuntu\n-   SuSE Linux\n-   Oracle Linux\n-   Fedora\n\nThe lowest version of Python the CLI has been tested with is 2.6.6.\n\n## Installing Wavefront Integration CLI\n\nThe Wavefront Integration CLI is available on PyPI as a pip package. To install the CLI, run:\n\n```shell\n$ sudo pip install wavefront-cli\n```\n\n## Installing and Running Wavefront Integration CLI\n\nYou can install and run the Wavefront Integration CLI directly via `curl`. This is useful when you want to install the CLI, Wavefront proxy, and/or agent in a single command. Arguments added to the following command are passed to the CLI.\n\n```shell\n$ sudo bash -c \"$(curl -sL https://raw.githubusercontent.com/wavefronthq/wavefront-cli/master/sh/install.sh)\" --\n```\n\n## Usage\n\nTo invoke the Wavefront Integration CLI, run\n\n```shell\n$ sudo wave \u003ccommand\u003e\n```\n\nwhere `\u003ccommand\u003e` is `install`, `integration`, or `configure`. To see a full list of all options, run `wave -h`.\n\n### The Install Command\n\nThe most common use for the Wavefront Integration CLI is installing the Wavefront proxy and/or Telegraf. The `install` command\naccepts multiple options each of which accepts arguments. If a required argument is not passed to an option, the CLI\nprompts you for missing input. If all required arguments are passed, the CLI does not prompt for input.\n\nThe `install` command accepts one or more options:\n\n-   `--proxy` - Install and configure the Wavefront proxy on the current host.\n-   `--agent` - Install and configure Telegraf on the current host.\n-   `--aws` - Add [AWS EC2 metadata](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) to the Telegraf\nconfiguration as tags. Metrics from an EC2 instance are tagged with the EC2 tags, AWS region, the VPC ID, and Image ID of the EC2 instance.\n-   `--statsd` - Enable the Telegraf StatsD service plugin. You must also install Telegraf with the `--agent` option.\n\n### Install: Example Usage\n\nEach option has one or more arguments. If you do not provide a required argument, the CLI prompts for input.\n\nInstall a Wavefront proxy and Telegraf (the CLI prompts for required options):\n\n```shell\n$ sudo wave install --proxy --agent\n```\n\nInstall a Wavefront proxy and Telegraf agent with no prompts:\n\n```shell\n$ sudo wave install \\\n    --proxy \\\n        --wavefront-url=https://YOUR_INSTANCE.wavefront.com \\\n        --api-token=YOUR_API_TOKEN \\\n    --agent \\\n        --proxy-address=localhost \\\n        --proxy-port=2878\n```\n\n```shell\n$ sudo wave install \\\n    --proxy \\\n        --wavefront-url=https://YOUR_INSTANCE.wavefront.com \\\n        --csp-api-token=YOUR_CSP_API_TOKEN \\\n    --agent \\\n        --proxy-address=localhost \\\n        --proxy-port=2878\n```\n```shell\n$ sudo wave install \\\n    --proxy \\\n        --wavefront-url=https://YOUR_INSTANCE.wavefront.com \\\n        --csp-org-id=YOUR_CSP_ORG_ID \\\n        --csp-app-id=YOUR_CSP_APP_ID \\\n        --csp-app-secret=YOUR_CSP_APP_SECRET \\\n    --agent \\\n        --proxy-address=localhost \\\n        --proxy-port=2878\n```\n\nInstall the Wavefront proxy and Telegraf agent and configure AWS metadata and StatsD in Telegraf:\n\n```shell\n$ sudo wave install \\\n    --proxy \\\n        --wavefront-url=https://YOUR_INSTANCE.wavefront.com \\\n        --api-token=YOUR_API_TOKEN \\\n    --agent \\\n        --proxy-address=localhost \\\n        --proxy-port=2878 \\\n        --agent-tags=\"env=dev,app=myapp\"\n    --statsd \\\n        --statsd-port=8125 \\\n    --aws \\\n        --aws-region=us-west-2 \\\n        --aws-secret-key-id=YOUR_KEY_ID \\\n        --aws-secret-key=YOUR_SECRET_KEY\n```\n\n## The Integration Command\n\nThe `integration` command installs or removes a Wavefront integration. In most cases, this means generating a Telegraf\nconfig file in `/etc/telegraf/telegraf.d`.\n\n```shell\n$ sudo wave integration \u003cname\u003e (install|remove) [\u003coption\u003e...]\n```\n\n### Integration: Example Usage\n\nInstall StatsD service plugin on port 8215 (default) in Telegraf:\n\n```shell\n$ sudo wave integration StatsD install statsd_port=8125\n```\n\nInstall Wavefront output plugin in Telegraf to emit to a Wavefront proxy installed on localhost:2878:\n\n```shell\n$ sudo wave integration Wavefront install proxy_address=localhost proxy_port=2878\n```\n\n### Contributing Integrations\n\nThe `\u003cname\u003e` argument of the `integration` command creates an instance of a `wavefront_cli.integrations.Base` subclass\nmatching the `\u003cname\u003e` argument. When installing an integration, any arguments passed in the `[\u003coption\u003e...]` part of the\ncommand are passed to the subclass as a dictionary. This makes it possible to drop in new integrations. At a minimum,\nan integration subclass must implement the following methods:\n\n```python\nclass Example(Base):\n\n    def install(self):\n        return True\n\n    def remove(self):\n        return True\n\n    def validate_options(self):\n        return True\n```\n\nSee [`wavefront_cli/integrations/statsd.py`](https://raw.githubusercontent.com/wavefrontHQ/wavefront-cli/master/wavefront_cli/integrations/statsd.py) for a very simple example of an integration implementation.\n\n## The Configure Command\n\nThe `configure` command updates the Wavefront URL and API token.\n\n```shell\n$ sudo wave configure \\\n    --wavefront-url=https://YOUR_INSTANCE.wavefront.com \\\n    --api-token=YOUR_API_TOKEN \\\n```\n\n## Release Process\n\n`release.sh` packages and ships this module to PyPI. To create your own version and upload to your own PyPI project, edit `setup.py`.\n\n```shell\n$ ./release.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavefronthq%2Fwavefront-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwavefronthq%2Fwavefront-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavefronthq%2Fwavefront-cli/lists"}