Похожие чаты

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

15 просмотров

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

Eduard-Rivas Автор вопроса
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

Eduard Rivas
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?

Eduard-Rivas Автор вопроса
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

Eduard Rivas
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.

Eduard-Rivas Автор вопроса
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

Eduard Rivas
Yes I could do that, or just avoid all that parsin...

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

Eduard-Rivas Автор вопроса
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

Eduard Rivas
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

Eduard-Rivas Автор вопроса
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.

Eduard-Rivas Автор вопроса
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

Eduard-Rivas Автор вопроса
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

Eduard Rivas
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.

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

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

Anyone here suffers from unexplained aural migraines, who would be up for talking for a bit? Doesn't *have* to be aural, but I am not asking about headaches, I mean actual mi...
Martin Rys
55
We heading to 1.1$ 🤔?
CryptoBo$$
35
Сonst magicTgHTML = (text, entities) => { let processedText = text; let offsetShift = 0; entities.forEach(entity => { const { offset, length, type, url, ...
Андрей
1
A couple thoughts from a random internet stranger: 1. If you want this project to gain traction you cannot keep being negative. If I just came here after finding out about Kd...
Eric Wild
45
Здравствуйте товарищи! решил всё таки поставить линукс. Порядок создание разделов /boot/efi 200МиБ; /boot 1000; подсистему / 80000; swap 8Гб Будет норм?
K2
19
How Will #Monero Be Attacked? First of all I want to tell you that this is not teaching the network attackers, the central regulators. They already know how to attack the net...
Li₿ΞʁLiøη
3
#wazirx 15 May my account has fund of rupees 10000 but 16 May my balance is showing 8200 why?? Without any withdrawal
Learnwi
12
подскажите пожалуйста, как мне освободить результат записанный в переменную result? в чем проблема подскажите если МОЖЕТЕ?
Михаил Helper
28
Can you help a noob? I know LTC was one of the early alt coins. But what is the benefit of it today? What are its attributes? Why should I be bullish on it this bull run?
CryptoNoobian ($PEPI)
11
есть тут кто-то , кто только начал изучать си? если проходите курс на степике или как-то сами изучаете, пишите, может, скооперируемся?..
Eule
25
Карта сайта