Ad Widget

Collapse

UserParameter not working ??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • clubbing80s
    Senior Member
    • Sep 2005
    • 109

    #1

    UserParameter not working ??

    Hi
    I have setup a UserParameter once before to get bandwidth usage on a partictular port using pmacct, wich worked well but It was along time ago, and I cant rememeber how I did it ..

    Hope fully some can tell me what I have done wrong ....

    1) I added an entry to zabix_agentd.conf
    UserParameter=porttraf[*],/usr/local/bin/porttraf.pl $1 $2

    2) I created a perl script to pass the number to pmacct.

    #!/usr/bin/perl

    use strict;
    my $port = @ARGV[0];
    my $result = `pmacct -c src_port,dst_port -N "*,$port;$port,*" -S -p /tmp/traf.pipe -r`;
    print "$result";

    3) I created an item with the following settings..


    Description Port traffic PORT 80
    Type ZABBIX agent (active)
    Key porttraf[80]
    Type of information Numeric (float)
    Units Bps
    Use multiplier Do not use
    Update interval (in sec) 60
    Keep history (in days) 7
    Keep trends (in days) 365
    Status Monitore
    Store value Delta (speed per second)
    Applications None


    but I get no results ...
    Many Thanks





    --
    Gregory Machin
    [email protected]
Working...