【发布时间】:2015-07-22 10:00:30
【问题描述】:
我有一个 nagios 服务器监控多个主机和服务。现在我被要求实施 nagiosgraph。我已经完全按照文档进行操作,除了鼠标悬停功能外,一切正常。
我用这段代码创建了一个 common-header.ssi 文件
<script type="text/javascript" src="/nagiosgraph/nagiosgraph.js"></script>
我已将此文件放入我的 nagios 路径 /usr/local/nagios/share/ssi
我已经定义了一个服务来使用鼠标悬停功能,如下所示:
define service{
use local-service,graphed-service
host_name TOMCAT-DESARROLLO
service_description Tomcat heap memory
check_command check_nrpe!check_jmx_heap
notifications_enabled 0
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$' onMouseOver="showGraphPopup(this)" onMouseOut="hideGraphPopup()" rel='/nagiosgraph/cgi-bin/showgraph.cgi?host=$HOSTNAME$&service=$SERVICEDESC$
}
Nagiosgraphs 工作正常,我可以通过单击图标访问服务图表。当我将鼠标悬停在图标上时,弹出窗口应该会显示图形,而无需单击任何位置,但我在控制台中收到以下错误消息:
Uncaught ReferenceError: showGraphPopup is not defined
onmouseover @ status.cgi?host=all:893
在我看来,nagiosgraph 使用了错误的 cgi,因为命令行声明它将使用“showgraph.cgi”,但错误来自 nagios 的“status.cgi”。
关于为什么会发生这种情况以及如何解决它的任何想法?
非常感谢
【问题讨论】:
-
这是我一直关注的文档,与 nagiosgrap-1.5.2.tar.gz 包中包含的文档完全相同。
标签: javascript apache cgi nagios