Customize the Cluster Analysis Grafana Panel
1. Procedure
Log in to the core node and all nodes derived from the core node, then edit the /fastone-services/fastone/ui/assets/custom-data/cluster-monitor-panel.json file.
2. File Attributes
category
This is an array with two sections, corresponding to the Query and Analysis modules of the monitoring panel.
props
Table 1
| Attribute | Type | Description |
|---|---|---|
| title | Object | Bilingual title configuration with default values. It can be changed. See Table 2 for details. |
| layout | Object | Internal layout configuration for the monitoring panel list. Currently only column configuration is supported. The default is one column. See Table 3 for details. |
| list | Array | Shortcut configuration under the current category. See Table 4 for details. |
Table 2
| Attribute | Type | Notes |
|---|---|---|
| cn | String | Chinese title. A default value is provided and can be changed. |
| en | String | English title. A default value is provided and can be changed. |
Table 3
| Attribute | Type | Notes |
|---|---|---|
| col | Number of displayed columns | The current display follows the product layout. If you want to change between one and two columns, modify this value. |
Table 4
| Attribute | Type | Notes |
|---|---|---|
| title | Object | Bilingual title configuration with default values. It can be changed. See Table 2 for details. |
| link | String | Internal route link used for shortcut navigation. |
| linkSlurmMonitor | Boolean | Indicates whether the target page is the scheduler monitoring page. This navigation is handled specially and evaluated against product conditions before the jump. Do not change it. |
| checkPermission | Boolean | Indicates whether permissions must be checked when opening the current link. At present, only administrator permission is checked. Set this to true if permission validation is required. |
| permissions | String | When checkPermission is true, this specifies the required permission. Currently only administrator permission is supported (ROLE_ADMIN). This is used by the R&D configuration for navigation. Do not change the default configuration. If a later item should be visible only to administrators, follow this configuration pattern. |
| queryParma | Object | Parameters required for internal project navigation. Do not change it. |
| grafanaLink | Object | Configuration used when the shortcut opens a Grafana chart. Note: navigation uses the link field first. The grafanaLink configuration is read only when link is empty. Therefore, do not configure link when rendering a Grafana chart. |
| desc | Object | Prompt text displayed above the dashboard. See Table 5 for details. |
| hiddenSetTime | Boolean | Hides the default time-setting feature. Some dashboards do not require time filtering. The default value is false, which means the control is shown. |
Table 5
| Attribute | Type | Notes |
|---|---|---|
| cn | Array of strings | Chinese prompt text. Separate each line with ,. The default is [], which means nothing is displayed. It can be changed. |
| en | Array of strings | English prompt text. Separate each line with ,. The default is [], which means nothing is displayed. It can be changed. |
Other Notes
- Incorrect file changes or changes that do not follow this document may cause shortcut links or navigation to fail. Follow this document when editing the file.
- After changing the file configuration, previously opened dashboard pages may render incorrectly because the system generates a unique ID for matching each time. Close the page and open it again.
3. Add Custom Grafana Dashboard Information
Clear the browser cache and refresh the cluster analysis page to verify whether the configuration has taken effect.
4. Example: Import a License Dashboard
Clear the browser cache and refresh the cluster analysis page to verify whether the configuration has taken effect.
- Import the license dashboard JSON file license-dashboard.json into Grafana. Assume the URL is
/grafana/d/License/license. - Edit
cluster-monitor-panel.jsonand add the following content:
{
"category": [
{
"title": {
"cn": "Query in Chinese",
"en": "Query"
},
"list": [
{
"title": {
"cn": "License Monitoring in Chinese",
"en": "License Monitoring"
},
"grafanaLink": {
"cn": "/grafana/d/License/license",
"en": "/grafana/d/License/license"
},
"desc": {
"cn": [
"License monitoring information in Chinese"
]
}
}
]
},
{
"title": {
"cn": "Analysis in Chinese",
"en": "Analysis"
},
"list": []
}
]
}