Ad Widget

Collapse

Timeout while executing extrnal scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jix
    Member
    • Feb 2011
    • 73

    #1

    Timeout while executing extrnal scripts

    Dears
    I wrote a bash script in linux debian that try to call simulated automatic telnet script.

    in telnet script i try to connect to some routers and ping some host and return ping time response time and success rate

    for example

    Code:
    root@server:etc/externalscripts# ./telnet  10.10.33.11 My_router 8.8.8.8 
    
    spawn telnet 10.10.33.11
    Trying 10.10.33.11...
    Connected to 10.10.33.11.
    Escape character is '^]'.
    
    User Access Verification
    
    Username: admin
    Password:
    .
    .
    .
    Success rate is 100 percent (10/10), round-trip min/avg/max = 100/100/104 ms
    
    root@server:etc/externalscripts#
    in my shell script , i calculated round tripe and success rate that return from telnet script


    when i run script manualy, everything working fines

    but in zabbix server

    sometimes my items gets error ( timeout while executing a shell script)
    and some times they works.


    i changed Timeout in zabbix.conf to 20 sec but problem still exist
    and here is my graphs
    Last edited by jix; 09-12-2014, 16:09.
  • jix
    Member
    • Feb 2011
    • 73

    #2
    !

    here is my scripts

    Code:
    #!/bin/bash
    
    if [ "$2" == "rate" ]; then
    rate=`/usr/local/zabbix/etc/externalscripts/telnet |/bin/grep Success | /usr/bin/awk '{ print $4};'`
    echo $rate
    fi
    
    if [ "$2" == "time" ]; then
    
    time=`/usr/local/zabbix/etc/externalscripts/telnet  |/bin/grep Success | /usr/bin/awk '{ print $10};'|/usr/bin/cut -d'/' -f2`
    echo $time
    
    fi

    Comment

    • jix
      Member
      • Feb 2011
      • 73

      #3
      !

      any idea?
      my scripts works manualy and takes 7 sec to complete
      i set timeout in configuration file to 15 sec but no success

      i think it is a bug for zabbix server

      Comment

      • eskytthe
        Senior Member
        Zabbix Certified Specialist
        • May 2011
        • 363

        #4
        Gaps / timeout can indicate zabbix performance problems: Try look at these links:
        In the past, quite often Zabbix users have been puzzled regarding some server tuning parameters – for example, how many pollers do they need? It was usually determined based on experience, testing and a bit of guesstimating. No more fuzzy attempts – get hard facts with Zabbix 1.8.5. UPDATED 2011.11.02: new downloadable template version v2 […]

        http://www.zabbix.com/img/zabconf201...nce_Tuning.pdf

        They may be to generel ... but try search in the forum also, or ask at the IRC.
        Please also check you zabbix server log.
        Hope this help.
        BR
        Erik
        Last edited by eskytthe; 29-12-2011, 18:03. Reason: url problems

        Comment

        Working...