Похожие чаты

Guys, is there any specific tool you know that could

help me achieve this:

I'm managing several raspberry pi remotely, and some VPS servers

I need to monitorize their status, remotely. For this I built an app that I install on each server and it reports to my main server the data I need.

I know there's a TON of tools to achieve this but I have no experience with any of those and many of those seems complicated to use or are paid, and I'm running out of time and money, that's why I decided to keep with the simple approach of building a basic app.

So far my app is working fine for the basic stats I need, but there's other stats that I'm not sure how to get.

My app just reports the following so far:

CPU usage: sar -P ALL 3 1 | grep -m 1 "all" | awk '{print 100 - $NF}'
RAM usage: free | grep Mem | awk '{print ($3/$2)*100}'
Storage usage: df -h / | awk 'NR==2 {print $5}'

But I need the temperature of each server too, because some microsd of some raspberrys sometimes gets damaged, etc and it could help me check it's health(? Maybe there's an alternative like SMART tests but I don't know them. If you know, please let me know.

Also I would like to know the temp of the CPU and maybe the temp of the ram too, idk if it's useful or just a waste of time

So far I've been using the commands before to get that data but I don't know if there's an alternative that could also give me all the data I need in a single command from the terminal so I can leverage on it and avoid making several runs of distinct apps everytime my app makes a report

Sorry if it's a basic question, I'm not a Linux pro. Nor a DevOps expert, etc.

22 ответов

35 просмотров

Why not just use a monitoring tool like Icinga2, Zabbix or Prometheus?

You can use a tool like Monit or Nagios however personally I haven't used either of them so can't really confirm if they're gonna work as expected

D-H Автор вопроса
Raptor Blue Bear
Why not just use a monitoring tool like Icinga2, Z...

I don't have time to learn how to use them and I need to centralize the reports in a single server

D H
I don't have time to learn how to use them and I n...

Icinga2 is very straight forward and has good documentation.

Raptor Blue Bear
Icinga2 is very straight forward and has good docu...

I really wouldn't claim it's straightforward :D

I hope you're at least throwing the data into grafana or something. Either way, launching MORE processes probably isn't helping, why don't you do the parsing in your application?

D-H Автор вопроса
Martin Rys
I hope you're at least throwing the data into graf...

I don't want to launch more processes, all I said is that I'm looking a way to launch a single process of some app that could give me all the data I need from a single command, instead of actually launching several programs And no, I'm not using grafana nor prometheus nor anything, as I said I'm not an expert and I don't have much free time, all I do is run this app and update a simple database in a centralized server through a web api so I can check it when I need it, not everything must be fancy and complex, this is not for selling services, it's just a personal basic tool to help me achieve a simple goal

D H
I don't want to launch more processes, all I said ...

Yes, you can write one. Instead of free, grep and awk, parse /proc/meminfo, for example.

D-H Автор вопроса
Martin Rys
Yes, you can write one. Instead of free, grep and ...

Yes I could do that, or just avoid all that parsing if there's some app that does it, then leverage on it and save a lot of time I mean, it could be more reliable to just use other's professionals work and abstract my app from those tasks, that's exactly what I'm looking for but I think it does not exist (? A tool named like "hoststats" and maybe some command like "hoststats -cpu -ram -storage -temp" I don't know, lol, there's so many tools that maybe in a Linux group, somebody knows about it so I can save a lot of time than building it myself, and if it's paid, I would pay it if the price is affordable

D H
Yes I could do that, or just avoid all that parsin...

Time to exfiltrate inhouse monitoring and make some money on the side 😂

D-H Автор вопроса
Martin Rys
Time to exfiltrate inhouse monitoring and make som...

If I'm willing to pay for it, maybe there's another person like me lol

D H
If I'm willing to pay for it, maybe there's anothe...

If only it weren't awfully illegal, I would have helped you out :D

D-H Автор вопроса
Martin Rys
Yes, you can write one. Instead of free, grep and ...

This ^ Meminfo does require a bit of basic math to get it to display the human readable values, but it’s a lot easier on the code because of that too. Not to mention that now you’re the one in control of what’s displayed and how. Nobody else stands in between that.

D-H Автор вопроса
Vim
This ^ Meminfo does require a bit of basic math to...

Yeah let's say ram usage is done that way, how about everything else?

Nagios with NRPE. The NRPE plugin can be coded with just Bash for whatever output status you want

Sharuzzaman Ahmat Raslan
Nagios with NRPE. The NRPE plugin can be coded wit...

I'd argue that Icinga2 with NRPE is better...I dislike Nagios

D-H Автор вопроса
Raptor Blue Bear
I'd argue that Icinga2 with NRPE is better...I di...

This is why I don't even know where to start lol

D H
This is why I don't even know where to start lol

NRPE runs as daemon on the remote client including the required plugins and command definitions. Icinga 2 calls the check_nrpe plugin binary in order to query the configured command on the remote client.

Похожие вопросы

Обсуждают сегодня

а через ESC-код ?
Alexey Kulakov
29
30500 за редактор? )
Владимир
47
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
13
any reference of this implementation?
BitBuddha
29
Ⓐrtto, [4/23/24 7:02 PM] Please explain more fully how it is not working exactly, and what are the steps you are taking, and what error messages come or what happens. Ⓐrtto, ...
Ezza Kezza
2
sounds like people have lost their kaspa on tradeogre... does this mean tradeogre not trustworthy?
Ezza Kezza
15
Страшнейшая правда про списки ЦБ. С первых дней жизни P2P сферы, молодые человеки, начитавшись законодательной базы и "внутренних" документов, решили, что им противостоит сер...
Foxcool
3
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
So much speculation in the last week. So much volatility in price. This is because Hedera has a GC that isn't using the network it's governing. Why aren't people asking why a...
Summit Seeker R
9
Карта сайта