加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

Python之路,Day20 - 分布式监控系统开发

发布时间:2020-12-17 00:05:39 所属栏目:Python 来源:网络整理
导读:本节内容 为什么要做监控?? 常用监控系统设计讨论 监控系统架构设计 监控表结构设计 为什么要做监控?? 监控系统需求讨论 1.可监控常用系统服务、应用、网络设备等 2.一台主机上可监控多个不同服务、不同服务的监控间隔可不同 3.同一个服务在不同主机上的监

本节内容

为什么要做监控??

常用监控系统设计讨论

监控系统架构设计

监控表结构设计

为什么要做监控??

监控系统需求讨论

1.可监控常用系统服务、应用、网络设备等
2.一台主机上可监控多个不同服务、不同服务的监控间隔可不同
3.同一个服务在不同主机上的监控间隔、报警阈值可不同
4.可以批量的给一批主机添加、删除、修改要监控的服务
5.告警级别:
6.历史数据 的存储和优化

7. 数据可视化,如何做出简洁美观的用户界面?

8.如何实现单机支持5000+机器监控需求?
9.采取何种通信方式?主动、被动?
10.如何实现监控服务器的水平扩展?
?
?

采用什么架构?

?Mysql
?主动通信? Snmp,wget…
?被动通信?Agent ---how to communicate with the monitor server
?Socket server –>? Sockect client
?能否用现成的c/s架构? Rabbit mq,redis 订阅发布, http ?
?

采用HTTP好处

1.接口设计简单

2.容易水平扩展做分布式

3.Socket稳定成熟,省去较多的通信维护精力

Http特性:

1.短连接

2.无状态

3.安全认证

4.被动通信

监控系统架构设计

?

django.db name = models.CharField(max_length=64,unique= ip_addr = models.GenericIPAddressField(unique= host_groups = models.ManyToManyField(,blank=True) templates = models.ManyToManyField(,blank=True) monitored_by_choices = (, (, (, monitored_by = models.CharField(u,max_length=64,choices= status_choices= (1, (2, (3, (4, status = models.IntegerField(u,choices=status_choices,default=1 memo = models.TextField(u,blank=True,null= name = models.CharField(max_length=64,unique= templates = models.ManyToManyField(,blank= memo = models.TextField(u,null= name = models.CharField(max_length=64 key =models.CharField(max_length=64 data_type_choices = (, (, (, data_type = models.CharField(u,max_length=32,choices=data_type_choices,default= memo = models.CharField(u,max_length=128,null= % name = models.CharField(u,unique= interval = models.IntegerField(u,default=60 plugin_name = models.CharField(u,default= items = models.ManyToManyField(,verbose_name=u,blank= memo = models.CharField(u,null= name = models.CharField(u,unique= services = models.ManyToManyField(,verbose_name=u triggers = models.ManyToManyField(,verbose_name=u,blank= ')) trigger = models.ForeignKey(,verbose_name=u service = models.ForeignKey(Service,verbose_name=u service_index = models.ForeignKey(ServiceIndex,verbose_name=u specified_index_key = models.CharField(verbose_name=u,null= operator_type_choices = ((,),(,),(, operator_type = models.CharField(u,max_length=32 data_calc_type_choices = (, (, (, (, data_calc_func= models.CharField(u,max_length=64 data_calc_args = models.CharField(u,help_text=u,max_length=64 threshold = models.IntegerField(u logic_type_choices = ((,),(, logic_type = models.CharField(u,null= % name = models.CharField(u,max_length=64 severity_choices = (1, (2, (3, (4, (5, severity = models.IntegerField(u,choices= enabled = models.BooleanField(default= memo = models.TextField(u,null= % name = models.CharField(max_length=64,unique= host_groups = models.ManyToManyField(,blank= hosts = models.ManyToManyField(,blank= conditions = models.TextField(u interval = models.IntegerField(u,default=300 operations = models.ManyToManyField( recover_notice = models.BooleanField(u,default= recover_subject = models.CharField(max_length=128,null= recover_message = models.TextField(blank=True,null= enabled = models.BooleanField(default= name = models.CharField(max_length=64 step = models.SmallIntegerField(u,default=1 action_type_choices = (, (, (, action_type = models.CharField(u,choices=action_type_choices,default=,max_length=64 name = models.CharField(max_length=64,unique= hosts = models.ManyToManyField(,blank= host_groups = models.ManyToManyField(,blank= content = models.TextField(u start_time = end_time =

<div class="O1">?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读