System online LogHive Insight

Ensuring System Availability: How to use LogHive Insights to check system online state in C#

As a provider of a own software solution, it’s important to ensure that your system is always online and available to your users. One way to do this is by periodically sending a “keep alive” signal to a server to monitor its online status. With LogHive Insights, you can easily set up this check and view the state of your system on a dashboard.

Set up the keep alive signal in C#

First, you’ll need to set up a keep alive signal that sends a request to your server at regular intervals. This signal can be as simple as a small HTTP request that pings the server and checks if it’s up and running.

Here’s an example of how you could implement this in C#:

Simply send an Insight with the value 0 or 1 to LogHive.

Code example for C#

You’re lucky! There is already an SDK available for C# that you can easily download via NuGet. With this, you only need a maximum of two lines of code to push an event to LogHive.

var logger = new LogHiveApi("your-api-key");

// online offline state
await logger.SetSystemOnlineAsync("MySaas", "system1");
await logger.SetSystemOfflineAsync("MySaas", "system1");

The SDK internally uses HttpClient, so you only need to instantiate LogHiveApi once.

NuGet Link:

GitHub Link:

You will receive the project and group name, as well as the ApiKey, in the following step when you create an account.

Check out code examples in other programming languages.:

Set up a LogHive Account

Sign up for LogHive and create a free account. Navigate to the webapp at

You can find your API key in your user profile.

Set up the the dashboard

Once you have the keep alive signal set up, you’ll need to create a dashboard in LogHive Insights to view the state of your system. To do this, log in to the LogHive web application.

Next, you’ll need to add a widget to the dashboard that displays the online state of your system.

LogHive has its own element type for this purpose where you can directly parameterize the Keep Alive signal

Now that you have the keep alive signal and dashboard set up, you can monitor the state of your system . If the server fails to respond to the keep alive signal, you’ll be notified in the LogHive dashboard, allowing you to quickly address any issues that may arise.

System Online State per Insight Event

In conclusion, monitoring the online state of your system is an important task that can be easily accomplished using LogHive Insights. By setting up a keep alive signal and monitoring it on the LogHive dashboard, you can ensure that your system is always online and available to your users.

Latest Posts