Ad Widget

Collapse

External check timeout error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mkorkos
    Junior Member
    • Mar 2014
    • 13

    #1

    External check timeout error

    Hi all,

    I'm currently trying to implement so external checks in my Zabbix.
    I first created a directory {datadir}/zabbix/externalscripts
    and then put a really basic test.sh script which is just :

    #!/bin/bash
    echo 1

    --
    Finally, I configured an External check item in Zabbix which key is test.sh[]
    However, this doesn't work and all I got left with is a "timeout while executing a shell script" error.

    Any help would be highly appreciated

    MK
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Did you create a directory for external scripts in the same place which described in config-file?
    Did you check the LOG-file of Zabbix server about any information related with your check?
    Sincerely yours,
    Aleksey

    Comment

    • mkorkos
      Junior Member
      • Mar 2014
      • 13

      #3
      Well I looked at my configuration file and therefore put my script in {datadir}/zabbix/externalscripts
      All I got in the log file is "item [my_item] became not supported: timeout while executing a shell script"

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        Temporarily change DebugLevel to 4 and restart server.
        You will have a lot of information and may have an error message which describe your issue.

        BTW, Did you try to start test.sh from command line? Is it works?
        Sincerely yours,
        Aleksey

        Comment

        • mkorkos
          Junior Member
          • Mar 2014
          • 13

          #5
          > I tried once again after setting the debug level at 4 => nothing new in the log file.

          > Yes it works in CLI !

          Comment

          • aib
            Senior Member
            • Jan 2014
            • 1615

            #6
            I try to do it by myself - it works.
            Take a look on my configuration.
            May be you can use the full path instead of {datadir}/zabbix/externalscripts ?

            Code:
            [root@zabbix externalscripts]# grep -i extern /etc/zabbix/zabbix_server.conf
            ### Option: ExternalScripts
            #       Full path to location of external scripts.
            [B]ExternalScripts=/usr/lib/zabbix/externalscripts
            [/B][root@zabbix ~]# cd /usr/lib/zabbix/externalscripts/
            [root@zabbix externalscripts]# cat test.sh
            [B]#!/bin/bash
            echo 123.45[/B]
            [root@zabbix externalscripts]# ./test.sh
            [B]123.45[/B]
            [root@zabbix externalscripts]# ls -la test.sh
            [B]-rwxr-xr-x 1 root root 24 May 23 10:26 test.sh[/B]
            Attached Files
            Sincerely yours,
            Aleksey

            Comment

            • Navern
              Member
              • May 2013
              • 33

              #7
              Please check also permissions on directory itself and executable permissions on script.

              Comment

              • mkorkos
                Junior Member
                • Mar 2014
                • 13

                #8
                Okay so I really don't know since my conf is completly similar to yours...

                Edit : permissions are ok since I can run the script as the "zabbix" user from my CLI.
                Last edited by mkorkos; 23-05-2014, 17:26.

                Comment

                Working...