Coder Social home page Coder Social logo

g_met's Introduction

XMet

XMet is to solve the following pains:

  • Various metric solutions bring the hard problems of maintaining. Even, the whole group uses unified data aggregation and demonstration solution such as: ELK (ElasticSearch LogStach Kibana) or EFK (ElasticSearch FluentD Kibana). Because, the way to report metric log/data and the format of log/data are normally different.

  • The inefficient metric data creating and extracting ways take huge CPU resource.

  • So many different configurations (fluentD configurations, elasticsearch mappings), which are hard to maintain.

  • Creating metric monitor is a time-consuming task, which needs to write and debug the configurations for the related systems (fluentD, elastic search)

XMet is to help you create the program running metrics quickly and easily.

  • Easy to use. To send the metrics, just one line code is needed.
  • Easy to extend. GMet is based on the plugin structure, it is open to extend and by ioslated with the abstract layer, the changes are transparent to the clients.
  • Easy to maintain. Use the unified API to avoid varied and messy implementations. Deal with different strategies on log and metric data by separating them.

GMet is the golang API of XMet.

//The following example is to demonstrate how to use GMet.
func main() {
	//create GMet instance by given default writer and the formatter
	gmet := CreateGMetInstanceByDefault("../configs/g_met_seelog/g_met_log.xml")
	for i := 0; i < 100; i++ {
		gmet.Send(Metric("input_bytes", rand.Intn(100)),
			Metric("output_bytes", rand.Intn(100)))
		gmet.Flush() //in your real case, DON'T flush for each sending.
		//For seelog writer, the auto-flushing can be set in the log configuration
		time.Sleep(time.Second * 1)

	}
}

For the example, please, refer to https://github.com/easierway/g_met_example/blob/master/main/g_met_examples.go

g_met's People

Contributors

liuzoxan avatar chaocai2001 avatar lzxbill7 avatar

Watchers

James Cloos avatar  avatar

Forkers

lingling1420q

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.