Hosted Graphite Docs
Get StartedBook a Demo
  • Welcome to Hosted Graphite
  • Getting Started
  • HG-CLI
  • Sending Metrics
    • Supported Protocols
    • Graphite Tag Support
    • Metric Management
    • Metric APIs
  • Language Guide
    • Metric Libraries
    • .NET
    • Go
    • Java
    • Javascript
    • Node.js
    • PHP
    • Postman
    • Python 2.x
    • Python 3.x
    • Python Pickle
    • Ruby
    • Shell
    • TypeScript
  • Dashboard and Graphs
    • Primary Dashboards
    • Dashboard Library
    • Local Dashboard Integration
    • Worldmap Panel
    • Graphite Dashboard Guide
    • Graphite Graph Menu Reference
    • Other Dashboard Options
  • Alerting Guide
    • Alerting Overview
    • Alerts API
    • Notification Channels API
    • Scheduled Mutes API
    • Using Your Own Alerting
  • Agents Guide
    • The Hosted Graphite Agent
      • Base Metrics
      • System Layout
    • Telegraf
    • K8 Telegraf Daemon
    • OpenTelemetry
    • collectd Agent
    • StatsD Agent
    • Diamond
  • Add-Ons and Integrations Guide
    • AWS CloudWatch
    • Azure Monitor Metrics
    • GCP Metrics
    • Carbon-C-Relay
    • Circle CI
    • Cloudbees
    • Collectd Add Ons
    • GitHub
    • GitLab
    • Heroku
    • Hosted StatsD
    • New Relic
    • Papertrail
    • Pingdom
    • Sentry
    • Sitespeed
    • StatsD Add-on
    • Statuspage
  • Account Management
    • Access Keys
    • Account Diagnostics
    • Account Settings
    • Team Access: Limited Access Groups
    • SAML Authentication
    • Team Access
  • Additional Features
    • Aggregation Rules
    • Data Views
  • API Guides
    • Metrics API
    • Tag API
    • Graphite Render API
    • Render Variables API
    • Dashboard API
    • Annotations and Events API
    • Aggregation Rules API
    • Alerts APIs
  • FAQ
    • General
    • Business
    • Technical
    • Account Metrics and Limiting
    • Customization
    • Troubleshooting
    • Support
    • Changelog
Powered by GitBook
On this page
  • Installation
  • Quick Install
  • Homebrew
  • Linux
  • Windows (PowerShell)
  • Golang
  • Manual (Binaries)
  • Perform Checksum
  • HG-CLI Commands
  • Metrics and Visualizations

Was this helpful?

HG-CLI

Our recommended command line tool that's fun and easy-to-use - for installing and configuring agents in your systems.

PreviousGetting StartedNextSending Metrics

Last updated 21 days ago

Was this helpful?

Contents

Our HG command line tool is an interactive way to install an agent on your system, without ever needing to touch a configuration file! This tool currently supports and with more features on the roadmap, like Telegraf Plugin Configuration.

Once you've installed HG-CLI, you can run it as a TUI (Terminal User Interface) or in CLI (Command Line Interface) mode. See our list of commands below for all available installation options and command examples.

See our handy blog article for step-by-step details on how to get this up in running in just a couple of minutes.

You can find all current .

Run this command in your terminal (Linux/MacOS/Windows).

curl -s "https://www.hostedgraphite.com/scripts/hg-cli/installer/" | sudo sh

This will install the latest released version's binaries into your /usr/local/bin directory.

Add tap:

brew tap hostedgraphite/hgcli

Install:

brew install hg-cli

Ubuntu/Debian

curl -LO https://github.com/hostedgraphite/hg-cli/releases/download/v0.2.0/hg-cli_0.2.0_linux_amd64.deb
sudo dpkg -i hg-cli_0.2.0_linux_amd64.deb
curl -LO https://github.com/hostedgraphite/hg-cli/releases/download/v0.2.0/hg-cli_0.2.0_linux_arm64.deb
sudo dpkg -i hg-cli_0.2.0_linux_arm64.deb

RedHat/CentOS/Fedora

curl -LO https://github.com/hostedgraphite/hg-cli/releases/download/v0.2.0/hg-cli_0.2.0_linux_amd64.rpm
sudo rpm -i hg-cli_0.2.0_linux_amd64.rpm
curl -LO https://github.com/hostedgraphite/hg-cli/releases/download/v0.2.0/hg-cli_0.2.0_linux_arm64.rpm
sudo rpm -i hg-cli_0.2.0_linux_arm64.rpm
Invoke-WebRequest -Uri "https://github.com/hostedgraphite/hg-cli/releases/download/v0.2.0/hg-cli_0.2.0_windows_amd64.zip" -OutFile "hg-cli.zip"
Expand-Archive -Path "hg-cli.zip" -DestinationPath "C:\Program Files\hg-cli"
Invoke-WebRequest -Uri "https://github.com/hostedgraphite/hg-cli/releases/download/v0.2.0/hg-cli_0.2.0_windows_arm64.zip" -OutFile "hg-cli.zip"
Expand-Archive -Path "hg-cli.zip" -DestinationPath "C:\Program Files\hg-cli"

[Optional] Add to system PATH:

$env:BACKUPPATH = [Environment]::GetEnvironmentVariable("Path", "Machine")
$env:NEWPATH = [Environment]::GetEnvironmentVariable("Path", "Machine")
$env:NEWPATH += ";C:\Program Files\hg-cli"
[Environment]::SetEnvironmentVariable("Path", $env:NEWPATH, "Machine")
Update-SessionEnvironment

Install using go install

go install github.com/hostedgraphite/hg-cli

Example:

curl -L https://github.com/hostedgraphite/hg-cli/releases/download/<version>/hg-cli_<version>_<os>_<arch>.tar.gz
tar -xf hg-cli_<version>_<os>_<arch>.tar.gz
mv hg-cli /install/path (eg. /usr/local/bin)

Optional Step

Download the checksum.txt file from the releases listed assets.

sha256sum --ignore-missing --check checksums.txt
shasum -a 256 --ignore-missing --check checksums.txt

Once HG-CLI is installed, you can run it as a TUI application, or in CLI mode (for automated installs). Below are all available options and command examples for using this tool.

Run the interactive TUI application (recommended):

hg-cli tui

Run it in CLI mode with the default configuration:

hg-cli agent install telegraf --api-key <HG-API-KEY>

CLI mode for a custom install - to specify which plugins you want:

hg-cli agent install telegraf --api-key <HG-API-KEY> --plugins cpu,disk,mem

CLI mode to update an API key in an existing config (telegraf):

hg-cli agent update-apikey telegraf --api-key <HG-API-KEY> --config <config path>

To uninstall an agent (telegraf):

hg-cli agent uninstall telegraf

Available flags for CLI mode:

  • --api-key (required)

  • --plugins (plugins to be added during installation)

  • --config (config path for updating apikey - required)

  • --list (list available monitoring agents)

Once you have run the HG-CLI and installed an agent, the terminal output will show you that the installation was successful, which plugins were enabled, where your configuration file is located, and the command needed to start the service (required for collecting and forwarding metrics to your HG account).

Once the agent service has been started, you'll be able to locate your system metrics in our Metrics Search UI (with the telegraf prefix). Once telegraf.* or otel.* metrics have been sent to your account, a Telegraf/OpenTelemetry dashboard will be automatically created and can be located in your HG account (Dashboards ⇒ Telegraf/OpenTelemetry). This auto-dash offers a great starting point and can be customized further!

If you need help enabling additional plugins or have feedback on the HG-CLI tool, please send us a message: support@metricfire.com

You can use Homebrew to tap and install the HG-CLI packages for MacOS/Linux. This method supports AMD64/ARM64 architectures and the official GitHub tap can be found .

Locate the official release assets , and below are some example installation commands:

Locate the official release assets , and below are some example installation commands:

To manually install, download a preferred version (that matches your OS & ARCH), extract and move the binary file into a desired install location.

HERE
HERE
HERE
releases page
Telegraf installation
OpenTelemetry
HERE
releases on GitHub
Intstallation
Quick Install
Homebrew
Linux
Windows (PowerShell)
Golang
HG-CLI Commands
Metrics and Visualizations
Installation
Quick Install
Homebrew
Linux
Windows (PowerShell)
Golang
Manual (Binaries)
Perform Checksum
HG-CLI Commands
Metrics and Visualizations
hg-cli TUI Demonstration
HG-CLI Successful Output
Telegraf Auto-Dash
OpenTelemetry Auto-Dash