2019年12月16日

类方法,静态方法

摘要: class lianxi(): aa='this is text' #类属性 def test(self,name): #普通方法 print(self.aa) @classmethod def lei(cls): #类方法 print(cls.aa) @staticmethod def st(aa 阅读全文

posted @ 2019-12-16 22:54 星空6 阅读(249) 评论(0) 推荐(0)

pushgateway

摘要: 下载pushgateway wget https://github.com/prometheus/pushgateway/releases/download/v0.9.0/pushgateway-0.9.0.freebsd-amd64.tar.gz 解压缩:tar -zxvf pushgateway 阅读全文

posted @ 2019-12-16 17:26 星空6 阅读(452) 评论(0) 推荐(0)

node exporter

摘要: 在prometheus中负责数据汇报的程序统一叫做exporter; 负责主机信息收集的node_exporter 可以利用prometheus的static_configs来拉取node_exporter的数据; 在prometheus.yml文件的scrape_configs中添加如下配置: - 阅读全文

posted @ 2019-12-16 11:56 星空6 阅读(520) 评论(0) 推荐(0)

prometheus配置

摘要: 1.全部配置 global scrape_interval :15s #拉取targets的默认时间间隔; evaluation_interval : 15s #执行rules的时间间隔; 2.告警配置 alerting 3.规则配置 rule_files rule_files: - "rules. 阅读全文

posted @ 2019-12-16 11:30 星空6 阅读(277) 评论(0) 推荐(0)

prometheus数据可视化

摘要: 一、prometheus自带简单的web可视化页面; http://192.168.1.28:9090/graph 二、grafana是一套开源的分析监视平台,支持prometheus等数据源;UI非常漂亮; http://192.168.1.28:3000,默认账号admin/admin 在gra 阅读全文

posted @ 2019-12-16 10:27 星空6 阅读(1083) 评论(0) 推荐(0)

导航