Похожие чаты

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 ответов

38 просмотров

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.

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

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

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта