Ad Widget

Collapse

External Check Returns NOTHING to Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vorGroup
    Junior Member
    • Apr 2014
    • 2

    #1

    External Check Returns NOTHING to Zabbix

    To clarify, the script works fine. It returns the single line of text that I'm looking for. However, Zabbix shows absolutely nothing as the return value.

    What is the script?

    It's an SSH Expect Script. It logs into a Mikrotik RB951, and executes:

    ut [/system routerboard get serial-number]

    In this system, ut means print. So it prints the serial number of the device.

    That script is called by a wrapper script that includes a ` | sed -p 30n`

    To only show line 30 (the serial number).

    I even wrapped it all in an echo with backticks for troubleshooting.

    It all works perfect on the CLI. I can #su -l zabbix and execute it. It returns the expected values. But when Zabbix executes it, the latest values shows a blank line, every time.

    WHY???????????!!!!!!!!!

    Zabbix 2.0.2
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    sometimes, when you use pipe (|), OS try to create a pipe.
    when zabbix agent doesn't have a permission to create a pipe (or use /tmp directory), you cannot get any information.

    In your case it's probably permissions problem.
    ex. you script use some additional program which cannot be started from zabbix agent environments, etc.
    Sincerely yours,
    Aleksey

    Comment

    Working...