Ad Widget

Collapse

missing dash in snmptrap.sh

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #1

    missing dash in snmptrap.sh

    snmptrap.sh cuts strings from traps up to a first space.
    this happens because $address (a variable where it reads the string in) is manipulated like :
    address=`echo $address|cut -f2 -d' '`

    adding a dash to keep all parameters starting from the second like :
    address=`echo $address|cut -f2- -d' '`
    allows to receive a full string.

    just posting this in case somebody else stumbles upon mysteriously cut strings
    Zabbix 3.0 Network Monitoring book
Working...