0

I need to push cpu info to OpenTSDB server using golang.

What is the procedure to send data in golang?

In which package should use the sent Data? (websocket or http)

In which format should I send the data?

What method should I use for pushing the data? (POST OR GET)

2
  • 1
    Have you tried this github.com/bodji/gopentsdb ? Commented Jan 6, 2016 at 11:39
  • Thanks Abhijeet. Is it possible to send disk usage, cpu usage memory info? Commented Jan 6, 2016 at 12:28

1 Answer 1

1

You can use https://github.com/shirou/gopsutil package to gather metrics then use http package to push data to your backend using a POST request with a json body. Have a look to this thread for posting data with golang : How do I send a JSON string in a POST request in Go.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.