linux – 使用Nagios在非默认端口上监视ssh
发布时间:2020-05-23 21:42:22 所属栏目:Linux 来源:互联网
导读:我刚刚在Gentoo服务器上部署了Nagios,一切都很好,除了ssh,它标记为“CRITICAL”,因为它拒绝连接.但那是因为它运行在与默认端口22不同的端口上.如何更改它以便监视正确的端口? host:~$/usr/lib/nagios/plugins/check_ssh --helpcheck_ssh v1991 (nagios-plugi
|
我刚刚在Gentoo服务器上部署了Nagios,一切都很好,除了ssh,它标记为“CRITICAL”,因为它拒绝连接.但那是因为它运行在与默认端口22不同的端口上.如何更改它以便监视正确的端口? 解决方法host:~$/usr/lib/nagios/plugins/check_ssh --help
check_ssh v1991 (nagios-plugins 1.4.12)
Copyright (c) 1999 Remi Paulmier <remi@sinfomic.fr>
Copyright (c) 2000-2007 Nagios Plugin Development Team
<nagiosplug-devel@lists.sourceforge.net>
Try to connect to an SSH server at specified server and port
Usage:check_ssh [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>
这回答了你的问题了吗? -p参数允许您指定端口,在/etc/nagios/nrpe.cfg中进行自定义检查并放在那里: command[check_remote_ssh]= /usr/lib/nagios/plugins/check_ssh -p 1234 some.host (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
