nagios(Nagios魔物喵)

来源网友投稿 1818 2022-12-30

本站部分文章、图片属于网络上可搜索到的公开信息,均用于学习和交流用途,不能代表睿象云的观点、立场或意见。我们接受网民的监督,如发现任何违法内容或侵犯了您的权益,请第一时间联系小编邮箱jiasou666@gmail.com 处理。
本篇文章给大家谈谈nagios,以及Nagios魔物喵对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。 今天给各位分享nagios的知识,其中也会对Nagios魔物喵进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

如何解决nagios安装及运行存在的常见错误?

一、安装nrpe的时候,提示:checking for SSL headers… configure: error: Cannot find ssl headers
解决方法如下:
yum -y install openssl-devel
yum -y install openssl-perl
二、启动nagios错误 Starting nagios:This account is currently not available.
解决办法:默认是 shell 是 /bin/bash,不要使用 -s /sbin/nologin,否则会出现上面的错误
但是我为安全起见,我还是加了-s /sbin/nologin,不要管启动错误就行了,nagios照常运行
三、It appears as though you do not have permission to view information for any of the hosts you requested
解决方法一:打开cgi.cfg 里参数use_authentication=1
改为0即可(为了保障系统的安全性,nagios设置了这个参数,默认为1,)
解决方法二:打开cgi.cfg 相关参数auth*开头的都 后面加上nagios登录帐号
四、所监控服务报错(Return code of 127 is out of bounds – plugin may be missing)
这行代码 command_line $USER1/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
改成command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ 就对 了
五、Connection refused or timed out
检查nrpe 端口
检查nrpe.cfg中allowed_hosts是否包含监控机ip地址
检查/etc/hosts.allow文件中监控机ip地址nrpe:192.168.1.91
检查iptables
开放5666端口 上面的都做了,还是有问题呢
解决办法:接下来查出是防火墙的问题。。。
在防火墙里加入
:RH-Firewall-1-INPUT – [0:0]
-A INPUT -j RH-Firewall-1-INPUT
并且把
-A INPUT -p tcp -s 125.64.41.211 –dport 5666 -j ACCEPT
修改为
-A RH-Firewall-1-INPUT -p tcp -s 125.64.41.211 –dport 5666 -j ACCEPT

开源监控系统中 Zabbix 和 Nagios 哪个更好

nagios最大的亮点是轻量灵活nagios,且报警机制很强,如果你只是需要监控服务器/服务是否在运行,nagios足矣。
但是如果牵涉到画图方面,感觉nagios+cacti的结合是不如zabbix的all in one方式的。
Zabbix维护相对困难,Nagios维护相对容易
Nagios的监控相对独立(插件机制,每次执行一条命令),而Zabbix的监控相对集中。
而zabbix把报警、画图全包办了,自己就能搞定上面的一堆东西。另外zabbix的agentd在windows server下运行良好,甚至32/64位均有,不像nagios只能用一个半死不活的插件。
综上,zabbix和nagios不存在谁好谁坏的问题,只存在你的需求不同需要选择哪个更好的问题nagios
如果只为了报警,nagios吧,足够满足需求;
如果需要图表,zabbix吧
================以上由太平洋安防网为您解答,望采纳,谢谢!<================

怎么用Nagios监测Windows服务器

监控主机配置nagios:redhat linux as4,nagios3
被监控主机:Windows Server 2008 R2 Enterprise,nsclient++0.4.4.172
Nagios是一款开源nagios的免费网络监视工具,其功能强大,灵活性强。能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。nagios监控windows系统有三种实现方式:SNMP、NSClient++、NRPE。
下面介绍使用NSClient++方式来监控Windows:
首先在windows下安装nsclient++,运行NSCP-0.4.0.172-x64.msi安装文件,一步一步往下走,其中需要设置nagios监控主机IP和NSClient密码(值当使用check_nt时使用),如图1所示:
Allowed hosts:填写nagios监控主机IP
NSClient Password:当使用命令check_nt时需要设置密码,根据自己情况设置
Module to load:根据自己的需要选择相应的模块
安装完毕以后,打开windows服务管理器,查看nsclient服务是否启动,如图2所示:
然后在nagios监控主机上面进行相关的配置,主要涉及两个配置文件nagios.cfg和windows.cfg
(1) 因为nagios是模块化调用,先到配置文件打开windows相关模块,编辑nagios.cfg文件
[root@localhost etc]# ls
cgi.cfg htpasswd nagios.cfg nrpe.cfg objects objects.bak objects.tar resource.cfg
[root@localhost etc]# pwd
/usr/local/nagios/etc
[root@localhost etc]# vi nagios.cfg
将#cfg_file=/usr/local/nagios/etc/objects/windows.cfg该行前面的#注释去掉即可.
(1) 修改windows.cfg配置文件,需要修改define host和define service两部分
# Define a host for the Windows machine we'll be monitoring
# Change the host_name, alias, and address to fit your situation
define host{
use windows-server ; Inherit default values from a template
host_name video4-beijing ; The name we're giving to this host 被监控主机的主机名
alias video4-beijing ; A longer name associated with the host
contact_groups sa ;
address 10.12.4.169 ; IP address of the host 被监控主机的IP
}

# Create a service for monitoring CPU load
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
host_name video4-beijing
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
contact_groups sa
}

# Create a service for monitoring
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
host_name video4-beijing
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
contact_groups sa
}

# Create a service for monitoring C:\ disk usage
# Change the host_name to match the name of the host you defined above

define service{
use generic-service
host_name video4-beijing
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
contact_groups sa
}
修改完相关的配置文件以后,执行如下命令检查配置文件是否正确:
[root@localhost objects]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

遇到的问题,在检查配置文件时错误信息如下:
Checking services...
Error: Contact group 'admins' specified in service 'C:\ Drive Space' for host 'video4-beijing' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Explorer' for host 'video4-beijing' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Memory Usage' for host 'video4-beijing' is not defined anywhere!
Checked 14 services.
Checking hosts...
Error: Contact group 'admins' specified in host 'video4-beijing' is not defined anywhere!
Checked 7 hosts.
Checking host groups...
Checked 2 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 25 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 4

*** One or more problems was encountered while running the pre-flight check...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

以上问题的原因是因为一开始在windows.cfg文件中定义host和service时没有增加contact_groups sa这个字段,host和service默认所在的contact_group为admins,而我的nagios监控主机contacts.cfg文件中配置的contactgroup为sa。 关于nagios和Nagios魔物喵的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。 nagios的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于Nagios魔物喵、nagios的信息别忘了在本站进行查找喔。
上一篇:纸张性能测试(纸张性能测试原理)
下一篇:讯维分布式图形处理器成功应用于云南某公安指挥中心
相关文章

 发表评论

暂时没有评论,来抢沙发吧~