Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.07 KB | None | 0 0
  1. #!/bin/sh
  2. # -*- sh -*-
  3.  
  4. : << =cut
  5.  
  6. =head1 NAME
  7.  
  8. Network - Plugin to measure packet loss.
  9.  
  10. =head1 NOTES
  11.  
  12. Random info here..
  13.  
  14. =head1 AUTHOR
  15.  
  16. Contributed by sawo
  17.  
  18. =head1 LICENSE
  19.  
  20. 1337 license
  21.  
  22. =head1 MAGIC MARKERS
  23.  
  24.  #%# family=auto
  25.  #%# capabilities=autoconf
  26.  
  27. =cut
  28.  
  29. if [ "$1" = "autoconf" ]; then
  30.     echo yes
  31.     exit 0
  32. fi
  33.  
  34. if [ "$1" = "config" ]; then
  35.  
  36.         cat <<'EOM'
  37. graph_title Ping Statistics - EDYN-LNK-02 - Pkt. Loss(%)
  38. graph_vlabel Packet Loss (%) per 100 packets
  39. holdcroft2.label Holdcroft(192.168.0.3)
  40. parkway2.label Parkway(10.232.149.66)
  41. sandicliffe2.label Sandicliffe(10.10.11.2)
  42. sandicliffeGW2.label Sandicliffe GW Router(195.171.82.208)
  43. tguk2.label TGUK(10.232.170.220)
  44. tldarby2.label TLDarby(172.22.223.129)
  45. google2.label Google DNS (8.8.8.8)
  46. graph_scale no
  47. graph_category Network
  48. graph_info EDYN-LNK-02 Packet Loss (%")
  49. EOM
  50.         exit 0;
  51. fi
  52. testvar=$(find /home/public/EDYN-LNK-02/192.168.0.3.txt -mmin -60)
  53. if [ -n $testvar ]; then
  54.     echo -n "holdcroft2.value "
  55.     cut -d' ' -f1 $testvar
  56. else
  57.     echo -n "holdcroft2.value "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement