大家好!
我想跟大家分享一个个人项目,该项目始于工作中的一个简单需求:**“能否知道我们使用了多少个Caché许可证?”**
在阅读社区的其他文章时,我发现了一篇[David Loveluck](https://community.intersystems.com/user/david-loveluck)写的非常棒的文章:[APM——使用Caché History Monitor](https://community.intersystems.com/post/apm-using-cach%C3%A9-history-monitor)。
我根据David的这篇文章,开始使用Caché History Monitor并显示所有这些信息。
在面临“选择哪种很酷的技术”这个问题时,我决定使用简单而强大的CSP,这样我的客户可以认识到Caché不仅仅是MUMPS/终端。
在创建了页面以显示许可、数据库增长和CSP会话的历史记录后,我决定为System Dashboard和进程页面创建一个新设计。
我的Caché实例运行得良好。
但是,如果使用IRIS呢?根据
[Evgeny Shvarov](https://community.intersystems.com/user/evgeny-shvarov)的文章:[在InterSystems IRIS开发存储库中使用Docker](https://community.intersystems.com/post/using-docker-your-intersystems-iris-development-repository),我实现了docker技术,并把代码放到了GitHub上,现在大家只需几个步骤就可以进行尝试。
## **如何运行?**
如要使用这里的repo进行编码,请执行以下操作:
**1. **通过Clone/git命令将repo 更新到任意本地目录中:
`$ git clone https://github.com/diashenrique/iris-history-monitor.git`
**2. **打开这个目录下的终端,并运行:
`$ docker-compose build`
**3. **在项目中运行IRIS容器:
`$ docker-compose up -d`
## **如何测试**
打开浏览器,并转到链接:_http://localhost:52773/csp/irismonitor/dashboard.csp_
使用用户名_SYSTEM可以运行仪表盘dashboard和其他功能。
## **系统仪表盘**
![](/sites/default/files/inline/images/images/image(1332).png)
系统仪表盘(System Dashboard)可展示:<blockquote data-author-name="" data-content-utf8-length="93" data-source-title="" data-type="2" data-url=""><section><section>
·许可
·系统时间
·应用程序错误
·缓存过程
·CSP会话
·Lock Table
·日志空间
·日志状态
·ECP AppServer
·ECP DataServer
·编写守护进程
·缓存效率
·严重警告</section></section></blockquote>
折线图小工具每5秒绘制一个点:
![](/sites/default/files/inline/images/zhe_xian_tu_gong_ju_640.gif)
## **系统菜单**
![](/sites/default/files/inline/images/xi_tong_cai_dan_640.gif)
## **系统进程**
![](/sites/default/files/inline/images/images/image(1333).png)
## **进程过滤器**
通过使用不同的过滤器可以实现你所需的结果。也可以使用“Multiple Sort(多重排序)”,按**Shift +单击列标题**,甚至可以将数据网格导出到Excel!
![](/sites/default/files/inline/images/images/image(1334).png)
## **History Monitor(历史记录监控器)**
CSP会话和许可的History Monitor可显示三个部分的信息:<blockquote data-author-name="" data-content-utf8-length="12" data-source-title="" data-type="2" data-url=""><section><section>
·每5分钟
·每天
·每小时</section></section></blockquote>
“Database Growth”部分只显示当日信息。历史记录页面共享以下功能:
### **Date Range Picker(日期选择插件)**
默认值为“过去7天”
![](/sites/default/files/inline/images/images/image(1335).png)
### **Chart / Data Table(图表/ 数据表)**
在每个部分的右上角有两个按钮(Chart / Data Table [图表/ 数据表])
![](/sites/default/files/inline/images/images/image(1336).png)
Data Table(数据表)显示创建图表所用的信息,同样可以以Excel格式下载。
![](/sites/default/files/inline/images/images/image(1337).png)
Excel中显示CSP中定义的相同格式、内容和组。
![](/sites/default/files/inline/images/images/image(1338).png)
### **缩放**
所有图表都有Zoom(缩放)选项,以可视化方式显示更多详细信息。
![](/sites/default/files/inline/images/zoom640.gif)
### **平均值和最大值**
对于“每小时”和“每天”部分,图表显示的是平均值和最大值。
平均值
![](/sites/default/files/inline/images/images/image(1339).png)
#### 最大值
![](/sites/default/files/inline/images/images/image(1340).png)
希望这篇文章对您有用!
注:本文为译文,点击[**此处**](https://community.intersystems.com/post/dashboard-iris-history-monitor)阅读原文,原文由[Henrique Gonçalves Dias](https://community.intersystems.com/user/henrique-gon%C3%A7alves-dias)撰写。