- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近开始在 Ubuntu 上使用 Cacti 和 Nagios,我对它们的了解有限。当前,当阈值更改时,Cacti 会发送电子邮件。除了当前电子邮件之外,我还希望此阈值发送 SNMP 警报。
我用谷歌搜索了这个,但找不到确切的答案。有什么简单的方法可以存档吗?我是否缺少任何设置或其他内容?
最佳答案
没有简单的方法。您可以将系统日志消息发送到元素管理系统并读取元素管理系统上的系统日志。通过执行以下操作更改/etc/syslog.conf 以将警报转发到 EMS 系统。
<?php
// send a trap
$sourcehost = '123.45.12.3';
$destinationhost = '1.1.4.6';
$community = 'public';
$version = '2c';
$enterprise = '.1.3.6.1.4.1.99999.11.1';
$sourcehostname = 'SourceHostName';
$severity = 4;
$detail = 'All information about alarm.';
$message = 'Text to display in alarm summary.';
$uptime = '1001';
$billingid = 76197;
$period = '2014/05/25 22:31:11 -> 2014/05/25 23:01:11';
$siteid = '123456';
$customer = 'University of Maryland';
$cc = 380;
$country = 'Ukraine';
$amount = '67.05 Euro';
$minutes = '119.73';
$nrofcalls = 12;
$command ="snmptrap -v ".$version. " -c ".$community." ".$destinationhost." ".$uptime." ".$enterprise." .1.3.6.1.4.1.99999.222.11.1 s '".$sourcehost."' .1.3.6.1.4.1.99999.222.11.2 s '".$sourcehostname."' .1.3.6.1.4.1.99999.222.11.3 i '".$severity."' .1.3.6.1.4.1.99999.222.11.4 s '".$detail."' .1.3.6.1.4.1.99999.222.11.5 s '".$message."' .1.3.6.1.4.1.99999.222.11.6 s '".$clarifysiteid."' .1.3.6.1.4.1.99999.222.11.7 i '".$billingid."' .1.3.6.1.4.1.99999.222.11.8 s '".$period."' .1.3.6.1.4.1.99999.222.11.9 s '".$customer."' .1.3.6.1.4.1.99999.222.11.10 i '".$cc."' .1.3.6.1.4.1.99999.222.11.11 s '".$country."' .1.3.6.1.4.1.99999.222.11.12 s '".$amount."' .1.3.6.1.4.1.99999.222.11.13 s '".$minutes."' .1.3.6.1.4.1.99999.222.11.14 i ".$nrofcalls;
print($command);
system($command);
?>
关于ubuntu - 发送 SNMP 陷阱的 Cacti 阈值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30517925/
我正在尝试通过 SNMP 发送陷阱消息。 网上的例子提到了'sysUpTime'值的设置,但都没有说明。在这种情况下 sysUpTime 的作用是什么? 谢谢! 最佳答案 sysUpTime 是: T
我正在使用一些 SNMP 陷阱来监视应用程序。现在我被告知,如果陷阱中的属性顺序与 MIB 中定义的不同,某些监控系统可能会出现问题。由于 OID 的复杂性可以很容易地用于对属性进行重新排序,我对此感
我想使用 net-snmp 为 PowerPC 板实现 SNMP 代理。 以前它是使用 SMASH 实现的。 SMASH 有一个解析器 它可以读取 MIB 并生成 C 代码(空白函数实现) 我该如何开
在我的网络中,我想扫描启用 snmp 的设备。那么是否有任何单行 snmp 命令,以获取特定 IP 地址范围(如 172.26.1.1 到 172.26.1.255)中启用 snmp 的设备列表。 我
如何使用 C 或 C++ 和 net-snmp 模块接收陷阱。我需要示例代码,但示例位于 http://www.net-snmp.org/使用系统调用但不使用 API 方法。 最佳答案 net-snm
所以我还在学习SNMP,请放轻松。我正在使用 snmp4j,不仅是库,而且我已经加载了源代码,如果它满足我的需要,我不反对修改源代码。我已经编写了一个代理和一个测试客户端。我想要做的是能够检查来自测试
我正在尝试使用 SNMP 从 Brother MCF-9465CDN 获取碳粉量,以便最终使用 Munin 将它们绘制在图表中。我没有得到墨水量。 虽然我对 SNMP 有点陌生,但我认为我正在尝试的应
在我开始之前,我意识到这里已经有一些与 SNMP 相关的问题,但似乎没有多少人得到回答——这可能意味着我问错了地方,但我现在不知道还能去哪里. 这几天我一直在尽我所能阅读有关 SNMP 的内容,但我发
就目前情况而言,这个问题不太适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、民意调查或扩展讨论。如果您觉得这个问题可以改进并可能重新开放,visit
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
在我开始之前,我意识到这里已经有一些与 SNMP 相关的问题,但似乎没有多少人得到回答——这可能意味着我问错了地方,但我现在不知道还能去哪里. 这几天我一直在尽我所能阅读有关 SNMP 的内容,但我发
我可以快速完成 snmp 安装,它工作正常。 在我目前正在研究并尝试修改源的代理模块之一中。我遇到了一个问题,我需要通过代理删除用户。 坚持完成这个: 就像 net-snmp-create-v3-us
去年在我看来,找到一个网页,其中有使用 SNMP 设置工作中心 5755 公共(public)地址簿(姓名、电子邮件)的示例。 现在我的 google-fu 有点生锈了,你能帮帮我吗? 是否有标准化的
如果我试图找到安装了 openWRT 的 Linksys WRT54G 的路由表,我需要哪个 MIB? 最佳答案 那应该是 MIB II。 SNMP 对象 ID (OID) 是 .1.3.6.1.2.
我对 SNMP 有一点了解,但还不够。我需要开发一个可以读取标准 SNMP MIB 并读取/写入各种属性的应用程序。网络端没问题,但实际的 MIB 以及它们可能包含的确切内容对我来说是一种黑色艺术。
我是 SNMP 新手。我必须培养一个经理。我一直在寻找如何为经理编程。我遇到过 WinSNMP、SNMP++ 和 Net-SNMP。 Net-SNMP 的优点是它可以转换来自 MIB 的陷阱内容(它可
在软件定义的网络中,有些东西我仍然没有得到:在传统网络中,我们使用 CLI 或 NETCONF 或者 SNMP 来配置设备,在 SDN 中,我们使用 Openflow 来这样做,但是检索信息呢? 之前
在软件定义的网络中,有些东西我仍然没有得到:在传统网络中,我们使用 CLI 或 NETCONF 或者 SNMP 来配置设备,在 SDN 中,我们使用 Openflow 来这样做,但是检索信息呢? 之前
我正在尝试使用 snmp4j 模拟 SNMP 代理。 我正在尝试向代理注册 MO。 下面是代码片段: static final OID mo1= new OID("1.3.6.1.4.1.1234.1
我希望在 Java 中使用 SNMP 为项目设置监控。我环顾四周,发现了一些软件包:JBossSNMPAdapter和SNMP4J-Agent。我不确定这两者之间有什么区别。 最佳答案 SNMP4j-
我是一名优秀的程序员,十分优秀!