Table of Contents
Introduction
We are happy to announce our latest project at MetricFire: a brand-new CLI tool! Get ready to start monitoring your systems in one step - no need to modify any configuration files manually. Just run a terminal command, follow the prompts, and forward your system metrics to Hosted Graphite in minutes.
In this article, we’ll share an overview of the Hosted Graphite CLI, why we’re making it, and how we’re making it. We’ll also show how it will work when it is complete and talk about our goals for developing it even more to make this something really useful for any engineer!
Get Early Access!
Be the first to try MetricFire’s CLI tool and shape its future development. Join the discussion, share your feedback, and start monitoring effortlessly. Check out our documentation for even more detailed information. We’d love your feedback!
👉 Sign up for early access now!
Why We’re Building HG-CLI
We wanted to make onboarding as smooth as possible for users who’ve never installed an agent before. With HG-CLI, our goal at MetricFire was to provide a quick and easy way to install an agent, start collecting meaningful metrics, and see the data in a dashboard within minutes.
While installing an agent isn’t too difficult, it involves multiple steps. The Telegraf config file is large and can be tricky to format, especially when enabling additional features that require extra configuration. Users often have to dig through settings, find the right options, and manually format everything correctly. To simplify this, we set out to build a one-step solution that handles the heavy lifting for the monitoring and observability community:
- Zero Manual Configurations – Automatically configures Telegraf and other monitoring agents, removing the need to edit intimidating config files.
- Fast & Easy Setup – Install, update, and manage agents within minutes, saving up to an hour of research and troubleshooting.
-
Cross-Platform Compatibility – Detects your operating system and package manager, ensuring seamless installation on macOS, Linux, and Windows.
-
Default & Custom Modes – Get started instantly with pre-configured settings or customize your setup for specific monitoring needs.
-
Live Installation Feedback – Streamed updates keep you informed during the installation process, removing uncertainty.
-
Integrated Documentation – Clear guidance on where your metrics are being sent and how to access them in Grafana.
How We Are Building HG-CLI
This project began with a single objective, but the overall vision increased over time. Initially, our team wanted to make a quick installation script for Telegraf since Telegraf is our recommended agent. However, we decided the project could be expanded into a more robust tool for learning and managing the Hosted Graphite platform.
It was built in Go and uses Cobra for the CLI management, making command execution flexible and straightforward. The TUI (Text User Interface) is handled separately with a Bubbletea framework, which allows users to configure Telegraf and select plugins interactively. For better maintainability, OS sniffing, agent installation, and utility functions were also broken into their packages. A Makefile was added for easy builds, and recent updates focused on improving Windows compatibility, refining error handling, and streamlining the user experience. The project is still evolving, but the foundation is solid, efficient, and built to make agent installation easy and, dare we say - fun!
How to Use
With HG-CLI, you can install Telegraf with default or custom plugins, update API keys in existing configurations, and fine-tune your config with just a few flags. While the tool is still evolving, it’s already proving an easy way to quickly get Telegraf up and running.
Here’s how it will be used upon its March 2025 release:
Run the script in TUI mode (interactive UI), with:
hg-cli tui
To install Telegraf using CLI mode with the default setup:
hg-cli agent install telegraf --apikey <HG-API-KEY> --install default
For a custom install, specify the plugins you want:
hg-cli agent install telegraf --apikey <HG-API-KEY> --install custom --plugins cpu,disk,mem,system
To update an API key in an existing Telegraf config:
hg-cli agent update-apikey telegraf --apikey <HG-API-KEY> --config <config path>
To uninstall an agent:
hg-cli agent uninstall telegraf
Follow us on LinkedIn and X to get the official launch announcement!
Our Goals and Upcoming Features
Eventually, we’ll have other agents (such as OpenTelemetry) available in the CLI to give users more monitoring options. We will also implement a TUI to configure Telegraf input plugins. Users will select what they wish to enable, and the CLI will update the configuration file based on their input. In other words, a user would enter their service variables, endpoints, and URLs, and the CLI would handle the rest!
We also plan to add integrations with our HG APIs in the future to create annotations, alerts, aggregation rules, and more! This will be helpful for first-time users learning the platform's ins and outs and users who want to use it in their daily monitoring workflow.
-
Expanded Plugin Management – Simplified control over hundreds of Telegraf plugins, making customization easier than ever.
-
Support for Additional Agents – OpenTelemetry and other open-source monitoring solutions will be integrated.
-
AI-Powered Code Analysis – Future updates will include AI-assisted metric injection into source code, streamlining the setup of monitoring points.
Conclusion
At MetricFire, our goal is to make monitoring simple so developers can focus on making their products better. This new CLI will help us do that! If you are interested in beta testing, please reach out to us! We’d love to help you get started.
What are your thoughts? If you have a feature request or suggestion, contact our team! We love exploring possibilities to provide the best monitoring solution for your needs.