Ad Widget

Collapse

Cant't get UserParameter working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mindas
    Junior Member
    • Oct 2007
    • 19

    #1

    Cant't get UserParameter working

    Hi,

    Just installed Zabbix server and client, and feel very impressed about the quality and features (did use Nagios before, don't think will ever be looking back). However, I can't get UserParameter working. Basically, when I add configuration item and make it active, it switches to "Not supported" after a few seconds.

    This is my setup:

    1) Zabbix server version: 1.4.1 (out-of-the box Ubuntu Gutsy installation)

    2) Zabbix agentd is installed on Win2000 machine as a service (same version as of the server).

    3) Agentd path to executable (copy-paste from Windows service properties):
    "E:\zabbix\zabbix_agentd.exe" --config "e:\zabbix\zabbix_agentd.conf"

    4) Excerpt from e:\zabbix\zabbix_agentd.conf:
    UserParameter=testecho,java -version
    UserParameter=vyre.heap,e:\zabbix\heapused.bat

    5) Testing the agentd from the client machine (everything seems to be OK)
    E:\zabbix>zabbix_agentd -c e:\zabbix\zabbix_agentd.conf -t testecho

    testecho [t|java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)]

    E:\zabbix>zabbix_agentd -c e:\zabbix\zabbix_agentd.conf -t vyre.heap
    vyre.heap [t|26057688]

    6) But the vyre.heap task cannot be executed from the server. Server log level is set to 4 (debug), and the output is

    1016:20071004:153705 Parameter [vyre.heap] is not supported by agent on host [vyre-test1] Old status [0]

    Agentd log level is 4, and relevant output is
    2044:20071004:153755 Processing request.
    2044:20071004:153755 In check_security()
    2044:20071004:153755 Requested [vyre.heap]
    2044:20071004:153755 Before
    2044:20071004:153755 Sending back [ZBX_NOTSUPPORTED]
    3008:20071004:153756 Call to PdhCollectQueryData() failed: No data to return.


    Another UserParam (testecho) works just fine. I tried increasing timeouts, both in server and client as the heap checking is done via JMX takes a few seconds to finish but it didn't help.

    Does anybody know any other ways of tracing the problem? Any advice is much appreciated. Thanks in advance.

    Regards,
    Mindaugas
  • oliverm
    Senior Member
    • May 2006
    • 155

    #2
    Make sure the HOSTNAME in the HOSTS entry in Zabbix for the server being monitored is the same as the name given to the server in the zabbix_agentd.conf file.

    This doesnt have to be a valid name at all, and can included spaces (we use "clientname - servername").

    We have had problems on windows clients with spaces in the script path in the userparams entry of the .conf file. Try putting this in a fodler with no spaces or using the 8.3 names (ie c:\progra~1\zabbix~1\ etc)

    Olly

    Comment

    • mindas
      Junior Member
      • Oct 2007
      • 19

      #3
      Hi Oliver and thanks for your reply.

      I've checked the hostname and it seems to be OK.

      My point is - if I have two UserParameters defined and one is working while another doesn't - it might be something wrong with the one of the UserParameters, isn't it? However, if I test them from the client (by doing zabbix_agentd -t key), both work correctly and report the data.

      The question is, what could be potentially wrong and where to look for an error? How can I know why my zabbix_agentd is Sending back [ZBX_NOTSUPPORTED]?

      Thanks again and appreciate your feedback.

      Comment

      • mindas
        Junior Member
        • Oct 2007
        • 19

        #4
        I was able to figure this out - it wasn't Zabbix problem, but mine (wrong paths ). Sorry for the unnecessary noice...

        Comment

        • harishgupta111
          Member
          • Nov 2011
          • 41

          #5
          Hi

          HI mindas,

          I am getting the same error. I used ur example and tested with command zabbix_agentd.exe -c c:\zabbix_agentd.conf -t key.in.zabbix.frontend
          its showing correct results But still in zabbix its cmng not supported. My test.log file is placed in C:\temp\test.log and my config file is placed in c:\
          nd here is the userparameter:
          UnsafeUserParameters=1
          UserParameter=key.in.zabbix.frontend,C:\temp\test. bat

          and my log file is also placed in c:\temp\test.log. Now please tell me what may be the problem?
          Thanks in advance

          Comment

          • lippoliv
            Junior Member
            • Oct 2011
            • 15

            #6
            Hey there,
            if I run "zabbix_agent -t screen.num[mine]" (look http://www.zabbix.com/forum/showthread.php?t=23635) i get ZBX_NOTSUPPORTED...

            What can I do? Can Someone use this UserParameter for checking an active Screen Session?
            Code:
            UserParameter=screen.num[*], screen -list | grep -c $1

            Comment

            Working...