How to solve the "Cannot fetch deployment URL via curl" error in check_mk
This article explains "ERROR Cannot fetch deployment URL via curl: Couldn't resolve host. The given remote host was not resolved ." Causes and solutions.
check_mk
Is a tool that helps you configure the nagios monitoring server. Then, when 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 occurs when I use the following command to register the machine to the monitoring server:
root@kerneltalks# /usr/bin/cmk-update-agent register-s monitor.kerneltalks.com -i master -H `hostname`-p http -U omdadmin -S ASFKWEFUNSHEFKG -v
Where:
-s
Specify Monitoring Server
-i
Name of the Check_MK site on the server
-H
Host Name of the agent
-p
Protocol, which can be http or https (https by default)
-U
User ID of the agent that can be downloaded
-S
Password. User's automatic operation password (when it is an automatic user)
It can be seen from the error that the command cannot resolve the DNS name of the Monitoring Servermonitor.kerneltalks.com
.
Solution:
Super simple. Check/etc/resolv.conf
Make sure that your DNS configuration is correct. If the problem persists, you can directly specify its IP address in/etc/hosts.
root@kerneltalks#cat/etc/hosts
10.0.10.9 monitor.kerneltalks.com
This is done. You can register now.
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-s
Simply specifying an IP address does not matter!
Via: https://kerneltalks.com/troubleshooting/check_mk-register-cannot-fetch-deployment-url-via-curl-error/
Author: kerneltalks Translator: lujun9972 Proofreader: wxy
This article was originally compiled by LCTT and launched with the honor of Linux in China