Check access restrictions in Zabbix agent configuration
配置自定义监控K值时,出现下面错误提示
[root@manage ~]# zabbix_get -s 101.221.155.218 -p -k "login_user"
zabbix_get []: Check access restrictions in Zabbix agent configuration
可能性一、zabbix_get命令使用场景
zabbix的服务器端与客户端连接的主要工具就是zabbix里bin文件夹下的zabbix_get文件,这个命令只能在zabbix的server端使用,如果在agent端使用就会提示如下的错误:
zabbix_get []: Check access restrictions in Zabbix agent configuration
可能性二、未连接zabbix客户端
zabbix_get命令使用方法:
zabbix_get -s 127.0.0.1 -p -k "system.cpu.load[all,avg1]"
注意: -s后面接的是目标地址,-p后面要加端口号,这个一般都是10050, -I 后面加原地址,不过这个一般用不上,-k 后面接的就是item项目里的key。
如果zabbix客户端配置的是内网地址,那么这里使用公网地址,也会出现“Check access restrictions in Zabbix agent configuration”的问题;这里的-k注意必须是zabbix_agent.conf中Server配置指向的地址。
[root@manage ~]# zabbix_get -s 191.201.185.218 -p -k "login_user"
zabbix_get []: Check access restrictions in Zabbix agent configuration
#排除客户端连接不通的可能性
[root@manage ~]# ping 191.201.185.218
PING 191.201.185.218 (101.201.185.218) () bytes of data.
bytes from 191.201.185.218: icmp_seq= ttl= time=1.27 ms
bytes from 191.201.185.218: icmp_seq= ttl= time=1.24 ms
##使用zabbix客户端的内网地址,因为我的zabbix_agent.conf配置的是内网地址
[root@manage ~]# zabbix_get -s 10.45.199.182 -p -k "login_user"
##成功获取到K值
zabbix_get使用方法:
[root@manage ~]# zabbix_get -help
usage:
zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address] -k item-key
zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address]
--tls-connect cert --tls-ca-file CA-file
[--tls-crl-file CRL-file] [--tls-agent-cert-issuer cert-issuer]
[--tls-agent-cert-subject cert-subject]
--tls-cert-file cert-file --tls-key-file key-file -k item-key
zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address]
--tls-connect psk --tls-psk-identity PSK-identity
--tls-psk-file PSK-file -k item-key
zabbix_get -h
zabbix_get -V Get data from Zabbix agent. General options:
-s --host host-name-or-IP Specify host name or IP address of a host
-p --port port-number Specify port number of agent running on the host
(default: )
-I --source-address IP-address Specify source IP address -k --key item-key Specify key of the item to retrieve value for -h --help Display this help message
-V --version Display version number TLS connection options:
--tls-connect value How to connect to agent. Values:
unencrypted - connect without encryption
(default)
psk - connect using TLS and a pre-shared
key
cert - connect using TLS and a
certificate --tls-ca-file CA-file Full pathname of a file containing the top-level
CA(s) certificates for peer certificate
verification --tls-crl-file CRL-file Full pathname of a file containing revoked
certificates --tls-agent-cert-issuer cert-issuer Allowed agent certificate issuer --tls-agent-cert-subject cert-subject Allowed agent certificate subject --tls-cert-file cert-file Full pathname of a file containing the certificate
or certificate chain --tls-key-file key-file Full pathname of a file containing the private key --tls-psk-identity PSK-identity Unique, case sensitive string used to
identify the pre-shared key --tls-psk-file PSK-file Full pathname of a file containing the pre-shared
key Example(s):
zabbix_get -s 127.0.0.1 -p -k "system.cpu.load[all,avg1]" zabbix_get -s 127.0.0.1 -p -k "system.cpu.load[all,avg1]" \
--tls-connect cert --tls-ca-file /home/zabbix/zabbix_ca_file \
--tls-agent-cert-issuer \
"CN=Signing CA,OU=IT operations,O=Example Corp,DC=example,DC=com" \
--tls-agent-cert-subject \
"CN=server1,OU=IT operations,O=Example Corp,DC=example,DC=com" \
--tls-cert-file /home/zabbix/zabbix_get.crt \
--tls-key-file /home/zabbix/zabbix_get.key zabbix_get -s 127.0.0.1 -p -k "system.cpu.load[all,avg1]" \
--tls-connect psk --tls-psk-identity "PSK ID Zabbix agentd" \
--tls-psk-file /home/zabbix/zabbix_agentd.psk Report bugs to: <https://support.zabbix.com>
Zabbix home page: <http://www.zabbix.com>
Documentation: <https://www.zabbix.com/documentation>
当然出现这种错误还有可能是其他的原因,不断补充中。。
Check access restrictions in Zabbix agent configuration的更多相关文章
- zabbix 二 zabbix agent 客户端
[root@zabbix_agent src]# cd zabbix-3.0.3 [root@zabbix_agent zabbix-3.0.3]# ls aclocal.m4 bin ChangeL ...
- zabbix server的Discover功能,实现zabbix agent 大批量的自动添加,并链接到指定的模版(3)
一.需求 zabbix 服务器可以手动加入zabbix-agent客户端,对于少量的机器,这没有什么.但到了线上,我们有大量的服务器需要监控时,如果再一个个的手动加的话,工作量势必会增加很多.这时,z ...
- zabbix服务端连接客户端报错Received empty response from Zabbix Agent at [192.168.10.105]. Assuming that agent dropped connection because of access permissions
这是zabbix WEB报的问题:Received empty response from Zabbix Agent at [192.168.10.105]. Assuming that agent ...
- Received empty response from Zabbix Agent at [agent]. Assuming that agent dropped connection because of access permission
Received empty response from Zabbix Agent at [agent]. Assuming that agent dropped connection because ...
- zabbix agent 类型自带的key
zabbix服务器端通过与zabbix agent通信来获取客户端服务器的数据,agent分为两个版本,在配置主机我们可以看到一个是agent,另一个是agent(active). agent:zab ...
- zabbix agent安装详解
安装 Installing repository configuration package Zabbix 2.2 for RHEL5, Oracle Linux 5, CentOS 5: rpm - ...
- Zabbix Agent端配置文件说明
Zabbix Agent端配置文件说明 由于工作中经常接触到zabbix,所以将agent配置整理一下,方便日常查看. # This is a config file for the Zabbix a ...
- 运维监控-基于yum的方式部署 Zabbix Agent 4.0 版本
运维监控-基于yum的方式部署 Zabbix Agent 4.0 版本 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 上一篇博客我们分享了如何基于yum的方式部署zabbix 4. ...
- Zabbix agent 在windows上安装部署
Zabbix agent 在windows上安装部署 1.下载与解压 地址: http://www.zabbix.com/downloads/2.4.4/zabbix_agents_2.4.4.win ...
随机推荐
- ckeditor4.4.6添加代码高亮
研究了很久才发现,在 ckeditor4.4.6中添加代码高亮超级简单啊,下面直接上过程 ckeditor4.4.6支持自定义代码高亮,利用Code Snippet插件并默认启用highlight.j ...
- 【代码审计】CLTPHP_v5.5.3 前台任意文件上传漏洞分析
0x00 环境准备 CLTPHP官网:http://www.cltphp.com 网站源码版本:CLTPHP内容管理系统5.5.3版本 程序源码下载:https://gitee.com/chich ...
- 获取指定ip段的所有存活主机的主机名和操作系统
https://jingyan.baidu.com/article/ceb9fb1089fd948cad2ba000.html java探测局域网存活 https://blog.csdn.net/we ...
- 说说C与汇编之间的互相联系(转)
在嵌入式系统开发中,目前使用的主要编程语言是C和汇编,C++已经有相应的编译器,但是现在使用还是比较少的.在稍大规模的嵌入式软件中,例如含有OS,大部分的代码都是用C编写的,主要是因为C语言的结构比较 ...
- 安装ubuntu后,你的屏幕尺寸太小,无法设置,该怎么解决
安装完虚拟机之后,你的Ubuntu可能会在尺寸很小,(这种情况可能有,可能没有) 想要点击设置,选中Display里的分辨率下拉框,但是却因为这个窗口太大,无法点击apply按钮.悲剧啦!!! Ctr ...
- 通过java的i/o机制进行图片流的存储以及对网络图片的存储
存储内地图片思路:首先把原有的图片以流的方式读取出来,再以流的方式存储到目标文件: package imgStream; import java.io.*; public class ImgStrea ...
- (转载)Recyclerview | Intent与Bundle在传值上的区别 | 设置布局背景为白色的三种方法
用Recyclerview实现列表分组.下拉刷新以及上拉加载更多 http://www.jianshu.com/p/be62ce21ea57 Intent与Bundle在传值上的区别http://b ...
- 《转载》为什么我要在2018年学习Python?
本文转载自36kr 从网页编程到时髦的人工智能,机器学习,这个享有"瑞士军刀(万能工具)"盛誉的Python语言, 你学会了吗? 编者注: 根据维基百科的解释,"Pyth ...
- C# - 获取类中属性的名称
用反射控制的,不过获取属性名称的方法,用方法形式获取的,不知道消耗大不大 using System; using System.Collections.Generic; using System.Li ...
- Android开发训练之第五章第三节——Transferring Data Without Draining the Battery
Transferring Data Without Draining the Battery GET STARTED DEPENDENCIES AND PREREQUISITES Android 2. ...