-
Plugin / module problem
Hi I wrote a plugin myself to measure packet loss.
The thing is that when I upload it to my server it’s marked as a data plugin, so i can’t assign it to any of my agents (99% of them are routers, so i need a network module).
How can I make this work?Any tip is very much appreciated!
Here is the “code”:
.INI FILE
[plugin_definition]
name = Packet Loss
filename = packloss.sh
description = Este plugin mide el packet loss de un enlace
timeout = 20
ip_opt = -h
user_opt =
port_opt =
pass_opt =
plugin_type = 1
total_modules_provided = 1[module1]
name = Modulo PackLoss
description = Este modulo mide el packet loss de un enlace
id_group = 12
type = 1
max = 100
min = 0
module_interval = 30
id_module_group = 4
id_modulo = 4
plugin_user =
plugin_pass =
plugin_parameter = “”
max_timeout = 20
history_data = 1
min_warning = 8
min_critical = 15
min_ff_event = 0
tcp_port = 0PACKLOSS.SH
#!/bin/bash
HOST=$2
ping -c 010 -i 000.250 -t 60 -q -s 0 00 56 $HOST |
  (read linePing;
  read linePing;
  read linePing;
  read linePing;
  PacketLoss=$(expr “$linePing” : “.* ([0-9]*)%.*”);
  echo $PacketLoss);