Home > Article > System Tutorial > One trick to solve the error '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。
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
in:
-s 指明监控服务器 -i 指定服务器上 Check_MK 站点的名称 -H 指定 agent 所在的主机名 -p 为协议,可以是 http 或 https (默认为 https) -U 允许下载 agent 的用户 ID -S 为密码。用户的自动操作密码(当是自动用户时)
As you can see from the error, the command cannot resolve the DNS name of the monitoring server, monitor.kerneltalks.com.
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
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.
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!