Replies: 3 comments 3 replies
|
As a quick follow-up I submitted an issure re. the limitations to the crafty gitlab: https://gitlab.com/crafty-controller/crafty-4/-/issues/283. Ideally, we won't need a superuser token, and can present 'overall' stats rather than per server. |
0 replies
|
Updated with whole-server stats, and because the server_ID switched from number to UUID and AFAIK the hyphens in the UUID break the widget (http error) - Crafty Controller:
icon: https://docs.craftycontrol.com/img/favicon.ico
href: https://crafty.{{HOMEPAGE_VAR_DOMAIN}}:8443
ping: https://crafty.{{HOMEPAGE_VAR_DOMAIN}}:8443
widget:
type: customapi
url: https://crafty.{{HOMEPAGE_VAR_DOMAIN}}:8443/api/v2/crafty/stats
refreshInterval: 10000
method: GET
headers:
Authorization: Bearer {{HOMEPAGE_VAR_CRAFTY_TOKEN}}
mappings:
- field: status
label: Status
format: text
- field:
data: cpu_usage
label: CPU
format: percent
- field:
data: mem_percent
label: RAM
format: percent
- field:
data: mem_usage
label: RAM
format: text
suffix: "/24GB" |
3 replies
|
This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
With much help from their discord, I've been able to put together a Crafty widget. Note the requirements and limitations below.
Requirements
Requires an API token. In the Crafty webUI click the settings gear, find your user (e.g., admin), then click the pencil edit icon for the user. Click the API key tab. For some reason, it requires
superuserto be selected. Accordingly, consider using a secret as I did above.Limitations
Only shows stats for a single, specific server, designated by the ID number in the path,
1in my example above. If you have multiple crafty servers, you'd have to make additional widgets, changing this path.Other Possible Fields
Anything under: https://wiki.craftycontrol.com/en/4/docs/API%20V2#get-a-server-s-statistics is fair game. Here's a few that might be useful to swap in (untested):
Closes: #1312
All reactions