Logo ByteGopher
Logo Inverted Logo
  • Posts
  • Blog
  • CloudNative
  • Infrastructure
    • TimeSeriesDB
  • Kubernetes
  • Note C
  • Note Go
  • React
  • Tips
  • Nodus
  • Interview
  • Life
  • Linux
Hero Image
「Prom」Prometheus 安装及使用简介

Prometheus Intro Prometheus 是SoundCloud开源的系统监控和报警工具集。通过Prometheus可以进行时序数据的采集、监控和报警。 时序数据模型 Time Series Data Model Metric 是一个对时序指标的统称,例如.:http_requests_total - the total number of HTTP requests received,就可以称为一条Metric 在Prometheus 中每一个时序序列(time-series)都是由于Metric Name 和Lable{Key-Value}组成的 例如: 1http_request_total{url="/ping",status=200} Metric Name: http_request_total 在Prometheus中Metric Name只能由大小写字母、数字、下划线、冒号组成,且不能以数字开头,对应正则为[a-zA-Z_:][a-zA-Z0-9_:]*。冒号保留,会在定义规则的时候使用。 Label Name: host 和status都属于Label. 在Prometheus中Label Name只能由大小写字母、数字、下划线组成,且不能以数字开头,对应的正则为[a-zA-Z_][a-zA-Z0-9_]*。一般_开头的Labels保留位系统内部使用。 Notation Given a metric name and a set of labels, time series are frequently identified using this notion: 1<Metric Name>{<Label Name>=<Label Value>,...} For example, a time series with the mertric name api_http_request_total and the label method="POST" and handler=“message”` could be written like this.

December 11, 2021 Read
Hero Image
post

https://www.cnblogs.com/-flq/p/9519276.html https://www.cnblogs.com/xuwujing/archive/2020/02/29/12385903.html https://www.elastic.co/guide/en/elasticsearch/client/go-api/current/index.html https://www.jianshu.com/p/6e28c967d872

September 9, 2020 Read
Hero Image
「ElasticSearch」 ElasticSearch 简单查询

查询语句 query bool must exist “exists”: { “field”: “name” } 判断字段是否存在 must_not match “match”: { “tweet”: “elasticsearch” } 匹配字符串中是否包含 should Filter 简单查询 查询某个字段是否存在或者是否为null 1curl -H 'Content-type: application/json' -XPOST 'http://ip:9200/alert_group/_search' -d 1{ 2 "query": { 3 "bool": { 4 "must": { // must_not 5 "exists": { 6 "field": "name" // 必须存在该字段,且该字段不为null 7 } 8 } 9 } 10 } 11} 空查询(empty search) {}在功能上等价于使用 match_all 查询, 正如其名字一样,匹配所有文档: 1curl -X GET "localhost:9200/_search?pretty" -H 'Content-Type: application/json' -d' 2{ 3 "query": { 4 "match_all": {} 5 } 6} 7' Match 1GET /_search 2{ 3 "query": { 4 "match": { 5 "tweet": "elasticsearch" 6 } 7 } 8} 复合查询 组合多条件查询。elasticsearch提供bool来实现这种需求;

September 7, 2020 Read
Hero Image
「Mongo」Bson vs Json

https://docs.mongodb.com/manual/reference/bson-types/ http://bsonspec.org/ https://www.mongodb.com/json-and-bson https://www.educba.com/json-vs-bson/\ https://www.geeksforgeeks.org/difference-between-json-and-bson/

August 20, 2020 Read
Hero Image
「ElasticSearch」ElasticSearch安装

1. Docker 安装ElasticSearch 1docker search elasticsearch 1docker pull elasticsearch # 默认会拉取 latest 版本 2docker pull elasticsearch:6.8.11 # https://hub.docker.com/ 版本查找 3docker images # 查看本地images 1 docker run -d --name elasticserarch_1 -p 9200:9200 -p 9300:9300 elasticsearch:6.8.11 1docker ps 1curl http://devbox:9200/ 2. docker 安装Cerebro 1docker search cerebro # test 1docker pull lmenezes/cerebro 1docker run -d -p 9002:9000 \ 2--restart=unless-stopped \ 3--name cerebro \ 4-v /etc/localtime:/etc/localtime \ 5-v cerebro:/opt/cerebro \ 6-h cerebro \ 7lmenezes/cerebro 86f036de7c87672903c88f6590d40d052e8c7b79767e410e35b1f2162c268b63f docker run 参数说明

August 18, 2020 Read
Hero Image
「Kafka」Kafka安装

August 17, 2020 Read
Hero Image
「LogStash」LogStash安装

August 17, 2020 Read
Hero Image
「Mongo」Mongo golang sdk

mongo 基本数据类型 Type bosun.E type E struct { Key string Value interface{} } E represents a BSON element for a D. It is usually used inside a D. bosun.D type D []E D is an ordered representation of a BSON document. This type should be used when the order of the elements matters, // such as MongoDB command documents. If the order of the elements does not matter, an M should be used instead.

August 17, 2020 Read
Hero Image
「TSDB」术语

RRD(Round Robin Database) RRD 数据库在创建的时候就已经定义好了大小,当存储空间满了之后,又从头开始覆盖旧的数据,适用于存储和时间序列相关的数据。RRD的大小可控,且不用维护。 A specialized storage system known as a Round Robin Database allows one to store large amounts of series information such as temperatures, network bandwidth, and stock prices with a constant disk footprint. It does this by taking advantage of changing needs for precision. As we will see later, the “round-robin " part comes from the basic data structure used to store data points: circular lists.

August 10, 2020 Read
Hero Image
「HBase」 简介

HBase 简介 OpensTSDB支持多种底层存储,例如HBase、Cassandra。 HBase是分布式列存储系统,其底层依赖HDFS分布式文件系统。HBase是参考Google BigTable模型开发的,本质上是一个典型的KV存储,适用于海量结构化数据的存储。 HBase的优点: 集群部署,横向扩展方便 容错性高,相同的数据会复制多份,放到不同的节点上 同等硬件,相比传统数据库支持的数量级高 吞吐能力强,写入量高 不足: 只支持单行的事务 查询方式: 只能通过RowKey进行查询或者扫描 HBase 和HDFS的关系? 全面事务

August 7, 2020 Read
Hero Image

1 docker run -d -p 27017:27017 --name mongo_4_4_2 mongo:4.4.2 mongosh 命令行client https://docs.mongodb.com/mongodb-shell/install 1If you need to have node@14 first in your PATH run: 2 echo 'export PATH="/usr/local/opt/node@14/bin:$PATH"' >> ~/.zshrc 3 4For compilers to find node@14 you may need to set: 5 export LDFLAGS="-L/usr/local/opt/node@14/lib" 6 export CPPFLAGS="-I/usr/local/opt/node@14/include" mongo doc https://mongoing.com/docs/tutorial/query-documents.html

January 1, 0001 Read
Hero Image
「Consul」Consul

什么是consul Consul是用来做什么的 服务如何注册到Consul,以及如何进行服务发现 Consul部署 基于docker部署 node consul-server server consul-1 client consul-2 client 1docker run -d -p 8500:8500 -e CONSUL_BIND_INTERFACE=eth0 --name consul-server consul:1.9.4 2docker run -d -e CONSUL_BIND_INTERFACE=eth0 --name consul-1 consul:1.9.4 agent -dev -join=172.17.0.13 3docker run -d -e CONSUL_BIND_INTERFACE=eth0 --name consul-2 consul:1.9.4 agent -dev -join=172.17.0.13 4 5# docker stop consul-server consul-1 consul-2 6# docker rm consul-server consul-1 consul-2 Tips: 查看consul-server ip 1 docker exec -t consul-server ifconfig 可以通过8500端口访问UI Server: Client:

January 1, 0001 Read
  • ««
  • «
  • 1
  • 2
  • »
  • »»
Navigation
  • About
  • Skills
  • Recent Posts
  • My Story
Contact me:
  • renqiqiang@outlook.com

Stay up to date with email notification

By entering your email address, you agree to receive the newsletter of this website.

Toha Theme Logo Toha
© 2020-2022 Copyright.
Powered by Hugo Logo