Home > System Tutorial > LINUX > One trick to solve the error 'Cannot fetch deployment URL via curl'!

One trick to solve the error 'Cannot fetch deployment URL via curl'!

WBOY
Release: 2024-04-23 08:16:24
forward
428 people have browsed it

一招解决报错 “Cannot fetch deployment URL via curl” !

check_mk is a tool that helps you configure nagios monitoring server. Then while configuring one of the machines I encountered the following error:

 ERROR Cannot fetch deployment URL via curl:Couldn't resolve host。The given remote host was not resolved。
Copy after login

This error occurred when I tried to register the machine to the monitoring server using the following command:

 root@kerneltalks# /usr/bin/cmk-update-agent register -s monitor.kerneltalks.com -i master -H `hostname` -p http -U omdadmin -S ASFKWEFUNSHEFKG -v 
Copy after login

in:

-s 指明监控服务器
-i 指定服务器上 Check_MK 站点的名称
-H 指定 agent 所在的主机名
-p 为协议,可以是 http 或 https (默认为 https)
-U 允许下载 agent 的用户 ID
-S 为密码。用户的自动操作密码(当是自动用户时)
Copy after login

As you can see from the error, the command cannot resolve the DNS name of the monitoring server, monitor.kerneltalks.com.

solution:

Super simple. Check /etc/resolv.conf to make sure your DNS is configured correctly. If this problem still cannot be solved, you can directly specify its IP in /etc/hosts.

root@kerneltalks# cat /etc/hosts
10.0.10.9 monitor.kerneltalks.com
Copy after login

That’s it. You can now register successfully.

root@kerneltalks # /usr/bin/cmk-update-agent register -s monitor.kerneltalks.com -i master -H `hostname` -p http -U omdadmin -S ASFKWEFUNSHEFKG -v
Going to register agent at deployment server
Successfully registered agent for deployment.
You can now update your agent by running 'cmk-update-agent -v'
Saved your registration settings to /etc/cmk-update-agent.state.
Copy after login

In addition, you can also directly specify the IP address for -s, which is not that much trouble!


The above is the detailed content of One trick to solve the error 'Cannot fetch deployment URL via curl'!. For more information, please follow other related articles on the PHP Chinese website!

source:linuxprobe.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template