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

shell variables in user parameters

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Major Major
    • None
    • 1.8.3
    • Agent (G)

      Shell variables do not work correctly if a user parameter is defined without parameters.

      As an example, suppose we have the following user parameters defined:

      UserParameter=random.number1,echo $$RANDOM
      UserParameter=random.number2[*],echo $$RANDOM

      Using zabbix_get, we obtain incorrect values for random.number1:

      $ ../bin/zabbix_get -s 127.0.0.1 -k random.number1
      7994RANDOM
      $ ../bin/zabbix_get -s 127.0.0.1 -k random.number1
      7996RANDOM
      $ ../bin/zabbix_get -s 127.0.0.1 -k random.number1
      7998RANDOM

      However, item random.number2 gives correct values:

      $ ../bin/zabbix_get -s 127.0.0.1 -k random.number2
      31836
      $ ../bin/zabbix_get -s 127.0.0.1 -k random.number2
      4928
      $ ../bin/zabbix_get -s 127.0.0.1 -k random.number2
      16573

            Unassigned Unassigned
            asaveljevs Aleksandrs Saveljevs
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: