Nagios Plug-in - check_shard.php

Nagios Plug-in - check_shard.php 1.0

Author
CEO
Downloads
21
Views
1,828
First release
Last update
Rating
0.00 star(s) 0 ratings
No permission to download Join the discussion
Requirements
Nagios Server
Tired of finding out your shard's been down for hours or days? :rolleyes: If you're running a Nagios Server (google it, it's a requirement), this plug-in connects to your shard and reports various stats, but mostly will report critical if the connect fails (shard down). Also returns warning or critical if latency is above a certain parameter.

/*
Name: check_shard.php
Author: CEO ([email protected])
Version: 1.0
Public Release: 03/30/19
Purpose: Checks whether an Ultima Online Freeshard is up and responding
Usage: check_shard -H shardhost -p port -w wtime -c ctime
-H shardhost, either IP or hostname
-p port = port your shard is running on, default = 2593
-w wtime = raise a warning if response time is > wtime, default = 0.75
-c ctime = raise a critical if response time is > ctime, default = 1.5

Note: -w and -c are very high, if your response time is 3/4 secs
your shard is probably unplayable!
*/

To use:

Rename check_shard.txt to check_shard.php and put in your /usr/local/libexec/nagios folder

Edit your nagios checkcommands.cfg to include:

define command{
command_name checkshard
command_line php $USER1$/check_shard.php -H $HOSTADDRESS$ -w 0.5 -c 1.0
}

Add your server and a service to your nagios config files. If you're running Nagios you should know how to do this.

Sample output:

Shard: Alexandria, Uptime: 2.42 Days, Response: 0.07ms
Players online: 6/53668, Items: 887132, Mem Used: 53668Kb
  • Like
Reactions: Argalep and Milva

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back