Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-6858

Running user parameter shows "ZBX_NOTSUPPORTED" depending on the result of the triggered command

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't fix
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: Agent (G)
    • Labels:
      None
    • Environment:
      CentOS

      Description

      When I trigger "maven clean install" defined as a UserParameter I get either correct ouput (when build fails) or ZBX_NOTSUPPORTED when build is success. I can manually run the command as zabbix user. My guess is that zabbix-agent doesn't support output of the (UserParameter) command longer than some limit.

      Example:

      In file /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf I have three user parameters:

      UserParameter=test.sip1, cd /var/lib/zabbix/myapp/ && /labs/apache-maven-3.0.4/bin/mvn -v
      UserParameter=test.sip2, cd /tmp/ && /labs/apache-maven-3.0.4/bin/mvn clean install
      UserParameter=test.sip3, cd /var/lib/zabbix/myapp/ && /labs/apache-maven-3.0.4/bin/mvn clean install

      As a result test.sip1 works correctly displaying the version of maven, test.sip2 works also correctly (it displays build fails since 'maven clean install' is executed in wrong directory), and last key test.sip3 displays ZBX_NOTSUPPORTED. When I execute "cd /var/lib/zabbix/myapp/ && /labs/apache-maven-3.0.4/bin/mvn clean install" as zabbix user manually, then it works correctly.

      In practice it works like that:

      [[email protected] ~]# zabbix_get -s 127.0.0.1 -k "test.sip1"
      Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000)
      Maven home: /tlabs/apache-maven-3.0.4
      Java version: 1.7.0_10, vendor: Oracle Corporation
      Java home: /tlabs/jdk1.7.0_10/jre
      Default locale: pl_PL, platform encoding: UTF-8
      OS name: "linux", version: "2.6.32-042stab078.26", arch: "amd64", family: "unix"

      [[email protected] ~]# zabbix_get -s 127.0.0.1 -k "test.sip2"
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 0.198s
      [INFO] Finished at: Wed Aug 07 12:12:31 GMT+00:00 2013
      [INFO] Final Memory: 5M/91M
      [INFO] ------------------------------------------------------------------------
      [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/tmp). Please verify you invoked Maven from the correct directory. -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

      [[email protected] ~]# zabbix_get -s 127.0.0.1 -k "test.sip3"
      ZBX_NOTSUPPORTED

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            tklo Tomasz Kłosiński
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: