You are viewing a potentially older version of this package. View all versions.
bbar-SimpleHealthcheck-1.0.0 icon

SimpleHealthcheck

A lightweight Valheim server mod to support simple health monitoring via HTTP.

Date uploaded 3 years ago
Version 1.0.0
Download link bbar-SimpleHealthcheck-1.0.0.zip
Downloads 266
Dependency string bbar-SimpleHealthcheck-1.0.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2202 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2202

README

Valheim Server Simple HealthCheck

A lightweight Valheim server mod to support simple health monitoring via HTTP.

Features

This mod allows external uptime monitoring tools (e.g. UptimeRobot) to monitor the status of your Valheim server by creating a basic web server to listen for incoming HTTP requests. There are other solutions out there that are tied to external processes parsing server logs, but they require running a node instance and/or other infrastructure. The intention here is to have something basic tied into the running process that doesn't require other external dependancies.

The web server this mod creates will respond to HEAD and GET methods only. You can also specify a keyword to respond with to facilitate keyword monitoring, if desired (and supported by your monitoring service). See the Confgiuration section for more customization info.

The simplest way to set this mod up is to run it with your Valheim server, then point a reverse proxy to it from that machine.

Installation

BepinEx for Valheim is required for this plugin to work

Install from your favorite mod manager, or manually by following these instructions:

  1. Download and extract the build artifact for the latest release
  2. Place the bbar.Mods.SimpleHealthCheck.dll file into <GameDirectory>\Bepinex\plugins
  3. The first time the game starts with the plugin loaded, it will generate a config file: <GameDirectory>\BepinEx\config\bbar.Mods.SimpleHealthCheck.cfg
  4. Open the cfg file to change configuration as needed. Any manual changes to that file will require a restart. The plugin is also compatible with the BepinEx configuration manager.

Configuration

  • HttpHost
    • Default: localhost
    • The HTTP host or address to bind to.
  • HttpPort
    • Default: 5080
    • The HTTP port to use.
  • ResponseKeyword
    • Default: VALHEIM_SERVER
    • A keyword to return in GET requests to service keyword based monitoring.
  • SuccessCode
    • Default: 200
    • The HTTP status code to respond with to indicate server is running.

Attributions

CHANGELOG

Changelog

2.0.0

This version contains breaking changes for the CFG file. Please delete it prior to updating, or go in and fix things up after your first run with the new version.

  • Added feature to support calling arbitrary webhooks on specific events
  • Added support for calling endpoint periodically (i.e. heartbeat)
  • Reorganized config options
    • All of the options from v1.0.0 were related to the web server and were in the [General] section. They are now in their own [WebServer] section.
  • Updated to latest BepinEx for Valheim (5.4.2202)
  • Updated to latest Valheim game libs (0.217.38)

1.0.0

  • Initial Version