GithubHelp home page GithubHelp logo

septrum101 / lightsailmon Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 4.0 318 KB

An AWS Lightsail monitor service that can auto change blocked IP.

License: Mozilla Public License 2.0

Go 96.54% Dockerfile 1.83% Makefile 1.63%

lightsailmon's Introduction

Lightsail Monitor

An AWS Lightsail monitor service that can auto change blocked IP.

Feature

  • Support message push when IP is changed via PushPlus or Telegram Bot.
  • Support auto sync IP with Cloudflare and Google Domain

How to use

refer: config.example.yml

LogLevel: warning # Log level: debug, info, warn, error, fatal, panic
Internal: 300 # Time to check the node connection (unit: second)
Timeout: 15 # Timeout for the tcp request (unit: second)
Concurrent: 20 # Max concurrent on nodes check

DDNS:
  Enable: true
  Provider: cloudflare
  Config:
    CLOUDFLARE_EMAIL: [email protected]
    CLOUDFLARE_API_KEY: YOUR_TOKEN
#  Provider: google
#  Config:
#    GOOGLEDOMAIN_USERNAME: username
#    GOOGLEDOMAIN_PASSWORD: password

Notify:
  Enable: false
  Provider: pushplus
  Config:
    PUSHPLUS_TOKEN: YOUR_TOKEN
#  Provider: telegram
#  Config:
#    TELEGRAM_CHATID: 123
#    TELEGRAM_TOKEN: YOUR_TOKEN

Nodes:
  - AccessKeyID: YOUR_AWS_AccessKeyID
    SecretAccessKey: YOUR_AWS_SecretAccessKey
    Region: ap-northeast-1 # AWS service endpoints, check https://docs.aws.amazon.com/general/latest/gr/rande.html for help
    InstanceName: Debian-1
    Network: tcp4 # The type of network (tcp4, tcp6)
    Domain: node1.test.com # The node domain
    Port: 8080 # The node port

  - AccessKeyID: YOUR_AWS_AccessKeyID
    SecretAccessKey: YOUR_AWS_SecretAccessKey
    Region: ap-northeast-1 # AWS service endpoints, check https://docs.aws.amazon.com/general/latest/gr/rande.html for help
    InstanceName: Debian-1
    Network: tcp4 # The type of network (tcp4, tcp6)
    Domain: node2.test.com # The node domain
    Port: 8080 # The node port

Installation

Docker (recommend)

Rename config.example.yml to config.yml and fill with right params, and then run those command:

docker run -d -v .:/etc/LightsailMon

Others

Currently not supported

Sponsors

Thanks to the open source project license provided by Jetbrains

lightsailmon's People

Contributors

dependabot[bot] avatar septrum101 avatar

Stargazers

 avatar Ajam avatar fly2sky  avatar  avatar Elroy Mccready avatar Eric Hollis avatar  avatar

Watchers

 avatar

lightsailmon's Issues

这个错误是怎么回事?麻烦了

time="2024-03-10T16:48:35+08:00" level=warning msg="LightsailMon Started"
LightsailMon dev, built at 2024-02-19T15:32:24+00:00
An AWS Lightsail monitor service that can auto change blocked IP.
Log level: warning, Concurrent: 20, DDNS: Cloudflare, Notifier: off
time="2024-03-10T16:50:46+08:00" level=error msg="RequestError: send request failed\ncaused by: Post "https://lightsail.ap-southeast-1.amazonaws.com/\": dial tcp 54.240.226.245:443: i/o timeout" domain=x1.x.top
time="2024-03-10T16:52:46+08:00" level=error msg="RequestError: send request failed\ncaused by: Post "https://lightsail.ap-southeast-1.amazonaws.com/\": dial tcp 54.240.226.234:443: i/o timeout" domain=x2.x.top
2024/03/10 16:53:16.457956 WARN RESTY Get "http://connectivitycheck.platform.hicloud.com/generate_204": dial tcp 36.66.223.27:80: i/o timeout, Attempt 1
2024/03/10 16:53:46.558566 WARN RESTY Get "http://connectivitycheck.platform.hicloud.com/generate_204": dial tcp 1.37.34.208:80: i/o timeout, Attempt 2
2024/03/10 16:54:16.723258 WARN RESTY Get "http://connectivitycheck.platform.hicloud.com/generate_204": dial tcp 87.119.9.46:80: i/o timeout, Attempt 3
2024/03/10 16:54:46.987114 WARN RESTY Get "http://connectivitycheck.platform.hicloud.com/generate_204": dial tcp 119.46.76.15:80: i/o timeout, Attempt 4
2024/03/10 16:54:46.987152 ERROR RESTY Get "http://connectivitycheck.platform.hicloud.com/generate_204": dial tcp 119.46.76.15:80: i/o timeout
time="2024-03-10T16:54:46+08:00" level=error msg="Get "http://connectivitycheck.platform.hicloud.com/generate_204\": dial tcp 119.46.76.15:80: i/o timeout"
time="2024-03-10T16:54:46+08:00" level=warning msg="LightsailMon Started"

出现异常,是怎么回事呢?有没有办法避免报错

LightsailMon (An AWS Lightsail monitor service that can auto change blocked IP.)
Log level: warning (Concurrent: 20)
time="2023-04-25T13:40:33+08:00" level=warning msg="LightsailMon Started"
LightsailMon (An AWS Lightsail monitor service that can auto change blocked IP.)
Log level: warning (Concurrent: 20)
time="2023-04-25T13:40:54+08:00" level=warning msg="LightsailMon Started"
time="2023-04-26T05:46:49+08:00" level=error msg="[AccessKeyID: *********] ***1.com:443 dial tcp4 13.250.111.216:443: i/o timeout"
time="2023-04-26T05:46:49+08:00" level=error msg="[AccessKeyID: *********] ***2.com:443 dial tcp4 3.1.218.7:443: i/o timeout"
time="2023-04-26T05:46:52+08:00" level=error msg="InvalidInputException: Some names are already in use: LightsailMon\n{\n RespMetadata: {\n StatusCode: 400,\n RequestID: "82ffe1cd-0aca-43fb-9b58-aaed4300a835"\n },\n Code_: "NameExists",\n Message_: "Some names are already in use: LightsailMon"\n}"
time="2023-04-26T05:46:52+08:00" level=error msg="[***1.com:443] Change node IP"
time="2023-04-26T05:46:52+08:00" level=error msg="[***2.com:443] Change node IP"
time="2023-04-26T05:46:55+08:00" level=error msg="InvalidInputException: Sorry, this static IP is not attached.\n{\n RespMetadata: {\n StatusCode: 400,\n RequestID: "63673724-cd9e-46a7-82f5-dc91a48a13da"\n },\n Code_: "InvalidAssociationID.NotFound",\n Message_: "Sorry, this static IP is not attached."\n}"
time="2023-04-26T05:46:59+08:00" level=error msg="NotFoundException: The StaticIp does not exist: LightsailMon\n{\n RespMetadata: {\n StatusCode: 400,\n RequestID: "526b11a4-d26c-402a-ac82-fc2444a5c84e"\n },\n Code_: "DoesNotExist",\n Message_: "The StaticIp does not exist: LightsailMon"\n}"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.