Is there a very simple graphite tutorial available somewhere?

265 Views Asked by At

Given that I have Graphite installed within Docker, does anyone know of a very simple graphite tutorial somewhere that shows how to feed in data, then plot the data on a graph in Graphite Webapp? I mean the very basic things and not the endless configurations and pages after pages of setting various components up.

I know there is the actual Graphite documentation but it is setup after setup after setup of the various components. It is enough to drive anyone away from using Graphite.

Given that Graphite is running within Docker, as a start I just need to know the step of feeding in data using text, display the data in Graphite Web App, and query the data back.

2

There are 2 best solutions below

0
On

---> Suggestion: Might need to use "date -u %s" rather than "date %s". <----- When I spun up the graphite docker container ... I found that it used UTC time, but I ran the command above (echo "local.random.diceroll $RANDOM date +%s" | nc -q 1 ${SERVER} ${PORT}) on my host ... and it was using my local time. The graph was empty (though the scaling reflected the data sent), because the "past 2 hours" UTC is not the same as my past 2 hours in local time.

2
On

I suppose that you containerized and configured all the graphite components.

First, be sure that you published plaintext and pickle port if you plan to feed graphite from the local or external host. (default: 2003-2004 )

After that, according to the documentation you can perform a simple Netcat command to send metrics over TCP/UDP to carbon with the format <metric path> <metric value> <metric timestamp>

while true; do
echo "local.random.diceroll $RANDOM `date +%s`" | nc -q 1 ${SERVER} ${PORT}
done

You should see in graphite-web GUI the path local/rando/diceroll generated with a graph of random integers.

Ref: https://graphite.readthedocs.io/en/latest/feeding-carbon.html