Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-6405

Externalscripts: Add configurable environment variables

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • None
    • Server (S)

      In some external script invocations a lot of variables may be required. For instance we have a script that needs about 10 arguments to run. Some of these arguments include "secrets" such as:

      externalscript['hostname','clustername', 'test', 'something', 'more', 'true', 'false', 'env_servername', 'env_username', 'env_password']
      

      Some of those inputs are generally coming from (host) macro's (e.g. login details) since they are re-used across multiple checks.

      In order to optimize this and make the command (configuration) cleaner, it would help a lot of we could provide custom environment variables that that will be provided, such as:

      External Script definition:

      externalscript['hostname','clustername', 'test', 'something', 'more', 'true', 'false']
      

      Environment

      ENV_SERVERNAME=foo.baz
      ENV_USERNAME=foo
      ENV_PASSWORD=baz

      If these environment variables could be configured in Zabbix and be passed along to the externalscript that would make defining externalscripts a lot easier. If someone wants they could even put all the arguments into variables, making it look a lot cleaner.

      It would be desired that the environment variables would be parsed for host- & global macro's, so these can be used here too.

            wiper Andris Zeila
            frank Frank
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: