npm.io
1.0.0 • Published 7 years agoCLI

conman-monitor

Licence
MIT
Version
1.0.0
Deps
5
Size
8 kB
Vulns
11
Weekly
0

Conman

A connection managing monitor.

Installation

  • NodeJS >= 8.x.x

npm install -g conman-monitor

Overview

Conman monitors network interfaces and ICMP ping availability of hosts, and then runs a command on failure of either to restart the interface, or do something else.

You can set the configuration by passing an argument to conman. Eg. conman config.json. An example config JSON file is below:

{
    "hostname": "example.com",
    "connections": {
        "vpn": {
            "monitor": {
                "if": "ppp0",
                "icmp": "10.0.0.1"
            },
            "restart_cmd": "sudo systemctl restart netextender.service",
            "interval": 10000,
            "notify": {
                "email": [
                    "me@example.com",
                    "you@example.com"
                ]
            }
        }
    }
}