host exec zabbix_get must list in Server=IP List config zabbix_agentd.conf

简介:
在使用zabbix_get测试时, 发现即使配置了Server列表还是不能正常返回要的结果, 原因是配置格式的问题,
不能在IP外使用单引号.
例如 : 
 
  

zabbix_agentd.conf
### Option: Server
#       List of comma delimited IP addresses (or hostnames) of Zabbix servers.
#       Incoming connections will be accepted only from the hosts listed here.
#       If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
#
# Mandatory: no
# Default:
# Server=

Server=172.16.3.150, 127.0.0.1
不要使用以下带单引号的格式, 会导致无效, 除非你启用了ipv6.
Server='172.16.3.150', '127.0.0.1'


只有配置在Server列表中的server, zabbix agentd才响应数据请求.
没有配置的话, 可以从zabbix agentd日志中看到类似错误 : 
 

 21034:20141107:090930.460 Listener error: connection from "127.0.0.1" rejected, allowed hosts: "'172.16.3.150','127.0.0.1'"

这个错误就是配置格式引起的.
把单引号去掉即可 : 
正常响应如下 : 
 
 

[root@150 etc]# zabbix_get -s 127.0.0.1 -p 10050 -I 127.0.0.1 -k "hello"
ZBX_NOTSUPPORTED
[root@150 etc]# zabbix_get -s 127.0.0.1 -p 10050 -I 127.0.0.1 -k "psql"
ZBX_NOTSUPPORTED

没响应就是返回空 : 
 
 

[root@150 etc]# zabbix_get -s 127.0.0.1 -p 10050 -I 127.0.0.1 -k "psql"

并且报错如 : 
 
 

 21034:20141107:090930.460 Listener error: connection from "127.0.0.1" rejected, allowed hosts: "'172.16.3.150','127.0.0.1'"

相关文章
|
7月前
|
NoSQL Java Redis
redis.clients.jedis.exceptions.JedisDataException: ERR Syntax error, try CLIENT (LIST | KILL ip:port
redis.clients.jedis.exceptions.JedisDataException: ERR Syntax error, try CLIENT (LIST | KILL ip:port
|
4月前
|
Java API Nacos
spring.config.import 是一个 Spring Cloud Config Server 的属性,
spring.config.import 是一个 Spring Cloud Config Server 的属性,【1月更文挑战第25天】【1月更文挑战第123篇】
60 1
|
12月前
|
存储 负载均衡 前端开发
Spring Cloud【Finchley】实战-05配置中心的搭建(配合使用Eureka)和Config Server高可用
Spring Cloud【Finchley】实战-05配置中心的搭建(配合使用Eureka)和Config Server高可用
176 0
|
存储 Java 开发工具
SpringCloud--Config Server配置中心学习总结
使用分布式微服务开发和部署项目,其中的一个优势就是:使用分布式配置协调服务,达到统一配置存储和使用。
161 0
SpringCloud--Config Server配置中心学习总结
MFC应用程序——标签控件_IP控件_时间控件_List Control控件_Tree Control控件_命令按钮_列表框_组合框_图片_滚动控件(下)
MFC应用程序——标签控件_IP控件_时间控件_List Control控件_Tree Control控件_命令按钮_列表框_组合框_图片_滚动控件
140 0
|
API Windows 容器
MFC应用程序——标签控件_IP控件_时间控件_List Control控件_Tree Control控件_命令按钮_列表框_组合框_图片_滚动控件(上)
MFC应用程序——标签控件_IP控件_时间控件_List Control控件_Tree Control控件_命令按钮_列表框_组合框_图片_滚动控件
162 0
MFC应用程序——标签控件_IP控件_时间控件_List Control控件_Tree Control控件_命令按钮_列表框_组合框_图片_滚动控件(上)
|
jenkins Java 应用服务中间件
Jenkins部署异常: java.io.FileNotFoundException: http://ip:端口/manager/text/list
Jenkins部署异常: java.io.FileNotFoundException: http://ip:端口/manager/text/list
400 0
Jenkins部署异常: java.io.FileNotFoundException: http://ip:端口/manager/text/list
|
Java 测试技术 微服务
Spring Cloud Config Server迁移节点或容器化带来的问题
Spring Cloud Config Server迁移节点或容器化带来的问题
183 0
|
JSON 数据格式
Fiori Launchpad server side config json
Fiori Launchpad server side config json
Fiori Launchpad server side config json
|
开发工具 git Java
[Spring Cloud Tutorial翻译系列二]Spring Cloud Config Server与git集成
在这篇教程当中,我们将探讨并且完成一个叫做配置服务(Config Server)的微服务特性。所有微服务的可配置参数都在配置服务中写入和维护。它更像是将属性/资源文件从项目的代码中统一抽离到一个外部服务,这样的话如果某个属性发生了改变,那么使用它的服务并不需要重新部署。
791 0

热门文章

最新文章

推荐镜像

更多