login | about |



Rexmonitor

Rexmonitor is simple server monitoring service. It's strengths are:
How to install
- Create an account. You will receive a client id and each machine will have it's machine id.
- Download agent (StatsRecorder.exe) for your operating system. Agent is written in C# and requires .net 4.5 or higher for windows and mono 3.0 or higher for linux.
- Open StatsRecorder.exe.config and specify your client id and machine id there.
- Schedule agent to run once per minute (other intervals not going to work). It's important to make it run with highest privileges (root in linux). In windows use task scheduler, in linux - crontab:
   sudo crontab -e
   */1 * * * * mono /path/to/StatsRecorder.exe
- That's it - the agent will collect and send data once per minute.

Windows stats recorder
Linux stats recorder

What the data means
Agents use these performance counters:
Notification system
Rexmonitor supports writing your own code (currently in C# only) to determine whether an email should be sent. Here is how it works: Example code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
            //DATA_START
            var cpu_120 = new List<long>() {0}; //last 2 hours data
            var ram_120 = new List<long>() {0}; //last 2 hours data
            var space_1 = new List<long>() {0}; //last minute data
            //DATA_END
             
            //last 10 minutes cpu average > 90%
            if(cpu_120.Skip(110).Average() > 90)
            {
                Console.Write("1 last 10 minutes cpu average > 90%: {0}", cpu_120.Skip(110).Average());
                return;
            }
            //last 10 minutes ram average > 6500Mb
            if(ram_120.Skip(110).Average() > 6500)
            {
                Console.Write("1 last 10 minutes ram average > 6500Mb: {0}", ram_120.Skip(110).Average());
                return;
            }            
            
            //change of cpu pattern
            if(cpu_120.Take(80).Average() > cpu_120.Skip(80).Average() + 15 ||
               cpu_120.Take(80).Average() < cpu_120.Skip(80).Average() - 15)
            {
                Console.Write("1 change of cpu pattern");
                return;
            }                        
            
            //free disk space less than 50Gb
            if(space_1.Any(f => f > 150000))
            {
                Console.Write("1 free disk space less than 50Gb");
                return;
            }
            
            Console.Write("0");
        }
    }
}


Support
Support google group