V
V
Vyacheslav Grachunov2018-08-04 00:53:37
linux
Vyacheslav Grachunov, 2018-08-04 00:53:37

No metrics sent to graphite. What am I doing wrong?

there is graphite on the standard port from docker from here https://hub.docker.com/r/graphiteapp/graphite-statsd/
metrics are not sent, running collectd does not write anything.
I tried to write something manually - also by zeros.
Like this script:

import graphitesend
from time import sleep
import random

g = graphitesend.init(graphite_server='127.0.0.1', prefix='generated')

w = 1
for i in range(360):
  metric3 = random.randint(0, 100)
  g.send_dict({'metric3': metric3})
  print('{i}. ({m3})'.format(i=i+1, m3=metric3))
  print('Wait {w} seconds...\n'.format(w=w))
  sleep(w)

It seems to work (if you turn off the container, it crashes with an error), but not a single metric in graphite.
What am I doing wrong and where should I look?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-08-06
@q2digger

What's in the container logs?
docker logs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question