配置自定义监控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的更多相关文章

  1. zabbix 二 zabbix agent 客户端

    [root@zabbix_agent src]# cd zabbix-3.0.3 [root@zabbix_agent zabbix-3.0.3]# ls aclocal.m4 bin ChangeL ...

  2. zabbix server的Discover功能,实现zabbix agent 大批量的自动添加,并链接到指定的模版(3)

    一.需求 zabbix 服务器可以手动加入zabbix-agent客户端,对于少量的机器,这没有什么.但到了线上,我们有大量的服务器需要监控时,如果再一个个的手动加的话,工作量势必会增加很多.这时,z ...

  3. 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 ...

  4. 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 ...

  5. zabbix agent 类型自带的key

    zabbix服务器端通过与zabbix agent通信来获取客户端服务器的数据,agent分为两个版本,在配置主机我们可以看到一个是agent,另一个是agent(active). agent:zab ...

  6. zabbix agent安装详解

    安装 Installing repository configuration package Zabbix 2.2 for RHEL5, Oracle Linux 5, CentOS 5: rpm - ...

  7. Zabbix Agent端配置文件说明

    Zabbix Agent端配置文件说明 由于工作中经常接触到zabbix,所以将agent配置整理一下,方便日常查看. # This is a config file for the Zabbix a ...

  8. 运维监控-基于yum的方式部署 Zabbix Agent 4.0 版本

    运维监控-基于yum的方式部署 Zabbix Agent 4.0 版本 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 上一篇博客我们分享了如何基于yum的方式部署zabbix 4. ...

  9. Zabbix agent 在windows上安装部署

    Zabbix agent 在windows上安装部署 1.下载与解压 地址: http://www.zabbix.com/downloads/2.4.4/zabbix_agents_2.4.4.win ...

随机推荐

  1. Explore Basic Behavior of the TurtleBot ---3

    原创博文:转载请标明出处(周学伟):http://www.cnblogs.com/zxouxuewei/tag/ Introduction 此示例帮助您使用turtlebot的自主性. 驱动机器人向前 ...

  2. [Bayes] What is Sampling

    Ref: http://blog.csdn.net/xianlingmao/article/details/7768833 通常,我们会遇到很多问题无法用分析的方法来求得精确解,例如由于式子特别,真的 ...

  3. Java使用String类格式化当前日期

    在输出日期信息时,经常需要输出不同格式的日期格式,本实例中介绍了String字符串类中的日期格式化方法,实例使用不同的方式输出String类的日期格式参数值,组合这些值可以实现特殊格式的日期字符串. ...

  4. vs2012修复问题

    多装了一个.net framework4.5.1结果vs不能拥,借用了下面这个工具将vs2012从注册表中删除了 就能重装了 http://www.auslogics.com/en/software/ ...

  5. nodejs服务器部署教程四

    nodejs服务器部署最后一篇文章,部署ssl证书,升级http为https,其实网上相关教程有很多,但是略麻烦,本教程让你一切从简,5分钟搞定https,免费一年哦 申请ssl证书 免费申请的机构有 ...

  6. hadoop的Map阶段的四大步骤

    深入理解map的几个阶段是怎样执行的.

  7. ISO27001信息安全管理体系

    0x00 前言 初入甲方,刚开始接触的应该就是ISO27001信息安全管理体系,你拿到的应该就是一整套安全管理类的文档.在甲方,稍微有点规模的公司很注重制度和流程,岗位职责分工明细,那么这些安全管理制 ...

  8. Explaining Delegates in C# - Part 3 (Events 2)

    I was thinking that the previous post on Events and Delegates was quite self-explanatory. A couple o ...

  9. Python学习--判断变量的数据类型

    import types aaa = 0 print type(aaa) if type(aaa) is types.IntType: print "the type of aaa is i ...

  10. Win10 虚拟桌面

    我们可以建立多个桌面,各个桌面上运行的窗口任务互不干扰,这就是虚拟桌面 创建虚拟桌面:Win + Ctrl + D查看虚拟桌面:Win + Tab删除当前虚拟桌面:Win + Ctrl + F4切换到 ...