wahl-sec / trident

Trident is an asynchronous environment monitor with plugin support and data collection.
https://wahl-sec.github.io/trident/
GNU General Public License v3.0
1 stars 0 forks source link

Feature: Implement Simple Plugin Development #36

Closed wahl-sec closed 2 years ago

wahl-sec commented 2 years ago

We should support creating simple plugins in a pipeline fashion in some external format like JSON and/or YAML.

Could be something like the following structure:

{
  "TRIDENT": {
    "logging_level": "INFO",
    "plugins": {
      "computer_metadata": {
        "plugin_args": {
          "[arg_name]": "[arg_value]"
        },
        "args": {
          "[runner_args]": {}
        },
        "steps": [
          {
            "name": "Computer CPU Temperature",
            "instruction": {
              "ref": "$/computer/hardware/cpu/temperature",
              "args": {},
              "out": "cpu_temp"
            },
            "pre": [],
            "post": []
          },
          {
            "name": "Is Good Temperature?",
            "instruction": {
              "ref": "$/math/less_than",
              "args": {
                "0": "$cpu_temp",
                "1": 85
              },
              "out": "result"
            },
            "pre": [],
            "post": []
          }
        ]
      }
    }
  }
}