Lite-monitor is a monitoring system based on shell commands. It can output logs or statistics according to the output of the project, and send alarm messages to the robot.

What Lite-Monitor can do:

  • Periodically monitors whether a service process exists. If no service process exists, alarms are generated.
  • Periodically collects statistics on the number of keyword occurrences in a specific log file in a recent period and compares the number of keyword occurrences with a threshold. If the number exceeds the threshold, an alarm is generated and logs are generated.
  • Advanced monitoring (QPS/computational efficiency, etc.) can be based onawkAnd other commands to customize implementation.

Lite-monitor features:

  • Each monitor can be configured with a different group of robots, which can be configured with @specific person or @all
  • There is no intrusion on existing projects, and no restart or other operations are required.
  • It can be a standalone, minimal configuration (Java installed on the server is fine), or a cluster deployment (rarely necessary unless you monitor a lot :smile:).

The trial

lite-monitor

Quick start

Install JDK1.8 or later and ensure that the network is normal.

packaging

git clone https://github.com/chentiefeng/lite-monitor.git
cd lite-monitor
mvn -Dmaven.test.skip=true clean package
Copy the code

The deployment of

Mkdir ~/lite-monitor-server cp target/lite-monitor-0.0.1- snapshot. jar ~/lite-monitor-server CD ~/lite-monitor-server Nohup Java -jar lite-monitor-0.0.1 -snapshot. jar 2>&1 &Copy the code

Log file location: ~/lite-monitor-server/logs/m.log.

Configuration monitoring

Browser input addresshttp://xx.xx.xx.xx:10003/Open the home page.

Process monitoring

I need to monitor the indicator-service progress on my local machine (which is easy to test).

The new.

Confirm – Do it now (test it).

Nail the news.

Log monitoring

I want to monitor the number of frequency keyword logs in the lite-monitor service of the local machine (which can be replaced by other machines) in the last minute. If the number of frequency keyword logs exceeds 2, the alarm will be reported.

Copy, modify information.

Confirm – Execute immediately (test) and nail the message.

Buy me a cup of coffee 🙂