Ad Widget

Collapse

[ZBX 2.2] External Scripts not supported

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eljibe
    Member
    • Apr 2014
    • 31

    #1

    [ZBX 2.2] External Scripts not supported

    Hi Guys,

    So I'm trying to write an external script. I wanted it to run a curl with specific parameters but it didn't work.
    So I tried something simpler. My script is the one that follows:
    Code:
    #!/bin/bash
    echo 0
    In my server configuration file I have this:
    Code:
    ExternalScripts=/opt/ZUY10/Logiciel/ZABXSERVER/etc/externalscripts
    and, with user zabbix I have this:
    Code:
     namei -m /opt/ZUY10/Logiciel/ZABXSERVER/etc/externalscripts/jbw.sh
    f: /opt/ZUY10/Logiciel/ZABXSERVER/etc/externalscripts/jbw.sh
     drwxr-xr-x /
     drwxr-xr-x opt
     drwxr-xr-x ZUY10
     drwxr-xr-x Logiciel
     drwxr-xr-x ZABXSERVER
     drwxr-xr-x etc
     drwxr-xr-x externalscripts
     -rwxrwxr-x jbw.sh
    So I can fairly assume that the zabbix has access to this file, and permissions to execute it.

    Still...
    Code:
    $ /opt/zabxagent/bin/zabbix_get -s SLMUYAZABX05 -p 10050 -k jbw.sh[]
    ZBX_NOTSUPPORTED
    I've been trying to wrap my head around this since friday morning, and I can't get it to work. Any idea ?

    I tried using zabbix_agentd -t. this is what I get:
    Code:
    /opt/ZUY10/Logiciel/ZABXAGENT/sbin/zabbix_agentd -t 'jbw.sh[]'
    jbw.sh                                        [m|ZBX_NOTSUPPORTED]
    What does the "m" stand for ?
    Last edited by eljibe; 23-11-2015, 17:24. Reason: additionnal information
  • eljibe
    Member
    • Apr 2014
    • 31

    #2
    OK. Little shame there. So it appears you can't test an external script with zabbix_get. And you have to pick "external check" in the item configuration window. Couldn't think about it.

    Comment

    Working...