Diag - Auto Diagdnosis error log for golang

Diag

1:自动诊断产品日志中的报错信息,进行知识库比对,并给出解决方案 \n 2:prometheus 本地数据 api 拉取展示,应对 sm0.2 版本或者无法上报指标的场景 \n

示例

[PROD Orz sa_cluster@hybrid01 Diag]$ go run main.go -h
SRE Auxiliary Tool

Usage:
  sreadmin [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  logcheck    matching knowledge's error,auto give you answers!
  prometheus  Get Prometheus Local Data

Flags:
  -h, --help   help for sreadmin

Use "sreadmin [command] --help" for more information about a command.

1:自动诊断功能

[PROD Orz sa_cluster@hybrid01 Diag]$ go run main.go logcheck -p sdf -h
matching knowledge's error,auto give you answers!

Usage:
  sreadmin logcheck -p [production] [flags]

Flags:
  -h, --help                help for logcheck
  -m, --match_rate string   matching rate, default 80% (default "80")
  -p, --production string   production name (default "sdf")
  -s, --skip_words string   skip the number of different words (default "3")

2:prometheus 本地数据 api 拉取展示

[PROD Orz sa_cluster@hybrid01 Diag]$ go run main.go prometheus -h
Get Prometheus Local Data

Usage:
  sreadmin prometheus -b '2021-12-05 08:00:00' -e '2021-12-05 11:11:00' -s 5m [flags]

Flags:
  -b, --begin_time string   start_time (default "2021-12-02 08:00:00")
  -e, --end_time string     end_time (default "2021-12-02 10:00:00")
  -h, --help                help for prometheus
  -s, --step string         step (default "5m")
Similar Resources

Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang

中文文档 Gmqtt News: MQTT V5 is now supported. But due to those new features in v5, there area lots of breaking changes. If you have any migration problem

Jan 5, 2023

An SNMP library written in GoLang.

gosnmp GoSNMP is an SNMP client library fully written in Go. It provides Get, GetNext, GetBulk, Walk, BulkWalk, Set and Traps. It supports IPv4 and IP

Jan 7, 2023

A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC

 A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC

Introduction kcp-go is a Production-Grade Reliable-UDP library for golang. This library intents to provide a smooth, resilient, ordered, error-checked

Dec 28, 2022

Simple mDNS client/server library in Golang

mdns Simple mDNS client/server library in Golang. mDNS or Multicast DNS can be used to discover services on the local network without the use of an au

Jan 4, 2023

Easy SSH servers in Golang

gliderlabs/ssh The Glider Labs SSH server package is dope. —@bradfitz, Go team member This Go package wraps the crypto/ssh package with a higher-level

Dec 28, 2022

Golang Super Simple Load Balance

SSLB (Super Simple Load Balancer) ver 0.1.0 It's a Super Simple Load Balancer, just a little project to achieve some kind of performance. Features Hig

Dec 18, 2022

golang tcp server

TCPServer Package tcp_server created to help build TCP servers faster. Install package go get -u github.com/firstrow/tcp_server Usage: NOTICE: OnNewMe

Dec 28, 2022

A LWM2M Client and Server implementation (For Go/Golang)

Betwixt - A LWM2M Client and Server in Go Betwixt is a Lightweight M2M implementation written in Go OMA Lightweight M2M is a protocol from the Open Mo

Dec 23, 2022

Simple hosts file management in Golang (deprecated).

Simple hosts file management in Golang (deprecated).

Goodhosts (deprecated) This library is now deprecated. See the goodhosts organisation for the current maintained version. Simple hosts file (/etc/host

Mar 17, 2022
Related tags
Socketlogger allows multiple processes to log to a shared log file between processes.
Socketlogger allows multiple processes to log to a shared log file between processes.

socketlogger socketlogger is a language agnostic logging utility designed to allow mulitple applications, running on one or multiple computers, to wri

Dec 7, 2021
Prisma Client Go is an auto-generated and fully type-safe database client

Prisma Client Go Typesafe database access for Go Quickstart • Website • Docs • API reference • Blog • Slack • Twitter Prisma Client Go is an auto-gene

Jan 9, 2023
RPC over libp2p pubsub with error handling

go-libp2p-pubsub-rpc RPC over libp2p pubsub with error handling Table of Contents Background Install Usage Contributing Changelog License Background g

Dec 14, 2022
socks5 proxy server with auto upstream selection

atproxy socks5 proxy server with auto upstream selection installation go install github.com/reusee/atproxy/atproxy@master select process for each cli

Dec 22, 2021
A simple Go library to toggle on and off pac(proxy auto configuration) for Windows, MacOS and Linux

pac pac is a simple Go library to toggle on and off pac(proxy auto configuration

Dec 26, 2021
OpenTelemetry auto-instrumentation for Go applications

OpenTelemetry Auto-Instrumentation for Go This project adds OpenTelemetry instrumentation to Go applications without having to modify their source cod

Dec 18, 2022
Hprose 1.0 for Golang (Deprecated). Hprose 2.0 for Golang is here:

Hprose for Golang Introduction Installation Usage Http Server Http Client Synchronous Invoking Synchronous Exception Handling Asynchronous Invoking As

Dec 15, 2022
A Minecraft scanner written in Golang (first Golang project)

__ __/ \__ Gothyc A Minecraft port scanner written in Go. ?? / \__/ \__ \__/ \__/ \ Version 0.3.0 \__/ \__/ Author @toas

Nov 6, 2022
Fast IP to CIDR lookup in Golang
Fast IP to CIDR lookup in Golang

cidranger Fast IP to CIDR block(s) lookup using trie in Golang, inspired by IPv4 route lookup linux. Possible use cases include detecting if a IP addr

Dec 30, 2022
High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング
High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング

gaio Introduction 中文介绍 For a typical golang network program, you would first conn := lis.Accept() to get a connection and go func(net.Conn) to start a

Dec 29, 2022