{"id":43388,"date":"2023-05-09T19:41:10","date_gmt":"2023-03-11T17:57:33","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/"},"modified":"2024-04-30T03:22:00","modified_gmt":"2024-04-29T19:22:00","slug":"%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/","title":{"rendered":"\u4f7f\u7528Prometheus\u6765\u76d1\u89c6SoftEther VPN"},"content":{"rendered":"<h1>\u9996\u5148<\/h1>\n<p>SoftEther VPN\u662f\u4e00\u6b3e\u5f00\u6e90\u7684VPN\u8f6f\u4ef6\u3002\u6211\u4f7f\u7528Rust\u7f16\u5199\u4e86\u540d\u4e3asoftether_exporter\u7684\u63d2\u4ef6\uff0c\u7528\u4e8e\u5728Prometheus\u4e2d\u76d1\u63a7\u5b83\u3002\uff08\u5546\u7528\u8bb8\u53ef\u7684PacketiX VPN\u4e5f\u53ef\u4ee5\u4f7f\u7528\u8be5\u63d2\u4ef6\uff09<\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528Grafana\u6765\u521b\u5efa\u4ee5\u4e0b\u7c7b\u4f3c\u7684\u4eea\u8868\u677f\uff0c\u6216\u8005\u4f7f\u7528Alertmanager\u5bf9\u751f\u547d\u6d3b\u52a8\u8fdb\u884c\u76d1\u63a7\u3002<br \/>\n\u672c\u6587\u5c06\u7b80\u5355\u4ecb\u7ecdsoftether_exporter\u7684\u8bbe\u7f6e\u548c\u4eea\u8868\u677f\u7684\u521b\u5efa\u3002<br \/>\n\u4e0d\u6d89\u53caPrometheus\u6216Grafana\u672c\u8eab\u7684\u914d\u7f6e\uff0c\u8bf7\u53c2\u8003\u5176\u4ed6\u6587\u7ae0\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d527637434c4406ccce56\/3-0.png\" alt=\"screenshot.png\" \/><\/div>\n<h1>\u8f6fEther Exporter\u7684\u5b89\u88c5\u8bbe\u7f6e<\/h1>\n<p>\u8bf7\u4ece\u4ee5\u4e0b\u4f4d\u7f6e\u4e0b\u8f7d\u4e8c\u8fdb\u5236\u6587\u4ef6\u5e76\u89e3\u538b\u7f29\u5230\u9002\u5f53\u7684\u4f4d\u7f6e\uff08\u6b64\u5904\u8bbe\u4e3a\/usr\/local\/bin\uff09\u3002<\/p>\n<p>\u968f\u540e\uff0c\u51c6\u5907\u914d\u7f6e\u6587\u4ef6\uff08\u4f4d\u7f6e\u53ef\u4ee5\u662f\u4efb\u610f\u7684\uff0c\u4f46\u5728\u8fd9\u91cc\u6211\u4eec\u5c06\u5176\u8bbe\u7f6e\u4e3a\/etc\/prometheus\/softether.toml\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"py\">vpncmd<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"\/usr\/local\/vpnserver\/vpncmd\"<\/span>\r\n<span class=\"py\">server<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"localhost:8888\"<\/span>\r\n\r\n<span class=\"nn\">[[hubs]]<\/span>\r\n<span class=\"py\">name<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"HUB1\"<\/span>\r\n<span class=\"py\">password<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"xxx\"<\/span>\r\n\r\n<span class=\"nn\">[[hubs]]<\/span>\r\n<span class=\"py\">name<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"HUB2\"<\/span>\r\n<span class=\"py\">password<\/span> <span class=\"p\">=<\/span> <span class=\"s\">\"xxx\"<\/span>\r\n<\/code><\/pre>\n<p>vpncmd\u662fSoftEther VPN\u914d\u5957\u5206\u53d1\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u9700\u8981\u6307\u5b9a\u5230\u8be5\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u8def\u5f84\u3002<br \/>\nserver\u662f\u6307SoftEther VPN\u670d\u52a1\u5668\u8fd0\u884c\u7684\u4e3b\u673a\u548c\u7aef\u53e3\uff08\u5728\u8fd9\u91cc\u5047\u8bbe\u662f\u4e0esoftether_exporter\u5728\u540c\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\uff09\u3002<br \/>\n\u6b64\u5916\uff0c\u8fd8\u9700\u8981\u4e3a\u6bcf\u4e2a\u865a\u62dfHub\u8bbe\u7f6e\u540d\u79f0\u548c\u8bbf\u95ee\u5bc6\u7801\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u7531\u4e8e\u4f7f\u7528systemd\u4f5c\u4e3a\u670d\u52a1\u542f\u52a8\u975e\u5e38\u65b9\u4fbf\uff0c\u56e0\u6b64\u6211\u4eec\u521b\u5efa\u4ee5\u4e0b\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>[Unit]\r\nDescription=Prometheus SoftEther Exporter\r\nAfter=network.target\r\n\r\n[Service]\r\nExecStart=\/usr\/local\/bin\/softether_exporter --config.file=\/etc\/prometheus\/softether.toml\r\nUser=nobody\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/code><\/pre>\n<p>\u6267\u884csystemd\u7684\u91cd\u65b0\u52a0\u8f7d\u548c\u670d\u52a1\u542f\u52a8\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> systemctl daemon-reload\r\n<span class=\"gp\">$<\/span> systemctl <span class=\"nb\">enable <\/span>softether-exporter\r\n<span class=\"gp\">$<\/span> systemctl start softether-exporter\r\n<\/code><\/pre>\n<p>\u5b8c\u6210\u4e86softether-exporter\u7684\u8bbe\u7f6e\u3002<br \/>\n\u8bf7\u6839\u636e\u9700\u8981\u6dfb\u52a0Prometheus\u670d\u52a1\u5668\u7684\u6293\u53d6\u914d\u7f6e\u3002<\/p>\n<h1>\u4eea\u8868\u76d8<\/h1>\n<p>\u4ee5\u4e0b\u662f\u5192\u5934\u622a\u56fe\u4e2d\u663e\u793a\u7684\u4eea\u8868\u76d8\uff0c\u60a8\u53ef\u4ee5\u5728\u4ee5\u4e0b\u4f4d\u7f6e\u8fdb\u884c\u516c\u5f00\u3002<br \/>\n\u53ea\u9700\u5728Grafana\u7684\u201c\u5bfc\u5165\u4eea\u8868\u76d8\u201d\u4e2d\u8f93\u5165\u4ee5\u4e0bURL\u5e76\u8fdb\u884c\u6570\u636e\u6e90\u8bbe\u7f6e\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 SoftEther VPN\u662f\u4e00\u6b3e\u5f00\u6e90\u7684VPN\u8f6f\u4ef6\u3002\u6211\u4f7f\u7528Rust\u7f16\u5199\u4e86\u540d\u4e3asoftether_expor [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-43388","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528Prometheus\u6765\u76d1\u89c6SoftEther VPN - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528prometheus\u6765\u76d1\u89c6softether-vpn\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Prometheus\u6765\u76d1\u89c6SoftEther VPN\" \/>\n<meta property=\"og:description\" content=\"\u9996\u5148 SoftEther VPN\u662f\u4e00\u6b3e\u5f00\u6e90\u7684VPN\u8f6f\u4ef6\u3002\u6211\u4f7f\u7528Rust\u7f16\u5199\u4e86\u540d\u4e3asoftether_expor [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528prometheus\u6765\u76d1\u89c6softether-vpn\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-11T17:57:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T19:22:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d527637434c4406ccce56\/3-0.png\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/\",\"name\":\"\u4f7f\u7528Prometheus\u6765\u76d1\u89c6SoftEther VPN - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-03-11T17:57:33+00:00\",\"dateModified\":\"2024-04-29T19:22:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Prometheus\u6765\u76d1\u89c6SoftEther VPN\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Prometheus\u6765\u76d1\u89c6SoftEther VPN - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528prometheus\u6765\u76d1\u89c6softether-vpn\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Prometheus\u6765\u76d1\u89c6SoftEther VPN","og_description":"\u9996\u5148 SoftEther VPN\u662f\u4e00\u6b3e\u5f00\u6e90\u7684VPN\u8f6f\u4ef6\u3002\u6211\u4f7f\u7528Rust\u7f16\u5199\u4e86\u540d\u4e3asoftether_expor [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528prometheus\u6765\u76d1\u89c6softether-vpn\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-03-11T17:57:33+00:00","article_modified_time":"2024-04-29T19:22:00+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d527637434c4406ccce56\/3-0.png"}],"author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/","name":"\u4f7f\u7528Prometheus\u6765\u76d1\u89c6SoftEther VPN - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-03-11T17:57:33+00:00","dateModified":"2024-04-29T19:22:00+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Prometheus\u6765\u76d1\u89c6SoftEther VPN"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8prometheus%e6%9d%a5%e7%9b%91%e8%a7%86softether-vpn\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/43388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=43388"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/43388\/revisions"}],"predecessor-version":[{"id":89378,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/43388\/revisions\/89378"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=43388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=43388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=43388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}