Jump to content

Monitor server status and receive an email if one of the cores goes down


Recommended Posts

This is a pretty simple tutorial in which I'll show you how to get notified via email (or sms, but this feature is not free) when your server goes offline or is not reachable for some reason.

 

I personally suggest and use HetrixTools, which will be also used in this tutorial.

 

Step 1)

First of all, you want to create an account on HetrixTools website.

 

Step 2)

After you have logged in, from the main menu click on Tools -> Uptime montitors.

spacer.png

 

and then click on Add monitor to add a new server.

spacer.png

 

Step 3)

A window will pop up. As monitor type select "Ping/Service monitor".

Then fill up the form as follows:

spacer.png

 

In the "Monitor from" section you have to select 4 locations. Choose them according to the continent where your server is hosted.

For example, my server is hosted in France and I picked these four locations:

285132Immagine-2021-02-28-115128.jpg

 

Then click on "show advanced settings" and change "Number of tries" to 1 (or 2) and finally click on "Add monitor".

285331Immagine-2021-02-28-115324.jpg

 

 

 

Now you will be notified if your server goes offline and you will have your personal server status page with detailed information :)

  • Love 3
  • Love 1
Link to post
  • Honorable Member

There's an even simpler solution if the cores crash: a telegram bot (probably a discord one is fine as well)

I did something like this with a single-line c++ telegram bot:

0Ckv6hb.png

The code for the game to handle the abort signal is just:

void emergency_sig(int32_t sig)
{
	if (sig == SIGSEGV)
	{
		tgfeed::CrashRpt();
		abort();
	}
}
// somewhere at the top inside int start(int argc, char **argv)
signal(SIGSEGV, emergency_sig);

in game/src/main.cpp

Edited by martysama0134
Link to post
2 minutes ago, martysama0134 said:

There's an even simpler solution if the cores crash: a telegram bot (probably a discord one is fine as well)

I did something like this with a single-line c++ telegram bot:

ENaUbU5.png

The code for the game to handle the abort signal is just:


void emergency_sig(int32_t sig)
{
	if (sig == SIGSEGV)
	{
		tgfeed::CrashRpt();
		abort();
	}
}
// somewhere at the top inside int start(int argc, char **argv)
signal(SIGSEGV, emergency_sig);

in game/src/main.cpp

 

From HentrixTools you can also get information about memory usage, cpu  usage, network usage etc... and log them (but you have to configure a php deamon for freebsd, however instructions are on hentrixtools website :P )

 

So you can also monitor server resources usage which is nice :)

 

280257Immagine-2021-02-28-130243.jpg

Edited by Cappuccino
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.