Ad Widget

Collapse

External Check doesn't work on GUI, but works via CLI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jasbinschek
    Junior Member
    • Dec 2017
    • 19

    #1

    External Check doesn't work on GUI, but works via CLI

    Hello there!

    So, i'm having some issues to monitor a Windows Server, mainly because it does not have PowerShell, so i'm having to improvise.

    As it's the only way i found, i'm checking one file's size via External Check, with a nice and short script on my ExternalScripts dir
    I set its permissions so the user zabbix is able to run it, and it does run perfectly, i get a 3 numbers value in my echo, everything is fine.

    But the GUI tells me it's not supported, even tho it does not echo that not supported message.

    The script? There it is:

    #!/bin/bash
    DATA=`date +%Y%m%d`
    DADOS=`zabbix_get -s "HostIP" -p "SomePort" -k vfs.file.size["SomeDirectory\SomeFileName_$DATA.zip"]`
    echo ${DADOS}



    I obviously can't show some info in here, but it works
    ./CheckSize.sh
    373


    So, on Zabbix Gui i get this:

    Received value [] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]

    It looks like it's returning nothing!


    Can someone help me out? What am i doing wrong?

    Edit: I'm using Zabbix 2.0.4
    Last edited by jasbinschek; 25-04-2018, 14:55.
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    SELinux, Grsecurity, something similar?
    Is zabbix_get in standard PATH?

    Comment

    • jasbinschek
      Junior Member
      • Dec 2017
      • 19

      #3
      Originally posted by dimir
      SELinux, Grsecurity, something similar?
      Is zabbix_get in standard PATH?
      Hello Dimir, thanks for your reply.

      Yes, checking the logs i was able to find out what was causing the problem, it seems that, even with zabbix_get within the standard PATH, it wasn't being able to locate it when running the .sh, so i used its absolute path and everything got solved.

      Comment

      Working...