Giter Club home page Giter Club logo

uptimekuma-pfsense-gw-status's Introduction

pfSense shell script for reporting gateway status to Uptime Kuma

Simple script that will report the current gateway status in pfSense to Uptime Kuma. Supports multiple WANs. Will report 'PACKETLOSS' and 'LATENCY' as 'msg' to Uptime Kuma as well as 'UP' or 'DOWN' as 'status'.

Screenshots

image

Requirements

  • pfSense 2.5.2, 2.6.0 (Untested on any other release)
  • pfSense Package: Shellcmd 1.0.5_2 (Untested on any other version)
  • pfSense Package: Cron 0.3.8_1
  • Python 3.8 (Untested on any other version)

Install/Use

  1. In a local directory ex: /root/local-scripts/uptime-kuma-gateway-status, place dpinger-gateway-status.py, uptime-kuma-gateway-status.csh, and uptime-kuma-gateway-dictionary.txt

  2. Modify uptime-kuma-gateway-status.csh to reflect your WAN gateway names and Uptime Kuma URL:

  • set gateway_names = 'WAN_1_DHCP WAN_2_DHCP'
  • set uptime_kuma_url = 'http://uptime-kuma.example.com:3001'
  1. Modify uptime-kuma-gateway-dictionary.txt to reflect both your WAN gateway names as well as the unique Push URL generated from Uptime Kuma

  2. Using the Shellcmd package in pfSense, create a new Shellcmd Configuration:

  • Command: nohup /bin/csh /root/local-scripts/uptime-kuma-gateway-status/uptime-kuma-gateway-status.csh >/dev/null 2>&1 &
  • Shellcmd Type: shellcmd
  • Description: uptime-kuma-gateway-status.csh image
  1. NEW - Using the Cron package in pfSense, create a new Cron schedule:
  • Minute: */15
  • Hour: *
  • Day of the Month: *
  • Month of the Year: *
  • Day of the Week: *
  • User: root
  • Command: nohup /bin/csh /root/local-scripts/uptime-kuma-gateway-status/uptime-kuma-gateway-status.csh >/dev/null 2>&1 & image
  1. Reboot and enjoy!

uptimekuma-pfsense-gw-status's People

Contributors

maxxoverclocker avatar

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.