Ad Widget

Collapse

UserParameter ++ custom script not working

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

    #1

    UserParameter ++ custom script not working

    Hi
    I'm trying to get some values from a log file, for that, I use a perl script I wrote, that you pass 2 valuse to and it returns one , a number ..
    eg /usr/bin/vpninfo.pl example.com time. this will then return the uptime on of the service on the host ...

    so i added
    UserParameter=vpn,/usr/bin/vpninfo.pl $1 $2
    to the zabbix_agentd.conf

    and configured an item with the following
    Type = simple check
    key = vpn[example.com,time]
    Units = s
    Update = 5
    Status = active

    but it returns no data ...
    so i used zabbix_get and get the following ..

    zabbix_get -s 192.168.1.196 -k vpn[tsc-odi,time]
    zabbix_get [14402]: Timeout while executing operation.

    the value "[14402]" is correct..

    so where is the data going missing ..
    btw using ZABBIX Agent (daemon) v1.3.6 (2 May 2007)
    many thanks
    greg
  • clubbing80s
    Senior Member
    • Sep 2005
    • 109

    #2
    I have also tried
    UserParameter=vpn[*],/usr/bin/vpninfo.pl $1 $2

    and setting type to agent and agent(active)...


    where have i missed to boat :-(

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      Type must be set to ZABBIX Agent and ZABBIX Agent (active). Make sure that your script is fast enough, ZABBIX won't wait longer than 3 seconds by default.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • ptader
        Member
        • Sep 2007
        • 52

        #4
        Anyway to change this? Seems kind of short. Feature request?

        Comment

        Working...