All Projects → go-gorm → prometheus

go-gorm / prometheus

Licence: MIT license
Collect DB Status or user-defined metrics with Prometheus

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to prometheus

Cmall Go
golang写的电子商城的API接口
Stars: ✭ 167 (+77.66%)
Mutual labels:  gorm
Goweibo
Go Weibo App
Stars: ✭ 243 (+158.51%)
Mutual labels:  gorm
simple-mpesa
A simple example of how MPESA works. Works with all 3 types of customers i.e. Agents, Merchants and Subscribers. Allows you to configure a tariff and apply it to transactions. The project follows DDD principles.
Stars: ✭ 31 (-67.02%)
Mutual labels:  gorm
Go init
一个用go组织项目结构,主要包括 gin, goredis, gorm, websocket, rabbitmq等。👉
Stars: ✭ 183 (+94.68%)
Mutual labels:  gorm
Golang Project Structure
Golang Skeleton with fully version managed
Stars: ✭ 103 (+9.57%)
Mutual labels:  gorm
BEW-2.5-Strongly-Typed-Languages
💪 Learn and implement the design patterns and best practices that make Go a top choice at high-velocity startups like Lyft, Heroku, Docker, Medium, and more!
Stars: ✭ 14 (-85.11%)
Mutual labels:  gorm
Go Web
Modern Web Application with Golang
Stars: ✭ 138 (+46.81%)
Mutual labels:  gorm
gorm-paginator
gorm pagination extension
Stars: ✭ 154 (+63.83%)
Mutual labels:  gorm
Gorm Bulk Insert
implement BulkInsert using gorm, just pass a Slice of Struct. Simple and compatible.
Stars: ✭ 241 (+156.38%)
Mutual labels:  gorm
gorm-mongodb
GORM for MongoDB
Stars: ✭ 58 (-38.3%)
Mutual labels:  gorm
Go Mocket
Go GORM & SQL mocking library
Stars: ✭ 190 (+102.13%)
Mutual labels:  gorm
Fuckdb
From database generate go struct,help you fuck db fields
Stars: ✭ 195 (+107.45%)
Mutual labels:  gorm
opentracing-gorm
OpenTracing instrumentation for GORM.
Stars: ✭ 46 (-51.06%)
Mutual labels:  gorm
Goilerplate
Clean Boilerplate of Go, Domain-Driven Design, Clean Architecture, Gin and GORM.
Stars: ✭ 173 (+84.04%)
Mutual labels:  gorm
go-orm-code-helper
🔥🔥🔥go-orm-code-helper is a goland plugin, it aims to make gorm code getting more simple
Stars: ✭ 22 (-76.6%)
Mutual labels:  gorm
Gosql
golang orm and sql builder
Stars: ✭ 141 (+50%)
Mutual labels:  gorm
golang-example-app
Example application
Stars: ✭ 138 (+46.81%)
Mutual labels:  gorm
simple-wallet
This is a simple wallet REST api that is capable of acount deposits and withdrawals, checking for account balance and providing a ministatement. It follows domain driven design practices. The project uses the DDD architecture approach.
Stars: ✭ 32 (-65.96%)
Mutual labels:  gorm
grom
A powerful command line tool for converting mysql table fields to golang model structure.
Stars: ✭ 44 (-53.19%)
Mutual labels:  gorm
go-pangu
rest api web server based on go(High availability, high security, high performance)
Stars: ✭ 45 (-52.13%)
Mutual labels:  gorm

Prometheus

Collect DB Status with Prometheus

Usage

import (
  "gorm.io/gorm"
  "gorm.io/driver/sqlite"
  "gorm.io/plugin/prometheus"
)

db, err := gorm.Open(sqlite.Open("gorm.db"), &gorm.Config{})

db.Use(prometheus.New(prometheus.Config{
    DBName:          "db1", // `DBName` as metrics label
    RefreshInterval: 15,    // refresh metrics interval (default 15 seconds)
    PushAddr:        "prometheus pusher address", // push metrics if `PushAddr` configured
    StartServer:     true,  // start http server to expose metrics
    HTTPServerPort:  8080,  // configure http server port, default port 8080 (if you have configured multiple instances, only the first `HTTPServerPort` will be used to start server)
    MetricsCollector: []prometheus.MetricsCollector {
      &prometheus.MySQL{VariableNames: []string{"Threads_running"}},
 },
}))
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].