|
我搭建了Nagios+nrpe+rrdtoo+pnp4nagios监控远程主机
一切都正常,监控CPU使用率的也正常。但监控内存时出现问题了!
使用check_mem脚本时出现了问题,脚本来源:http://exchange.nagios.org/direc ... ck_mem-2Epl/details
远程机nrpe.cfg,command[check_mem]=/usr/local/nagios/libexec/check_mem.pl -w 90% -c 95% -u
监控机service
define service{
use generic-service,srv-pnp
host_name lrtest
service_description Memory Usage
check_command check_nrpe!check_mem
normal_check_interval 1
}
在http://IP/nagios中可以看到数据,但是点击太阳图标时出现了以下错误
An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator.
>application/models/data.php [194]:
simplexml_load_file() [function.simplexml-load-file]: /usr/local/pnp4nagios/var/perfdata/lrtest/Memory_Usage.xml:182: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xFF 0x7F 0x5C 0x6E
在/usr/local/pnp4nagios/var/perfdata/lrtest/Memory_Usage.xml文件中182行找到以下乱码
<NAGIOS_LONGSERVICEOUTPUT>每^?\n</NAGIOS_LONGSERVICEOUTPUT>
在正常的xml文件中是这的样
<NAGIOS_LONGSERVICEOUTPUT>\n</NAGIOS_LONGSERVICEOUTPUT>
谁能帮我解决呀!!
万分感谢!!! |
|