Skip to content

External

·


External Collector launch outside program to collecting data.

Configuration

Preconditions

  • The command and its running environment must have complete dependencies. For example, if Python is used to start an external Python script, the import package and other dependencies required for the script to run must be prepared.

Input configuration

Go to the conf.d/external directory under the DataKit installation directory, copy external.conf.sample and name it external.conf. Examples are as follows:

[[inputs.external]]

    # Collector's name.
    name = 'some-external-inputs'  # required

    # Whether or not to run the external program in the background.
    daemon = false

    # If the external program running in a Non-daemon mode,
    #     runs it in every this interval time.
    #interval = '10s'

    # The environment variables running the external program.
    #envs = ['LD_LIBRARY_PATH=/path/to/lib:$LD_LIBRARY_PATH',]

    # The external program' full path. Filling in absolute path whenever possible.
    cmd = "python" # required

    # Filling "true" if this collecor is involved in the election.
    # Note: The external program must running in a daemon mode if involving the election.
    election = false
    args = []

    [[inputs.external.tags]]
        # tag1 = "val1"
        # tag2 = "val2"

Once configured, restart DataKit.

The collector can now be turned on by ConfigMap injection collector configuration.

Feedback

Is this page helpful? ×