Could not send data using Synthesize with Vagrant

Asked by Agustina on 2016-11-23

Hi!
I've successfully installed Synthesize in Vagrant, I am able to see the Graphite dashboard at https://127.0.0.1:8443/ but I could not see the data I send.

I've just run this in the terminal:

echo "foo.bar 1 `date +%s`" | nc localhost 8443

But there isn't any "foo.bar" metric.

What am I doing wrong?

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
2016-11-23
Last reply:
2016-11-23

This question was reopened

Jason Dixon (jason-dixongroup) said : #1

Hi Agustina,

You're sending metrics to the wrong port. The port mappings are listed at https://github.com/obfuscurity/synthesize#vagrant but it's assumed that users are already familiar with the purpose of each. Here's a quick breakdown:

guest: 443, host: 8443 --> apache (graphite-web, used for web/api)
guest: 8125, host: 8125 --> statsite (statsd, used for metrics aggregation)
guest: 2003, host: 22003 --> carbon-cache (plaintext, where you want to send your metrics with nc)
guest: 2004, host: 22004 --> carbon-cache (pickle protocol, used among carbon services or other pickle-compatible clients)

So you really want to send your nc connection to port 2003 if you're *inside* the vagrant box, or 22003 from the host system (or elsewhere).

Thanks,
Jason

Agustina (abriv) said : #2

Great! My mistake... Thanks!

Agustina (abriv) said : #3

Sorry, I need another answer...

Is Vagrant configure to can send UDP messages?

I'm trying to user this graphite client for nodejs: https://www.npmjs.com/package/graphite-udp and I don't see the metrics I send.

Here is my code:

var graphite = require('graphite-udp')
var metric = graphite.createClient({
  prefix: '',
  interval: 5000,
  port: 22003,
  verbose: true,
  callback: function(error, metrics) {
    console.log('Metrics sent\n'+ metrics);
    console.log('Errors\n'+ error);
  }
})

metric.add('my.test.metric1', 10) // add 10
metric.add('my.test.metric1', 20) // add 20 (previous 10 + 20 = 30)

Any help would be much appreciated.

Thanks!

Jason Dixon (jason-dixongroup) said : #4

Carbon-cache does not listen for UDP packets by default. You'll need to update your carbon.conf to enable ENABLE_UDP_LISTENER for the affected Carbon services.

P.S. In the future please avoid adding questions to an already solved issue.

Can you help with this problem?

Provide an answer of your own, or ask Agustina for more information if necessary.

To post a message you must log in.