I use some batch scripts in my proxmox installation. They are in cron.hourly and daily checking for virus and ram/CPU load of my LXC containers. An email is send on condition.

What are your tipps or solution without unnecessary load on disc io or CPU time. Lets keep it simple.

Edit: a lot of great input about possible solutions. In addition TIL “that keep it simple” means a lot of different things to people.😉

1 point

I used monitorix a long time ago. now netdata.

permalink
report
reply
2 points

I use netdata, it’s very good at digesting thousands of metrics to sharing actionable. The cloud portion is proprietary, but you can toggle off the data collection. I did turn on the cloud portion though, I get email notifications when something breaks. Might sound counter to the self hosted mantra, but a self hosted monitoring system isn’t very helpful when your own systems go down.

permalink
report
reply
1 point

Regarding your edit: people are answering the question you posed in your post title, not necessarily giving you advice about how you should do it.

permalink
report
reply
3 points
*

I set up custom bash scripts collecting information (df, docker json, smartCTL etc) Either parse existing json info or assemble json strings and push it to Homeassistant REST api (cron) In Homeassistant data is turned into sensors and displayed. HA sends messages of sensors fail.
Info served in HA:

  • HDD/SSD (size, smartCTL errors, spin up/down, temperature etc)
  • Availability/health of docker services
  • CPU usage/RAM/temperature
  • Network interface/throughput/speed/connections
  • fail2ban jails

Trying to keep my servers as barebones as possible. Additional services/apps put strain on CPU/RAM etc. Found out most of data necessary for monitoring is either available (docker json, smartCTL json) or can be easily caught, e.g.

df -Pht ext4 | tail -n +2 | awk '{ print $1}

It was fun learning and defining what must be monitored or not, and building a custom interface in HA.

permalink
report
reply
3 points
*

Thats basically the way I do it.

pvesh get /cluster/resources --output-format json-pretty | jq --arg k "lxc/$container_id" -r 'map(select(.id == $k))[].name, map(select(.id == $k))[].mem, map(select(.id == $k))[].maxmem, map(select(.id == $k))[].cpu')

Example using pvesh in proxmox. The data is available, just have to use it. I also prefer barebone approach.

permalink
report
parent
reply
2 points

At last we keep it simple ;)

permalink
report
parent
reply
3 points
*

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
HA Home Assistant automation software
~ High Availability
SSD Solid State Drive mass storage
VPN Virtual Private Network

4 acronyms in this thread; the most compressed thread commented on today has 14 acronyms.

[Thread #11 for this sub, first seen 19th Jul 2023, 17:40] [FAQ] [Full list] [Contact] [Source code]

permalink
report
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 4.8K

    Monthly active users

  • 3.5K

    Posts

  • 79K

    Comments