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 ...
随机推荐
- web实现QQ头像上传截取功能
由于最近一段时间比较忙,发现好久没写博客了,给大家分享下最近搞的logo上传截取功能.在实现这个功能之前找了一些jq的插件,最后选定了cropper在github中可以找到. 具体的思路是1:选择上传 ...
- Spring-----配置及对象初始化(1)
一,配置文件进行Spring初始化 1,配置文件编写 <?xml version="1.0" encoding="utf-8" ?> <con ...
- yii 前端js动态添加验证规则
在使用 activeForm 生成表单及验证时,默认是按照 model 里的 rules 生成js验证,model 验证在加载完页面后生效,不可修改,如果需要扩展.动态验证,需要使用js来配合 直接上 ...
- 文件完整性hash验证demo(python脚本)
一个简单的文件完整性hash验证脚本 #!/usr/bin/env python # -*- coding: utf- -*- import os import hashlib import json ...
- vmware下虚拟机不能上网问题解决
这个问题困扰了好久,vmware下装的虚拟机可以通过DHCP获取单独IP,但当用到管控较严格的环境,需要它与主机共享IP时,就不好使了. 今天在一篇文章中找到答案,如下图,windows系统中要启动V ...
- VS调试DLL代码使用”附加到进程“
如果一个DLL解决方案,被另一个DLL2解决方案依赖,DLL2被可执行程序exe1引用 如何调试DLL的代码断点呢 1.可以参考另一篇随笔DLL如何调试 2.先运行起来exe1,然后再DLL项目中”调 ...
- [Command] sync - 同步内存与硬盘数据
sync - 同步内存与硬盘之间的数据. sync [--help] [--version] sync 命令将内存中缓存的数据写入磁盘.这包括但不限于修改过的 superblock, inode 和延 ...
- smarty模板文件书写javascript代码
在smarty文件里直接写javascript代码时候,造成500错误. javascript代码有很多的{}在同一行,而{}也是smarty引擎解析模板的关键标识符,smarty将对其进行分析,这时 ...
- 《转载》Eclipse项目上传码云
本文转载自http://blog.csdn.net/izzyliao/article/details/53074452 把Eclipse项目上传到码云的步骤: 1.登录码云:新建项目 2.输入项目名: ...
- JSP中的动态包含和静态包含的区别
本文转载自http://blog.csdn.net/xuxu198899223/article/details/8501044 1. 语法格式 (1)静态包含:<%@ include file= ...