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
  • Sending a metric via TCP
  • Sending a metric via UDP
  • Sending a metric via TCP over TLS
  • Sending a metric via HTTPs
  • Sending a metric via StatsD
  • Sending multiple metrics with Curl

Was this helpful?

  1. Language Guide

Shell

How to send metrics using Shell

PreviousRubyNextTypeScript

Last updated 1 year ago

Was this helpful?

Contents

Using the utility

echo "YOUR-API-KEY.foo 1.2" | nc carbon.hostedgraphite.com 2003

Using the utility

echo "YOUR-API-KEY.foo 1.2" | nc -uw0 carbon.hostedgraphite.com 2003

Using the utility

echo "YOUR-API-KEY.con_users 1.3" | ncat --ssl carbon.hostedgraphite.com 20030
echo "YOUR-API-KEY.con_users 1.3" |  openssl s_client -connect carbon.hostedgraphite.com:20030
curl https://YOUR-API-KEY@www.hostedgraphite.com/api/v1/sink --data-binary "foo 1.2"
echo "YOUR-API-KEY.foo.statsd:1.2|c" | nc -u -w1 statsd.hostedgraphite.com 8125

For StatsD, make sure to specify counters (c), gauges (g), or timers (ms).

curl https://YOUR-API-KEY@www.hostedgraphite.com/api/v1/sink --data-binary @data.txt

where data.txt contains multiple metrics and values on a separate line:

Alternatively, the following example using should work out of the box in OS X:

Using the utility

Using the utility:

Your API key can be found on your page.

OpenSSL
Curl
Ncat
account home
Shell
netcat
netcat
Ncat
Sending a metric via TCP
Sending a metric via UDP
Sending a metric via TCP over TLS
Sending a metric via HTTPs
Sending a metric via StatsD
Sending multiple metrics with Curl
Sending a metric via TCP
Sending a metric via UDP
Sending a metric via TCP over TLS
Sending a metric via HTTPs
Sending a metric via StatsD
Sending multiple metrics with Curl