简体   繁体   English

集成到Zenoss远程数据中

[英]Integrate in Zenoss remote data

I need to monitor several Linux servers placed in a different location from my farm. 我需要监视位于与服务器场不同位置的几台Linux服务器。

I have VPN connection to this remote location. 我有VPN连接到此远程位置。

Internally I use Zenoss 4 to monitor the systems, I would like to use Zenoss to monitor remote systems too. 在内部,我使用Zenoss 4监视系统,我也想使用Zenoss 4监视远程系统。 For contract policy, I cannot use VPN connection for Zenoss data (eg SNMP or SSH). 对于合同策略,我不能将VPN连接用于Zenoss数据(例如SNMP或SSH)。

What I created is a bunch of scripts that fetch desired data from remote systems to an internal server. 我创建的是一堆脚本,这些脚本可以将所需数据从远程系统获取到内部服务器。 The format of the returned data is one CVS per every location, containing data from all appliances placed in that location. 返回数据的格式是每个位置一个CVS,其中包含来自该位置中所有设备的数据。

For example: 例如:

$ cat LOCATION_1/current/current.csv
APPLIANCE1,out_of_memory,no,=,no,3,-
APPLIANCE1,postgre_idle,no,=,no,3,-
APPLIANCE2,out_of_memory,no,=,no,3,-
APPLIANCE2,postgre_idle,no,=,no,3,-

The format of CVS is this one: CVS的格式是这样的:

HOSTNAME,CHECK_NAME,RESULT_VALUE,COMPARE,DESIRED_VALUE,INFO 主机名,CHECK_NAME,RESULT_VALUE,比较,DESIRED_VALUE,INFO

How can i integrate those data in Zenoss, as the machines were placed in the internal farm? 将计算机放置在内部服务器场中后,如何在Zenoss中集成这些数据? If it is necessary, I could eventually change the format of fetched data. 如果有必要,我最终可以更改所获取数据的格式。

Thank you very much 非常感谢你

One possibility is for your internal server that communicates with remote systems (let's call it INTERNAL1 ) to re-issue the events as SNMP traps (or write them to the rsyslog file) and then process them in Zenoss. 一种可能是与远程系统进行通信的内部服务器(称为INTERNAL1 )将事件重新发布为SNMP陷阱(或将事件写入rsyslog文件),然后在Zenoss中进行处理。

For example, the message can start with the name of the server: "[APPLIANCE1] Out of Memory" . 例如,该消息可以以服务器名称开头: "[APPLIANCE1] Out of Memory" In the "Event Class transform" section of your Zenoss web interface ( http://my_zenoss_install.local:8080/zport/dmd/Events/editEventClassTransform ), you can transform attributes of incoming messages (using Python). 在Zenoss Web界面的“事件类转换”部分( http://my_zenoss_install.local:8080 / zport / dmd / Events / editEventClassTransform ),您可以转换传入消息的属性(使用Python)。 I frequently use this to lower the severity of an event. 我经常使用它来降低事件的严重性。 Eg, 例如,

if evt.component == 'abrt' and evt.message.find('Saved core dump of pid') != -1:
    evt.severity = 2     # was originally 3, I think

For your needs, you can set the evt.device to APPLIANCE1 if the message comes from INTERNAL1 , and contains [APPLIANCE1] tag as the message prefix, or anything else you want to use to uniquely identify messages/traps from remote systems. 根据您的需要,可以将evt.device设置为APPLIANCE1如果消息来自INTERNAL1 ,并且包含[APPLIANCE1]标签作为消息前缀,或者您想用来从远程系统中唯一标识消息/陷阱的其他任何方法。

I don't claim this to be the best way of achieving your goal. 我不认为这是实现目标的最佳方法。 My knowledge of Zenoss is strictly limited to what I currently need to use it for. 我对Zenoss的了解严格限于我当前需要使用它的范围。

PS here is a rather old document from Zenoss about using event transforms. 此处的 PS是Zenoss的一个相当古老的文档,内容涉及如何使用事件转换。 Unfortunately documentation in Zenoss is sparse and scattered (as you may have already learned), so searching old posts and/or asking questions on the Zenoss forum may be necessary. 不幸的是,Zenoss中的文档稀疏且分散(如您可能已经学到的),因此可能有必要在Zenoss论坛上搜索旧帖子和/或提出问题。

只需将一个收集器部署到远程位置,然后将该主机添加到收集器池中,即可监视远程linux服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM