mirror of
https://github.com/openwrt/packages.git
synced 2025-02-07 09:19:51 +00:00
- convert apinger into procd instances - generate instance specific apinger.conf from uci - hotplug handling for apinger alarms - restart apinger interface instance on ifup action of interface - don't exit on packet count mismatch, allows to use apinger as monitor for multiple targets handling - add srcip option to target configuration, allows specifying source ip used to monitor target - allow creating status file in script parseable format Patches are ported against latest version of apinger and referenced from https://git.pld-linux.org/?p=packages/apinger.git;a=summary Signed-off-by: Jaymin Patel <jem.patel@gmail.com>
23 lines
550 B
Bash
23 lines
550 B
Bash
#!/bin/sh
|
|
|
|
usage_help()
|
|
{
|
|
echo "$0 <action> <instance> <target> <srcip> <target_desc> <alarm> <alarmtype> <reason> <send> <recieved> <loss> <delay> <timestamp>"
|
|
}
|
|
|
|
export ACTION=$1
|
|
export INSTANCE=$2
|
|
export APINGER_TARGET=$3
|
|
export APINGER_SRCIP=$4
|
|
export APINGER_TARGET_ID=$5
|
|
export APINGER_ALARM=$6
|
|
export APINGER_ALARM_TYPE=$7
|
|
export APINGER_ALARM_MESSAGE=$8
|
|
export APINGER_PROBES_SENT=$9
|
|
export APINGER_PROBES_RECEIVED=${10}
|
|
export APINGER_LOSS=${11}
|
|
export APINGER_DELAY=${12}
|
|
export APINGER_TIMESTAMP=${13}
|
|
|
|
exec /sbin/hotplug-call apinger $@
|