Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Quick doc update for spoofing hostnames #3

merged 2 commits into from

2 participants


It's not clear from the documentation how to spoof a hostname, or what format the :hostname value should be in. I found out via trial and error (read netcat and gmond logs) that its not override_hostname [1] that is being set, but rather spoof, which expects the field to be specified in the format IP_ADDRESS:HOSTNAME

Since GMetric will not validate the format of the hostname key as being in the expected format, setting just hostname results in the gmond recipient dropping your metrics on the floor for having an invalid spoof hostname.

@igrigorik igrigorik merged commit 52f0170 into from


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 3, 2012
  1. @irabinovitch

    document how to spoof

    irabinovitch authored
  2. @irabinovitch

    fix formating

    irabinovitch authored
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 1 deletion.
  1. +10 −1
@@ -16,7 +16,6 @@ Ganglia::GMetric.send("", 8670, {
:dmax => 300,
:group => 'test'
## Example: Generating the Meta and Metric packets
@@ -38,8 +37,18 @@ s =
s.connect("", 8670)
s.send g[0], 0
s.send g[1], 0
+## Spoofing a hostname in gmetrics ##
+To spoof a hostname with the gmetric library you will need to add the following keys to your gmetric.
+This works with both GMetric.send() and GMetric.pack().
+* spoof - takes a value of 1 or True
+* hostname - expects a value of ip_address:hostname.
### License
The MIT License, Copyright (c) 2009 Ilya Grigorik
Something went wrong with that request. Please try again.