Articles of Nagios

icinga nrpe在本地而不是服务器执行

我对icinga很新。 事实上,我今天完成了设置。 我试图监视我的nrpe机器上的一堆东西。 我在/etc/icinga/objects/my.server.com.cfg设置了我的服务,并像这样configuration它: define host{ use generic-host host_name my.server.com alias my.server.com address 123.45.678.999 } define service{ use generic-service host_name my.server.com service_description Total Processes check_command check_procs!250!400 } 当我在pipe理界面看,我想知道为什么所有的服务器有相同数量的进程活跃,但在检查命令icinga执行后,我意识到所有命令正在执行在icinga服务器本身而不是nrpe机器。 我的错误在哪里? nrpe.cfg设置正确,将我的icinga服务器列入白名单。 Telnet连接正常工作。

check_http! – ssl实际上检查http

在监视运行HTTPS但不运行HTTP的主机上的SSL服务时,Icinga会警告403 Forbidden返回码。 但是该警告是针对HTTP,而不是HTTPS。 使用-S或–ssl手动运行check_http命令将返回200 OK代码(以及针对HTTP运行时的403 Forbidden响应)。 但是,自动服务检查返回一个403错误与任何开关 – check_http!-S或check_http! – ssl。 Icinga不会抱怨使用此服务检查监视的其他SSL主机,也许是因为它们也都运行HTTP。 Icinga使用Nagios插件,所以我认为这是一个Nagios或(更可能)configuration问题。 如何解决这个错误的报告? SSL服务正在主机上工作。 这是用于Debian喘息的Icinga 1.7.1-7。 谢谢!

NSClient似乎忽略了allow_nasty_meta_chars设置

我试图检测服务器上的CheckEventLog条目,所以我试图使用CheckEventLog命令: ./check_nrpe -H hostname -c CheckEventLog -a MaxWarn=1 MaxCrit=1 "filter=generated gt -3d AND id=23 AND source='mpio'" truncate=800 unique "syntax=%severity%: %source%: %id%: %message% (%count%)" 但是,我总是从客户端得到一个错误: Exception processing request: Request command contained illegal metachars! 我已经设置了允许讨厌的元字符的选项,但这似乎没有帮助。 [/settings/NRPE/server] allow arguments = true allow_nasty_meta_chars = 1 如果我拿出filter的source部分,它的工作原理,但是事件ID本身并不是唯一的。

nsclient – debugging连接问题

我有很多的Windows客户端,我想通过nagios / nsclient进行监控。 我在两个win7 x64和一个win2012 r2上安装了最新的nsclient。 当一个win7连接尝试从nagios机器( libexec / check_nrpe -H主机名-c check_cpu )时,其中两台机器返回could not complete SSL handshake 。 我试过了: 检查密码 – 所有这些系统都有相同的nsclient.ini文件。 检查端口 – nmap -P0客户端名称返回相同的所有(端口5666处于打开状态) 运行nscptesting – 非工作系统返回sslv3 alert: unexpected message (win7)或failed to establish secure connection: no shared cipher (win2012) 我试图找出工作和非工作的Windows 7系统之间有什么不同,并试图将其应用于Windows 2012系统。

NSClient ++ ::无法build立安全连接

尝试从我的nagios服务器获得主机的Windows主机检查。 在这一点上,我甚至没有使用nagios,只是从命令行运行check_nt。 validation端口是开放的,它允许telnet 确保不安全模式在nsclient.ini中configuration 确保连接主机进入“允许主机” 在这一点上,安全不是一个问题,所以不需要encryption/密码等。 对于故障排除,我只是运行“CLIENTVERSION”命令,因为它很简单 我已经确保nsclient ++服务具有“允许与桌面交互”选项。 这是我从允许的主机使用的命令: check_nt -H 10.10.5.200 -p 12489 -v CLIENTVERSION 这是输出: [root@nagioshost]# /usr/lib64/nagios/plugins/check_nt -H 10.10.5.200 -p 12489 -v CLIENTVERSION No data was received from host! could not fetch information from server 运行'nscptesting'我可以看到连接进来,但失败: D nrpe Accepting connection from: 10.10.7.101, count=1 E nrpe Failed to establish secure connection: short read: […]

Nagios nrpe自定义插件命令没有在localhost上定义

我写了一个自定义的nagios插件,它返回一个命令未定义的错误。 我还没有把命令放在nrpe.cfg中,或者定义了服务等,因为这是由puppet控制的,任何失败都会每5分钟给所有的技术人员发一个短信。 我想我应该能够从命令行testing它之前这样做。 这是从Ubuntu 14.04terminal输出,这说明了我的问题。 nagios@myserver:/usr/lib/nagios/plugins$ ./check_nrpe -H localhost -c check_users USERS OK – 2 users currently logged in |users=2;5;5;0 nagios@myserver:/usr/lib/nagios/plugins$ ./check_nrpe -H localhost -c disk_usage.rb NRPE: Command 'disk_usage.rb' not defined nagios@myserver:/usr/lib/nagios/plugins$ ./disk_usage.rb OK – '/backups' 84% of disk space used | '/'=37% '/tmp'=1% '/srv'=62% '/backups'=84%

运行nagios插件时,权限被拒绝

我刚刚写了一个简单的bash脚本来检查文件系统是否正在写入和删除一个文件,但是当我把它放到Nagios中时,它不会像预期的那样运行。 root@debian:~# cat /usr/lib/nagios/plugins/check_filesys.sh #!/bin/bash # Script que checa se file system consegue escrever/ler arquivos if touch teste.txt && rm teste.txt; then echo OK – Teste OK! exit 0 else echo CRITICAL – Teste de escrita/leitura falhou! exit 2 fi root@debian:~# ls -l /usr/lib/nagios/plugins/check_filesys.sh -rwxrwxrwx 1 root root 217 Feb 5 10:40 /usr/lib/nagios/plugins/check_filesys.sh 我还发现一个debugging脚本,看看是什么问题,这就是输出: 2016-1-5 […]

Nagios仍然在计划停机期间发送服务通知

我的三台服务器从星期五21:50到星期五5:30停机。 所以我在timeperiod.cfg中configuration了以下时间段: define timeperiod{ timeperiod_name 24x7_without_exclude_hours_for_AZE alias 24×7 without 21:50 for friday to 5:30 for saturday sunday 00:00-24:00 monday 00:00-24:00 tuesday 00:00-24:00 wednesday 00:00-24:00 thursday 00:00-24:00 friday 00:00-21:50 saturday 05:30-24:00 } 然后在template.cfg文件中为这三个服务器创build一个: define host{ name windows-server-AZE ; The name of this host template use generic-host ; Inherit default values from the gene$ check_period 24x7_without_exclude_hours_for_AZE ; […]

Nagios:监视不同端口上的http服务

我想通过在80以外的多个端口上运行的http监视服务。服务在端口8083,8086和一些其他端口上运行。 我创build了server.cfg文件,如下所示: define host { use linux-server host_name cfbase-prod alias cfbase-prod address xxxx contacts admin } define service { use generic-service host_name cfbase-prod service_description HTTP check_command check_http contacts admin check_interval 1 } 但它不是在我的nagios控制台上工作,它仍然显示为端口80上的http,事实并非如此。 有人可以帮忙吗?

Check_nrpe无法读取脚本的输出

脚本在服务器上: #!/斌/庆典 如果[! $#== 1]; 然后 echo“用法check_cluster” networking连接; clu_srv = $ 1 错误=“停止” ERROR1 = “禁用” 误差2 =“可恢复” host1 =`sudo / usr / sbin / clustat | grep $ 1 | awk {'print $ 2'}` host2 =`sudo / usr / sbin / clustat | grep $ 1 | awk {'print $ 3'}` service1 =`sudo / […]