Skip to content
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

Enhancement: Add configurable refresh interval and points for glances service #2363

Conversation

ni0ki
Copy link
Contributor

@ni0ki ni0ki commented Nov 22, 2023

Proposed change

Add support for configurable refresh interval and amounts of points for the Glances service widget.

-CPU:
  widget:
    type: glances
    url: http://url:port
    metric: cpu
    refreshInterval: 2500
    pointsLimit: 50

This opens 2 possibilities, mainly useful for people with a home that stays open for a long period:

  • Reduce the number of API calls by increasing the interval.
  • Have different monitored periods (see below)

image

A small note about network / disk
Information about IO/s for net (RX, TX) and disk (Read, Write) might seems strange, but is still correct. It will simply show the value for the immediate last refresh on glances' side, regardless of the configured interval

(I also alphabetically sorted the allowed keys to ease finding existing values)

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • If adding a service widget or a change that requires it, I have added corresponding documentation changes.
  • If adding a new widget I have reviewed the guidelines.
  • I have checked that all code style checks pass using pre-commit hooks and linting checks with pnpm lint (see development guidelines).
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.

Copy link
Collaborator

@shamoon shamoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I can look at this later. It’s always debatable when a change has not been requested anywhere to know how valuable it would be for the community at large, but it is likely harmless.

In the meantime, please revert the alphabetizing change, it’s more useful to see them grouped by widget. Thanks

@ni0ki
Copy link
Contributor Author

ni0ki commented Nov 22, 2023

In the meantime, please revert the alphabetizing change, it’s more useful to see them grouped by widget. Thanks

Reverted. But I kindly disagree, as it's difficult to read in its current shape.
Maybe it should be organized by widget name to keep the grouping while making it clearer.

@ni0ki ni0ki force-pushed the feature/configurable-interval-points-glances-service branch from bd373ae to cea9813 Compare November 22, 2023 16:50
@ni0ki ni0ki force-pushed the feature/configurable-interval-points-glances-service branch from cea9813 to 4194b57 Compare November 22, 2023 16:53
@shamoon
Copy link
Collaborator

shamoon commented Nov 22, 2023

You also didnt run the pre-commit hooks?

@shamoon
Copy link
Collaborator

shamoon commented Nov 22, 2023

I ran pre-commit and also organized the list a bit differently, I see your point about that

@ni0ki
Copy link
Contributor Author

ni0ki commented Nov 22, 2023

I ran pre-commit and also organized the list a bit differently, I see your point about that

Thanks. I only ran the lint command, but without a warning on my modifications, I thought it was correct, my mistake.

@shamoon
Copy link
Collaborator

shamoon commented Nov 22, 2023

Nothing major but did need a lint and I enforced a minimum refresh (we like to do this to maybe avoid people DDoSing themselves)

Also, I dont disagree with the checking of the refreshInterval param, but since we dont do it anywhere I made it consistent

In general, this works well and I do see the value in it.

Let me know if you have any concerns, thanks for the PR

@shamoon shamoon enabled auto-merge (squash) November 22, 2023 19:51
@shamoon shamoon enabled auto-merge (squash) November 22, 2023 19:51
@ni0ki
Copy link
Contributor Author

ni0ki commented Nov 22, 2023

Nothing major but did need a lint and I enforced a minimum refresh (we like to do this to maybe avoid people DDoSing themselves)

Also, I dont disagree with the checking of the refreshInterval param, but since we dont do it anywhere I made it consistent

Fine by me. Enforcing a minimum interval is a good idea. I'll follow your decision about checking refreshInterval.

Everything is good on my side, thanks for the adjustements!

@shamoon shamoon merged commit c2729e3 into gethomepage:main Nov 22, 2023
2 checks passed
truecharts-admin added a commit to truecharts/charts that referenced this pull request Nov 25, 2023
…0.8.2@0c033b5 (#15369)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[ghcr.io/gethomepage/homepage](https://togithub.com/gethomepage/homepage)
| patch | `v0.8.0` -> `v0.8.2` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>gethomepage/homepage (ghcr.io/gethomepage/homepage)</summary>

###
[`v0.8.2`](https://togithub.com/gethomepage/homepage/releases/tag/v0.8.2)

[Compare
Source](https://togithub.com/gethomepage/homepage/compare/v0.8.0...v0.8.2)

#### Notice

This release fixes an issue in v0.8.1 that breaks homepage for some
users

#### What's Changed

- Feature: Added timeStyle to date format for custom API by
[@&#8203;azizbna](https://togithub.com/azizbna) in
[gethomepage/homepage#2294
- Enhancement: open the searchbox on paste by
[@&#8203;Faqar](https://togithub.com/Faqar) in
[gethomepage/homepage#2320
- Fix: dont set pinned icon if custom favicon by
[@&#8203;shamoon](https://togithub.com/shamoon) in
[gethomepage/homepage#2326
- Fix: sum throughput data for docker stats by
[@&#8203;shamoon](https://togithub.com/shamoon) in
[gethomepage/homepage#2334
- Fix: Disable override white bkgd with card blur by
[@&#8203;shamoon](https://togithub.com/shamoon) in
[gethomepage/homepage#2336
- Documentation: add Longhorn example by
[@&#8203;Aesop7](https://togithub.com/Aesop7) in
[gethomepage/homepage#2353
- Enhancement: Add service discovery support for multiple homepage
instances by [@&#8203;timo95](https://togithub.com/timo95) in
[gethomepage/homepage#2340
- Enhancement: Add configurable refresh interval and points for glances
service by [@&#8203;ni0ki](https://togithub.com/ni0ki) in
[gethomepage/homepage#2363
- Fix: dont ignore empty string for kubernetes podSelector by
[@&#8203;shamoon](https://togithub.com/shamoon) in
[gethomepage/homepage#2372
- Fix: show mem / cpu stats for k8s partial health status by
[@&#8203;shamoon](https://togithub.com/shamoon) in
[gethomepage/homepage#2378
- Enhancement: Use `hasFile` instead of `isAvailable` for Radarr integr…
by [@&#8203;denispapec](https://togithub.com/denispapec) in
[gethomepage/homepage#2374
- Feature: Support previous days option in Calendar Agenda by
[@&#8203;denispapec](https://togithub.com/denispapec) in
[gethomepage/homepage#2375
- Feature: Implement iCal integration for calendar/agenda, improve
calendar/agenda styling by
[@&#8203;denispapec](https://togithub.com/denispapec) in
[gethomepage/homepage#2376
- Documentation: Add ai bot by
[@&#8203;shamoon](https://togithub.com/shamoon) in
[gethomepage/homepage#2383

#### New Contributors

- [@&#8203;azizbna](https://togithub.com/azizbna) made their first
contribution in
[gethomepage/homepage#2294
- [@&#8203;Faqar](https://togithub.com/Faqar) made their first
contribution in
[gethomepage/homepage#2320
- [@&#8203;timo95](https://togithub.com/timo95) made their first
contribution in
[gethomepage/homepage#2340
- [@&#8203;ni0ki](https://togithub.com/ni0ki) made their first
contribution in
[gethomepage/homepage#2363

**Full Changelog**:
gethomepage/homepage@v0.8.0...v0.8.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy42OC4xIiwidXBkYXRlZEluVmVyIjoiMzcuNjguMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
Copy link
Contributor

github-actions bot commented Feb 5, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants