-
Notifications
You must be signed in to change notification settings - Fork 47
Add alerts for high CPU usage and temperature in BlueOS #2115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add alerts for high CPU usage and temperature in BlueOS #2115
Conversation
854f847 to
dbce468
Compare
ES-Alexander
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool idea!
I think the interface is a little unclear at the moment. In particular:
- Do the voice settings still apply for the BlueOS alerts?
- Are the "Alert levels" actually "MAVLink alert levels"? Or "Autopilot alert levels"?
- Should this be in its own collapsible section?
More generally, could we:
- Move the alert voice selector up to beside the "enable voice alerts" toggle?
- Compress the BlueOS alerts, either into a single row each, or by moving the CPU usage alert config into a column to the right of the temperature alert?
| <ExpansiblePanel :is-expanded="false"> | ||
| <template #title>BlueOS monitoring alerts:</template> | ||
| <template #info> | ||
| Configure alerts for BlueOS system monitoring including CPU temperature and usage thresholds. <br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Configure alerts for BlueOS system monitoring including CPU temperature and usage thresholds. <br /> | |
| Configure alerts for BlueOS system monitoring, including CPU temperature and usage thresholds. <br /> |
|
related to: mavlink/mavlink#2347 |
All good points! Voice settings still apply and alert levels are "cockpit" alert levels, so they apply to everything, including the BlueOS and MAVLink ones. We should mention that the BlueOS ones are at Warning level, so it's more clear. We should also indeed better separate the categories, so it is clear those are general settings. Will work on that tomorrow. |
|
@ES-Alexander what do you think about this?
|
dbce468 to
fb9f91a
Compare
| <select | ||
| v-model="vehicleAlerterStore.blueOsAlertsConfig['cpu-temperature'].level" | ||
| class="px-2 py-1 rounded-sm bg-[#FFFFFF22] text-sm w-24" | ||
| :disabled="!vehicleAlerterStore.blueOsAlertsConfig['cpu-temperature'].enabled" | ||
| > | ||
| <option value="success">Success</option> | ||
| <option value="info">Info</option> | ||
| <option value="warning">Warning</option> | ||
| <option value="error">Error</option> | ||
| <option value="critical">Critical</option> | ||
| </select> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use v-select on dark mode as a standard to keep UI consistency
| <input | ||
| v-model="vehicleAlerterStore.blueOsAlertsConfig['cpu-temperature'].enabled" | ||
| type="checkbox" | ||
| class="w-4 h-4" | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the v-checkbox as on the elements below to keep UI consistency
ArturoManzoli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed an 'add icon' to include a secondary alert on a different severity.
This way users can receive a warning at 60º C and a critical at 90º C, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the same way the checkboxes and select inputs, the number inputs should also be using the vuetify elements whenever possible. Those standard <input number /> are very handy on tight UI spaces, where the vuetify component has too many visual elements to be displayed.
| <td class="py-3 text-center"> | ||
| <div class="flex items-center justify-center gap-2"> | ||
| <input | ||
| v-model.number="vehicleAlerterStore.blueOsAlertsConfig['cpu-temperature'].threshold" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure if this is the correct approach to do that, the system-information page has the /platform endpoint where it returns platform specific data, in this case, for the raspberry, it returns the events such as thermal throttle, under voltage, and others.
For a complete list, check here:
https://github.com/patrickelectric/linux2rest/blob/master/src/features/platform/raspberry.rs#L10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I like the idea of implementing the undervoltage and throttling warns as well.
About allowing customization of the threshold for those that have continuous values, it is needed since each platform behaves differently, and the user will know better than anyone what is a safe level for their mission and when they need to be warned to take action.
This actually gave me an idea. I will modify the PR to allow the user to create their own alerts from any variable, not just BlueOS ones. |
|
Closed in favor of #2305. |


Adds two initial alerts for BlueOS: high CPU usage and high CPU temperature.
Both alerts are configurable. The user can change the threshold as well as the minimum interval between alerts in the alerts config menu. Both alerts can also be completely disabled, if desired.
The idea with this PR is that the user can know when the BlueOS CPU is acting abnormal, so they can take providences.