{"id":1551,"date":"2023-03-25T15:37:10","date_gmt":"2023-03-25T07:37:10","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1551"},"modified":"2023-04-27T21:38:04","modified_gmt":"2023-04-27T13:38:04","slug":"grafana-cli-command","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/grafana-cli-command\/","title":{"rendered":"grafana-cli\u547d\u4ee4"},"content":{"rendered":"<p>\u5b89\u88c5\u63d2\u4ef6\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u4e0eGrafana\u6346\u7ed1\u5728\u4e00\u8d77\u7684CLI\u5de5\u5177<code>grafana-cli<\/code>\u3002\u5728\u4fee\u6539\u63d2\u4ef6\u4e4b\u540e\u53d1\u751f\u4efb\u4f55\u4fee\u6539\u4e4b\u524d\uff0cGrafana\u670d\u52a1\u5668\u9700\u8981\u91cd\u65b0\u542f\u52a8\u3002<\/p>\n<h2>Grafana\u63d2\u4ef6\u5b89\u88c5\u76ee\u5f55<\/h2>\n<p>\u5728Linux\u7cfb\u7edf\u4e0a\uff0c<code>grafana-cli<\/code>\u4f1a\u5047\u5b9aGrafana\u63d2\u4ef6\u76ee\u5f55\u662f<code>\/var\/lib\/grafana\/plugins<\/code>\u3002\u901a\u8fc7\u6307\u5b9a<code>-pluginsDir<\/code>\u6807\u5fd7\u53ef\u4ee5\u8986\u76d6<code>grafana-cli<\/code>\u5c06\u8981\u8fd0\u884c\u7684\u76ee\u5f55\u3002<\/p>\n<p><!-- more --><\/p>\n<h2>grafana-cli\u547d\u4ee4\u8bf4\u660e<\/h2>\n<p>\uff081\uff09\u5217\u51fa\u53ef\u7528\u7684\u63d2\u4ef6<\/p>\n<pre><code># grafana-cli plugins list-remote<\/code><\/pre>\n<p>\uff082\uff09\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684\u63d2\u4ef6<\/p>\n<pre><code># grafana-cli plugins install &lt;plugin-id&gt;<\/code><\/pre>\n<p>\uff083\uff09\u5b89\u88c5\u7279\u5b9a\u7248\u672c\u7684\u63d2\u4ef6<\/p>\n<pre><code># grafana-cli plugins install &lt;plugin-id&gt; &lt;version&gt;<\/code><\/pre>\n<p>\uff084\uff09\u5217\u51fa\u5b89\u88c5\u7684\u63d2\u4ef6<\/p>\n<pre><code># grafana-cli plugins ls<\/code><\/pre>\n<p>\uff085\uff09\u66f4\u65b0\u6240\u6709\u5b89\u88c5\u7684\u63d2\u4ef6<\/p>\n<pre><code># grafana-cli plugins update-all<\/code><\/pre>\n<p>\uff086\uff09\u66f4\u65b0\u4e00\u4e2a\u63d2\u4ef6<\/p>\n<pre><code># grafana-cli plugins update &lt;plugin-id&gt;<\/code><\/pre>\n<p>\uff087\uff09\u5220\u9664\u4e00\u4e2a\u63d2\u4ef6<\/p>\n<pre><code># grafana-cli plugins remove &lt;plugin-id&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u63d2\u4ef6\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u4e0eGrafana\u6346\u7ed1\u5728\u4e00\u8d77\u7684CLI\u5de5\u5177grafana-cli\u3002\u5728\u4fee\u6539\u63d2\u4ef6\u4e4b\u540e\u53d1\u751f\u4efb\u4f55 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[386],"tags":[385],"class_list":["post-1551","post","type-post","status-publish","format-standard","hentry","category-monitor","tag-grafana"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1551"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1551\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}