一、zabbix 测试微信告警脚本显示超时
解决思路:
服务器zabbix用户手动执行脚本成功前提下(如果本地手动执行不成功,检查本地环境是否有异常):
1、zabbix_server.conf配置Timeout时间为30
2、zabbix_agent.conf配置Timeout时间为30
3、重启zabbix server和zabbix agent服务
二、zabbix 测试微信告警脚本显示requests模块没有post属性
解决思路
1、检查本地脚本名称是否与本地requests文件名冲突,若有冲突修改文件名
2、检查本地zabbix用户是否能成功执行脚本,若切换到zabbix用户手动执行告警脚本提示的错误和图里一致,那需要将python的requests模块目录赋予zabbix用户权限
三、ERROR: Could not find a version that satisfies the requirement requests (from v ersions: none)
解决思路
1、python 没有安装rerquests模块
2、使用pip install requests 安装requests模块
3、内网机器可使用pip install requests -i https://pypi.tuna.tsinghua.edu.cn/simaple 安装(内网机器需开通和pypi.tuna.tsinghua.edu.cn的443端口策略)
四、安装requests报错:ERROR: Could not find a version that satisfies the requirement request (from version...
1、查看pip版本信息(进入python 执行pip list)
2、更新pip #python -m pip install --upgrade pip 内网机器可使用python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simaple 安装(内网机器需开通和pypi.tuna.tsinghua.edu.cn的443端口策略)
3、安装requests pip install requests
五、Can’t connect to HTTPS URL because the SSL module is not available
1、python安装没有指定openssl路径
2、如果用的python3版本,升级ssl为1.1.1之后版本