34 lines
19 KiB
HTML
34 lines
19 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-US">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>Why the IP displayed in the admin panel and the actual IP of the Agent are not the same? | Nezha Monitoring</title>
|
|
<meta name="description" content="Nezha Monitoring is a lightweight O&M tool">
|
|
<link rel="stylesheet" href="/assets/style.0b9f658b.css">
|
|
<link rel="modulepreload" href="/assets/chunks/AlgoliaSearchBox.98396bc7.js">
|
|
<link rel="modulepreload" href="/assets/app.3817bf4e.js">
|
|
<link rel="modulepreload" href="/assets/en_US_guide_dashboardq.md.e23f6f14.lean.js">
|
|
|
|
<meta name="twitter:title" content="Why the IP displayed in the admin panel and the actual IP of the Agent are not the same? | Nezha Monitoring">
|
|
<meta property="og:title" content="Why the IP displayed in the admin panel and the actual IP of the Agent are not the same? | Nezha Monitoring">
|
|
</head>
|
|
<body>
|
|
<div id="app"><!--[--><div class="theme"><header class="nav-bar" data-v-675d8756><div class="sidebar-button" data-v-675d8756><svg class="icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z" class></path></svg></div><a class="nav-bar-title" href="/en_US/" aria-label="Nezha Monitoring, back to home" data-v-675d8756 data-v-cc01ef16><!----> Nezha Monitoring</a><div class="flex-grow" data-v-675d8756></div><div class="nav" data-v-675d8756><nav class="nav-links" data-v-675d8756 data-v-eab3edfe><!--[--><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item active" href="/en_US/" data-v-b8818f8c>User Guide <!----></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item" href="/en_US/case/index" data-v-b8818f8c>Community Projects <!----></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item" href="/en_US/developer/index" data-v-b8818f8c>Development Manual <!----></a></div></div><!--]--><div class="item" data-v-eab3edfe><div class="nav-dropdown-link" data-v-eab3edfe data-v-56bf3a3f><button class="button" data-v-56bf3a3f><span class="button-text" data-v-56bf3a3f>Languages</span><span class="right button-arrow" data-v-56bf3a3f></span></button><ul class="dialog" data-v-56bf3a3f><!--[--><li class="dialog-item" data-v-56bf3a3f><div class="nav-dropdown-link-item" data-v-56bf3a3f data-v-bbc27490><a class="item" href="/guide/dashboardq.html" data-v-bbc27490><span class="arrow" data-v-bbc27490></span><span class="text" data-v-bbc27490>简体中文</span><span class="icon" data-v-bbc27490><!----></span></a></div></li><li class="dialog-item" data-v-56bf3a3f><div class="nav-dropdown-link-item" data-v-56bf3a3f data-v-bbc27490><a class="item active" href="/en_US/guide/dashboardq.html" data-v-bbc27490><span class="arrow" data-v-bbc27490></span><span class="text" data-v-bbc27490>English</span><span class="icon" data-v-bbc27490><!----></span></a></div></li><!--]--></ul></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://github.com/nezhahq/nezhahq.github.io" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>GitHub <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div></nav></div><!--[--><!--[--><div class="algolia-search-box" id="docsearch"></div><!--]--><!--]--></header><aside class="sidebar" data-v-83e92a68><nav class="nav-links nav" data-v-83e92a68 data-v-eab3edfe><!--[--><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item active" href="/en_US/" data-v-b8818f8c>User Guide <!----></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item" href="/en_US/case/index" data-v-b8818f8c>Community Projects <!----></a></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item" href="/en_US/developer/index" data-v-b8818f8c>Development Manual <!----></a></div></div><!--]--><div class="item" data-v-eab3edfe><div class="nav-dropdown-link" data-v-eab3edfe data-v-56bf3a3f><button class="button" data-v-56bf3a3f><span class="button-text" data-v-56bf3a3f>Languages</span><span class="right button-arrow" data-v-56bf3a3f></span></button><ul class="dialog" data-v-56bf3a3f><!--[--><li class="dialog-item" data-v-56bf3a3f><div class="nav-dropdown-link-item" data-v-56bf3a3f data-v-bbc27490><a class="item" href="/guide/dashboardq.html" data-v-bbc27490><span class="arrow" data-v-bbc27490></span><span class="text" data-v-bbc27490>简体中文</span><span class="icon" data-v-bbc27490><!----></span></a></div></li><li class="dialog-item" data-v-56bf3a3f><div class="nav-dropdown-link-item" data-v-56bf3a3f data-v-bbc27490><a class="item active" href="/en_US/guide/dashboardq.html" data-v-bbc27490><span class="arrow" data-v-bbc27490></span><span class="text" data-v-bbc27490>English</span><span class="icon" data-v-bbc27490><!----></span></a></div></li><!--]--></ul></div></div><div class="item" data-v-eab3edfe><div class="nav-link" data-v-eab3edfe data-v-b8818f8c><a class="item isExternal" href="https://github.com/nezhahq/nezhahq.github.io" target="_blank" rel="noopener noreferrer" data-v-b8818f8c>GitHub <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div></nav><!--[--><!--]--><ul class="sidebar-links" data-v-83e92a68><!--[--><li class="sidebar-link"><p class="sidebar-link-item">Installation Manual</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/dashboard">Install Dashboard</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/agent">Install Agent</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Admin Panel</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/servers">Servers</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/services">Services</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/tasks">Tasks</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/notifications">Notifications</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/settings">Settings</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/api">API</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">FAQ</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/q2">Agent cannot start/on-line. Steps to review logs and troubleshoot</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/q3">Steps for Reverse Proxy gRPC Ports (support Cloudflare CDN)</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/q4">Real-time channel disconnection/online terminal connection failure</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/q5">Steps to perform data migration, backup and recovery</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/q6">Steps to set up monthly reset data statistics</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/q7">Steps to customize Agent monitoring items</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Troubleshooting Guide</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item active" href="/en_US/guide/dashboardq">Dashboard</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#why-the-ip-displayed-in-the-admin-panel-and-the-actual-ip-of-the-agent-are-not-the-same">Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#forgot-your-access-password-or-deleted-your-access-password">Forgot your access password or deleted your access password</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#dashboard-install-restart-update-failed-iptables">Dashboard install/restart/update failed: iptables ......</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#dashboard-reboot-failed-invalid-hostport-nz-site-port-etc">Dashboard reboot failed: Invalid hostPort: nzsiteport etc.</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#wrong-dashboard-layout-css-resources-cannot-be-loaded">Wrong Dashboard layout, CSS resources cannot be loaded</a><!----></li></ul></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/agentq">Agent</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/en_US/guide/loginq">Login</a><!----></li></ul></li><!--]--></ul><!--[--><!--]--></aside><div class="sidebar-mask"></div><main class="page" data-v-7eddb2c4><div class="container" data-v-7eddb2c4><!--[--><!--]--><div style="position:relative;" class="content" data-v-7eddb2c4><div><h2 id="why-the-ip-displayed-in-the-admin-panel-and-the-actual-ip-of-the-agent-are-not-the-same" tabindex="-1">Why the IP displayed in the admin panel and the actual IP of the Agent are not the same? <a class="header-anchor" href="#why-the-ip-displayed-in-the-admin-panel-and-the-actual-ip-of-the-agent-are-not-the-same" aria-hidden="true">#</a></h2><p>First of all, explain how the IP displayed in the admin panel is gotten: the Agent will request the IP-API every once in a while, get the IP information and report it to the Dashboard, the IP-API currently used can be viewed here: <a href="https://github.com/naiba/nezha/blob/master/cmd/agent/monitor/myip.go" target="_blank" rel="noopener noreferrer">myip.go</a><br> If you find that the IP displayed in the admin panel is not the same as the IP provided to you by the service provider, the biggest possibility is that the service provider gave you the <strong>entry IP</strong>, but the Agent tested out your <strong>exit IP</strong>. This problem may also occur in BGP servers and Leased line.</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>To take a simple and very common example, the service provider to provide you a anti-DDoS server, in order to meet the goals of both DDoS protection and low network disruption rate, the IP provided to you may be the mapped anti-DDoS IP and not the real exit IP of your server</p></div><p>You can also test the exit IP by running the following command in the Agent server:</p><div class="language-shell"><pre><code><span class="token function">curl</span> api.myip.la
|
|
<span class="token function">curl</span> ip.sb
|
|
<span class="token function">curl</span> ip-api.com
|
|
</code></pre></div><h2 id="forgot-your-access-password-or-deleted-your-access-password" tabindex="-1">Forgot your access password or deleted your access password <a class="header-anchor" href="#forgot-your-access-password-or-deleted-your-access-password" aria-hidden="true">#</a></h2><p>Please view or edit the <code>/opt/nezha/dashboard/data/config.yaml</code> file.<br> The password is located in the site-viewpassword item.</p><h2 id="dashboard-install-restart-update-failed-iptables" tabindex="-1">Dashboard install/restart/update failed: iptables ...... <a class="header-anchor" href="#dashboard-install-restart-update-failed-iptables" aria-hidden="true">#</a></h2><p>First, try restarting docker and retrying again</p><div class="language-shell"><pre><code>systemctl status <span class="token function">docker</span>
|
|
systemctl restart <span class="token function">docker</span>
|
|
systemctl status <span class="token function">docker</span>
|
|
</code></pre></div><p>Restart and try to reinstall the Dashboard.<br> If you still get iptables... etc. errors, then consider simply closing iptables or even removing it.<br> This issue may also be kernel related, try replacing the official kernel as well.</p><h2 id="dashboard-reboot-failed-invalid-hostport-nz-site-port-etc" tabindex="-1">Dashboard reboot failed: Invalid hostPort: nz_site_port etc. <a class="header-anchor" href="#dashboard-reboot-failed-invalid-hostport-nz-site-port-etc" aria-hidden="true">#</a></h2><p>Usually this does not occur, if it does, you can modify the configuration through the installation script.</p><h2 id="wrong-dashboard-layout-css-resources-cannot-be-loaded" tabindex="-1">Wrong Dashboard layout, CSS resources cannot be loaded <a class="header-anchor" href="#wrong-dashboard-layout-css-resources-cannot-be-loaded" aria-hidden="true">#</a></h2><p>If the Dashboard page has an incorrect layout, the usual reason is that the CSS file is missing or cannot be loaded.<br> When such an issue occurs, you can first try <code>Reboot and update the Dashboard</code>. If the problem is not resolved after updating the Dashboard, then there may be an unsuitable configuration within your vhost configuration file. You can edit the vhost file or within the Aapanel to:</p><ol><li>Find the site you configured when installing Dashboard in <code>Website</code> and click <code>Conf</code> on the right side</li><li>Select <code>Config</code> and delete the following from the config file:</li></ol><div class="language-nginx"><pre><code><span class="token directive"><span class="token keyword">location</span> ~ .*\.(js|css)?$</span>
|
|
<span class="token punctuation">{</span>
|
|
<span class="token directive"><span class="token keyword">expires</span> <span class="token number">12h</span></span><span class="token punctuation">;</span>
|
|
<span class="token directive"><span class="token keyword">error_log</span> /dev/null</span><span class="token punctuation">;</span>
|
|
<span class="token directive"><span class="token keyword">access_log</span> /dev/null</span><span class="token punctuation">;</span>
|
|
<span class="token punctuation">}</span>
|
|
</code></pre></div><ol start="3"><li>Save the configuration and clear the cache in the browser, NginX, and CDN, then refresh the page and it should return to normal.</li></ol></div></div><footer class="page-footer" data-v-7eddb2c4 data-v-07c132fc><div class="edit" data-v-07c132fc><div class="edit-link" data-v-07c132fc data-v-1ed99556><a class="link" href="https://github.com/nezhahq/nezhahq.github.io/edit/main/docs/en_US/guide/dashboardq.md" target="_blank" rel="noopener noreferrer" data-v-1ed99556>Edit this page on GitHub <svg class="icon outbound icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-1ed99556><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="updated" data-v-07c132fc><p class="last-updated" data-v-07c132fc data-v-abce3432><span class="prefix" data-v-abce3432>Last Updated:</span><span class="datetime" data-v-abce3432></span></p></div></footer><div class="next-and-prev-link" data-v-7eddb2c4 data-v-38ede35f><div class="container" data-v-38ede35f><div class="prev" data-v-38ede35f><a class="link" href="/en_US/guide/q7" data-v-38ede35f><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon icon-prev" data-v-38ede35f><path d="M19,11H7.4l5.3-5.3c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-7,7c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.2-0.1,0.5,0,0.8c0.1,0.1,0.1,0.2,0.2,0.3l7,7c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3c0.4-0.4,0.4-1,0-1.4L7.4,13H19c0.6,0,1-0.4,1-1S19.6,11,19,11z"></path></svg><span class="text" data-v-38ede35f>Steps to customize Agent monitoring items</span></a></div><div class="next" data-v-38ede35f><a class="link" href="/en_US/guide/agentq" data-v-38ede35f><span class="text" data-v-38ede35f>Agent</span><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon icon-next" data-v-38ede35f><path d="M19.9,12.4c0.1-0.2,0.1-0.5,0-0.8c-0.1-0.1-0.1-0.2-0.2-0.3l-7-7c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l5.3,5.3H5c-0.6,0-1,0.4-1,1s0.4,1,1,1h11.6l-5.3,5.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l7-7C19.8,12.6,19.9,12.5,19.9,12.4z"></path></svg></a></div></div></div><!--[--><!--]--></div></main></div><!----><!--]--></div>
|
|
<script>__VP_HASH_MAP__ = JSON.parse("{\"case_case1.md\":\"016eed9d\",\"case_case2.md\":\"f67c1fe3\",\"case_case3.md\":\"bf638fdf\",\"case_case4.md\":\"3245ae29\",\"case_index.md\":\"ebb90ea0\",\"developer_index.md\":\"4d04d79c\",\"developer_l10n.md\":\"617b1a97\",\"developer_theme.md\":\"918b2e4e\",\"en_us_case_case1.md\":\"43e8a143\",\"en_us_case_case2.md\":\"a4b37606\",\"en_us_case_case3.md\":\"3b3d42a3\",\"en_us_case_case4.md\":\"38491e58\",\"en_us_case_index.md\":\"84f385b0\",\"en_us_developer_index.md\":\"f75e3f42\",\"en_us_developer_l10n.md\":\"3849e268\",\"en_us_developer_theme.md\":\"705c4cc6\",\"en_us_guide_agent.md\":\"a2a51d03\",\"en_us_guide_agentq.md\":\"2308e834\",\"en_us_guide_api.md\":\"c054bd2d\",\"en_us_guide_dashboard.md\":\"0806c57c\",\"en_us_guide_dashboardq.md\":\"e23f6f14\",\"en_us_guide_loginq.md\":\"d842b1d4\",\"en_us_guide_notifications.md\":\"fa81e634\",\"en_us_guide_q2.md\":\"702af635\",\"en_us_guide_q3.md\":\"4d3452c2\",\"en_us_guide_q4.md\":\"c42ec441\",\"en_us_guide_q5.md\":\"006e7c54\",\"en_us_guide_q6.md\":\"990dce4b\",\"en_us_guide_q7.md\":\"8e05e7f1\",\"en_us_guide_servers.md\":\"7a0c2f6a\",\"en_us_guide_services.md\":\"40302e30\",\"en_us_guide_settings.md\":\"99903d54\",\"en_us_guide_tasks.md\":\"160e34bf\",\"en_us_index.md\":\"e33f0352\",\"guide_agent.md\":\"229ecc9f\",\"guide_agentq.md\":\"1cea3a0f\",\"guide_api.md\":\"69992701\",\"guide_dashboard.md\":\"c0747146\",\"guide_dashboardq.md\":\"34553ae1\",\"guide_loginq.md\":\"4b8b521e\",\"guide_notifications.md\":\"fc51b373\",\"guide_q1.md\":\"8e74953b\",\"guide_q2.md\":\"c422d7f6\",\"guide_q3.md\":\"e35c5efe\",\"guide_q4.md\":\"d64613b1\",\"guide_q5.md\":\"367cf326\",\"guide_q6.md\":\"f0affa28\",\"guide_q7.md\":\"7173b6c9\",\"guide_servers.md\":\"e4abb554\",\"guide_services.md\":\"10023c9c\",\"guide_settings.md\":\"beb84c68\",\"guide_tasks.md\":\"f3e95746\",\"index.md\":\"f1c29ac9\"}")</script>
|
|
<script type="module" async src="/assets/app.3817bf4e.js"></script>
|
|
|
|
</body>
|
|
</html> |