@cloudcare/guance-front-tools 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 CloudCare
3
+ Copyright (c) 2024 Guance Cloud for Observability
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,37 @@
1
+ ---
2
+ title: 'Grafana Guance Datasource'
3
+ summary: 'Datasource source provided by Guance Cloud for integration with Grafana.'
4
+ icon: 'icon/xxx/'
5
+ ---
6
+
7
+ # Grafana Guance Datasource
8
+
9
+ The purpose of this plugin is to display data from Guance Cloud in Grafana by providing a Datasource plugin.
10
+
11
+ ## Configuration {#config}
12
+
13
+ 1. [Click to download the plugin](https://static.guance.com/grafana-plugins/guance-guance-datasource.zip)
14
+
15
+ 2. Locate the Grafana configuration file. The default path can be found in the [official documentation](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#configuration-file-location).
16
+
17
+ 3. In the configuration file, find the plugin directory setting:
18
+
19
+ ```
20
+ [paths]
21
+ plugins = "/path/to/grafana-plugins"
22
+ ```
23
+
24
+ 4. Extract the downloaded file into the plugin directory:
25
+
26
+ ```
27
+ unzip guance-guance-datasource.zip -d YOUR_PLUGIN_DIR/
28
+ ```
29
+
30
+ 5. Update the configuration file with the following setting:
31
+
32
+ ```
33
+ [plugins]
34
+ allow_loading_unsigned_plugins = guance-guance-datasource
35
+ ```
36
+
37
+ 6. Restart Grafana.
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: 'Grafana Dashboard Import'
3
+ summary: 'Grafana Dashboard Template Import Tool for Guance Cloud'
4
+ icon: 'icon/xxx/'
5
+ ---
6
+
7
+ # Grafana Dashboard Import Tool
8
+
9
+ Guance Cloud provides a Node.js script to convert Grafana dashboard JSON templates into Guance Cloud dashboard JSON templates.
10
+
11
+ ## Configuration {#config}
12
+
13
+ ### Prerequisites {#requirement}
14
+
15
+ Ensure that `nodejs` and `npm` are installed on the system with the following version requirements:
16
+
17
+ 1. node >= 12.7.0
18
+ 2. npm >= 6.10.0
19
+
20
+ ### Usage
21
+
22
+ 1. Install the script
23
+
24
+ ```bash
25
+ $ npm install -g @cloudcare/guance-front-tools
26
+ ```
27
+
28
+ 2. View the script usage help
29
+
30
+ ```bash
31
+ $ grafanaCovertToGuance
32
+ ```
33
+
34
+ The specific script commands are:
35
+
36
+ - `-d`: Path to the Grafana JSON file, e.g.: `./grafana/json/grafana.json`
37
+ - `-o`: Output path for the Guance dashboard JSON file, e.g.: `./guance/json/guance.json`
38
+
39
+ 3. Execute the conversion command
40
+
41
+ ```bash
42
+ $ grafanaCovertToGuance -d ./grafana/json/grafana.json -o ./guance/json/guance.json
43
+ ```
44
+
45
+ 4. Import the converted JSON file in the Guance Cloud console.
46
+
47
+ 5. Done.
@@ -0,0 +1,37 @@
1
+ ---
2
+ title: 'Grafana Guance Datasource'
3
+ summary: 'Grafana 接入观测云数据提供的 Datasource 源'
4
+ icon: 'icon/xxx/'
5
+ ---
6
+
7
+ # Grafana Guance Datasource
8
+
9
+ 本插件目的为在 Grafana 中展示观测云数据,提供的 Datasource 插件。
10
+
11
+ ## 配置 {#config}
12
+
13
+ 1. [点击下载插件](https://static.guance.com/grafana-plugins/guance-guance-datasource.zip)
14
+
15
+ 2. 找到 Grafana 配置文件,默认路径参考[官方文档](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#configuration-file-location)
16
+
17
+ 3. 在配置文件中找到配置的插件目录
18
+
19
+ ```
20
+ [paths]
21
+ plugins = "/path/to/grafana-plugins"
22
+ ```
23
+
24
+ 4. 下载的文件解压放到插件目录
25
+
26
+ ```
27
+ unzip guance-guance-datasource.zip -d YOUR_PLUGIN_DIR/
28
+ ```
29
+
30
+ 3. 修改配置项为:
31
+
32
+ ```
33
+ [plugins]
34
+ allow_loading_unsigned_plugins = guance-guance-datasource
35
+ ```
36
+
37
+ 4. 重启 Grafana
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: 'Grafana Dashboard Import'
3
+ summary: 'Grafana Dashboard 模版导入观测云工具'
4
+ icon: 'icon/xxx/' # 这里是该主题的 icon 目录,该目录下有多个图片文件
5
+ ---
6
+
7
+ # Grafana Dashboard 导入工具
8
+
9
+ 观测云目前提供 grafana dashboard json 模版转换为观测云仪表板 json 模版的 node 脚本
10
+
11
+ ## 配置 {#config}
12
+
13
+ ### 前置条件 {#requirement}
14
+
15
+ 需要在系统中安装 `nodejs`、`npm`,版本要求如下:
16
+
17
+ 1. node >= 12.7.0
18
+ 2. npm >= 6.10.0
19
+
20
+ ### 使用方式
21
+
22
+ 1. 安装脚本
23
+
24
+ ```bash
25
+ $ npm install -g @cloudcare/guance-front-tools
26
+ ```
27
+
28
+ 2. 查看脚本使用帮助
29
+
30
+ ```bash
31
+ $ grafanaCovertToGuance
32
+ ```
33
+
34
+ 具体脚本执行命令如下:
35
+ `-d`: grafana json 文件的目录位置,例如:`./grafana/json/grafana.json`
36
+ `-o`: 观测云仪表板 json 文件的输出位置,例如: `./guance/json/guance.json`
37
+
38
+ 3. 执行转换命令
39
+
40
+ ```bash
41
+ $ grafanaCovertToGuance -d ./grafana/json/grafana.json -o ./guance/json/guance.json
42
+ ```
43
+
44
+ 4. 在观测云控制台导入转换后的 json 文件
45
+
46
+ 5. 完成