Minetest monitoring server

56independent_actual
Member
Posts: 35
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: UK
Contact:

Re: Minetest monitoring server

by 56independent_actual » Post

56independent_actual wrote:
Mon Jul 05, 2021 20:44
I know I am most likely wrong, but is there a way to make myself have live stats, using grafina, but in a mapserver type of way, where I host the stats and I can run the stat logger when I like? My server runs intermittently, with hours of downtime at times.
Here follows an IRC message, posted here in courtesy:

<BuckarooBanzai> independent56: (i don't use the forum anymore so i answer here) there are some docs on how to set it up loacally: https://github.com/minetest-monitoring/ ... ndalone.md the whole thing is better manageable with docker though, just saying...
I do not mean any offence, ill-intent, or insult with this message. Unless it is obvious I do.

User avatar
Festus1965
Member
Posts: 2112
Joined: Sun Jan 03, 2016 11:58
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: Minetest monitoring server

by Festus1965 » Post

as I search for the reason of more lag last weeks, I set it up again,
but
what IP is meant here:

Code: Select all

secure.http_mods = monitoring
monitoring.prometheus_push_url = http://127.0.0.1:9091/metrics/job/minetest/instance/my_server
as instead of 127.0.0.1:
* the ip where pushgateway, and prometheus are running
* or the here at me other IP of grafana

as with the 127.0.0.1 or the real IP from push_gateway I got

Code: Select all

2021-07-15 00:15:41: ERROR[CurlFetch]: https://127.0.0.1/push/metrics/job/minetest/instance/Asia Thailand not found (SSL peer certificate or SSH remote key was not OK) (response code 0)
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Miniontoby
Member
Posts: 494
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest monitoring server

by Miniontoby » Post

Festus1965 wrote:
Wed Jul 14, 2021 17:52
what IP is meant here as instead of 127.0.0.1:
* the ip where pushgateway, and prometheus are running
* or the here at me other IP of grafana
The 127.0.0.1 is just assuming you run pushgateway (and prometheus) on your computer where mt is running on. This computer is called localhost. So if you dont have pushgateway and prometheus on localhost then change 127.0.0.1 to that computer IP address.

So dont use the ip of grafana here!!!!
Festus1965 wrote:
Wed Jul 14, 2021 17:52
as with the 127.0.0.1 or the real IP from push_gateway I got

Code: Select all

2021-07-15 00:15:41: ERROR[CurlFetch]: https://127.0.0.1/push/metrics/job/minetest/instance/Asia Thailand not found (SSL peer certificate or SSH remote key was not OK) (response code 0)
This error seems like only an SSL error. And i see why:

Code: Select all

ERROR[CurlFetch]: https://127.0.0.1/push/
it tries to connect to https:// and not http://

and btw it seems like it misses the port (9091) too.

And btw DONT USE SPACES IN LINKS, that wont work, replace it with a '_'


If you use this in your minetest.conf then you shall be fine if pushgateway is running on localhost:

Code: Select all

monitoring.prometheus_push_url = http://127.0.0.1:9091/metrics/job/minetest/instance/Asia_Thailand
Working on adv_csm ---- Check my mod "Doorbell" -- Stay safe

User avatar
Festus1965
Member
Posts: 2112
Joined: Sun Jan 03, 2016 11:58
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: Minetest monitoring server

by Festus1965 » Post

thanks
but prometheus and pushgateway are on the same mashine as the mt server, (so I keep 127.0.0.1)
and with the same "Asia Thailand" and https it is working for monitoring.minetest.land (minetest.conf)

I might play with the http / https next time, but when the problem is solved by found the 'problem' as pipeworks,
I may be able to disable all monitoring for some time again ...
and able to test another config, as not bad if it fails then again (job of monitoring seams to done)
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
Miniontoby
Member
Posts: 494
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest monitoring server

by Miniontoby » Post

monitoring.minetest.land is a public domain which means that it is required to use ssl, but on localhost (and just localnet) it is 99.99% sure it is private and then you cannot make a working ssl cert. And then http is the way to go.

And making ssl for a listener like this is a bit tricky. You need to understand how it works and you need a good program to relay it to ssl. (I have had a training at IRCNow and I got my own public vps and I learned how to do this the easy way)

But I recommend keeping pushgateway and prometheus on http
Working on adv_csm ---- Check my mod "Doorbell" -- Stay safe

Mineminer
Member
Posts: 203
Joined: Mon Mar 05, 2018 04:05

Re: Minetest monitoring server

by Mineminer » Post

Miniontoby wrote:
Mon Jul 19, 2021 15:54
monitoring.minetest.land is a public domain which means that it is required to use ssl, but on localhost (and just localnet) it is 99.99% sure it is private and then you cannot make a working ssl cert. And then http is the way to go.

And making ssl for a listener like this is a bit tricky. You need to understand how it works and you need a good program to relay it to ssl. (I have had a training at IRCNow and I got my own public vps and I learned how to do this the easy way)

But I recommend keeping pushgateway and prometheus on http
Just as long you understand it's implementations, for a simple monitoring it might be preferred since who's cares if someone gets to know the metrics or whatever I am right?

BUT! If there is authentications involved (between servers, users, admins, etc) THEN you MUST be using HTTPS and all other standard security protocols (not be using MD5 for hashing if possible and so on).

User avatar
Miniontoby
Member
Posts: 494
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest monitoring server

by Miniontoby » Post

So let me make clear that there is NO AUTHentication involved here.

Btw why would you care about ANYONE seeing the stats of your server(s)?? I have mine public so they can see for uptime and downtime and that kind of stuff.

There is no data beeing send that needs to be encrypted. This mod is NOT going to share passwords or so...
Working on adv_csm ---- Check my mod "Doorbell" -- Stay safe

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest