nrpe 执行命令报错NRPE: Unable to read output

在客户端编写的一个脚本check_ssh_auto.sh

#!/bin/bash

a=`/bin/cat /etc/ssh/sshd_config | grep PasswordAuthentication | grep -v "^#" | awk ‘{print $2}‘`

if [ "$a" = "yes" ]; then

echo "SSH authentication: WARNING Please amend the warning SSH authentication for key authentication;"

$(exit 1)

else

echo "SSH authentication: OK;"

$(exit 0)

fi

客户端执行正常

nagios服务器测试执行

/usr/local/nagios/libexec/check_nrpe -H 192.168.10.1 -c ssh_auth

提示NRPE: Unable to read output

解决方法

在客户端修改文件

vi /etc/sudoers

注视这行

#Defaults    requiretty

在root    ALL=(ALL)       ALL下面添加一行

nagios ALL=(ALL) NOPASSWD:/kuaibao/server/nagios/libexec/*

修改nrpe配置文件/usr/local/nagios/etc/nrpe.cfg

command[ssh_auth]=/usr/bin/sudo /kuaibao/server/nagios/libexec/check_ssh_auth.sh

重启nrpe

服务器端再次测试

SSH authentication: OK;

时间: 2024-08-01 22:13:07

nrpe 执行命令报错NRPE: Unable to read output的相关文章

cents上执行wget报错:unable to resolve host address

wget命令报错,无法解析域名"www.keepalived.rog" [[email protected] download]$ wget http://www.keepalived.org/software/keepalived-1.2.12.tar.gz --2014-05-05 11:06:14--  http://www.keepalived.org/software/keepalived-1.2.12.tar.gz Resolving www.keepalived.org.

执行 maven 命令 报错Unable to add module to the current project as it is not of packaging type 'pom'[转]

今天学习在本地搭建Maven工程时,执行了mvn archetype:generate 命令,报错. Unable to create project from archetype [org.apache.maven.archetypes:maven-archetype-quickstart:1.1] Unable to add module to the current project as it is not of packaging type 'pom' 上网搜资料发现一个帖子,问题解决:

Linux下安装Nrpe软件相关报错

Linux下面安装nrpe软件时,如果进行配置时(./configure)  报错: 并且执行make all命令进行编译时候也报错: 解决办法:    在报错的服务器上执行yum -y install openssl-devel   命令安装ssl的库 之后再次执行./configure命令进行配置,如果配置成功应该显示如下信息: 再次使用make all 命令就不会报错了.make all完毕显示如下信息: Linux下安装Nrpe软件相关报错,布布扣,bubuko.com

nagios报错NRPE: Command 'check_heartbeat' not defined

最近在做heartbeat监控的时候,在nagios服务器端报警提示:NRPE: Command 'check_heartbeat' not defined 但是在nagios客户端/usr/local/nagios/libexec/check_nrpe -H 192.168.3.211 -c check_heartbeat都能够正常执行,查了很多资料主要有以下几种情况: 1.nagios客户端nrpe.cfg配置文件命令写错 2.nagios客户端libexec下没有此命令 我的都不是上述两种

MySQL执行外部sql脚本文件命令报错:unknown command '\'

由于编码不一致导致的 虽然大部分导出是没有问题的 但是数据表中存储包含一些脚本(富文本内容)会出现该问题,强制指定编码即可解决. mysql导入时指定编码: mysql -u root -p --default-character-set=utf8 或者在导出时后显式指定编码就不存在这个问题了: mysqldump -uroot -p --default-character-set=utf8 mydb > E://xxxx.sql MySQL执行外部sql脚本文件命令报错:unknown com

oracle安装故障:完美解决xhost +报错: unable to open display “”

oracle安装 先切换到root用户,执行xhost + 然后再切换到oracle用户,执行export DISPLAY=:0.0 出现乱码执行export LANG=US_en 在这里给大家介绍下两种情况的常见问题: 一种是本地运行的命令,另一种则是远程ssh命令安装. DISPLAY科普 DISPLAY变量是用来设置将图形显示到何处.比如CENTOS,你用图形界面登录进去,DISPLAY自动设置为DISPLAY=:0.0表示显式到本地监视器,那么通过终端工具(例如:xshell)进去,运行

react-native启动时红屏报错:Unable to load script.Make sure you're either running a metro server or that ....

一.报错信息内容 我是在Android Studio中运行启动react-native项目时报的这个错误 1.报错提示:Unable to load script.Make sure you're either running a metro server( run 'react-native start' ) or that your bundle 'index.android.bundle' is packaged correctly for release. 2.中文翻译:无法加载脚本.请

Node升级 启动RN报错:react-native启动时红屏报错:Unable to load script.Make sure you're either running a metro server or that

1. 项目中在android/app/src/main/创建文件夹  assets 2.项目中执行命令 1. 项目中在android/app/src/main/创建文件夹  assets 2.项目中执行命令 react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle

[转帖]k8s集群node节点一直NotReady, 且node节点(并非master)的kubelet报错:Unable to update cni config: No networks found in /etc/cni/net.d

k8s集群node节点一直NotReady, 且node节点(并非master)的kubelet报错:Unable to update cni config: No networks found in /etc/cni/net.d http://www.voidcn.com/article/p-wpuagtbj-byy.html ? 考虑到node节点的kubelet报错Unable to update cni config: No networks found in /etc/cni/net.