github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/internal/fs/ddl/cache/agent/rpcutil.json (about)

     1  {
     2    "$schema": "https://choria.io/schemas/mcorpc/ddl/v1/agent.json",
     3    "metadata": {
     4      "name": "rpcutil",
     5      "description": "Utility actions that expose information about the state of the running Server",
     6      "author": "R.I.Pienaar <rip@devco.net>",
     7      "license": "Apache-2.0",
     8      "version": "0.28.0",
     9      "url": "https://choria.io/",
    10      "timeout": 2
    11    },
    12    "actions": [
    13      {
    14        "action": "agent_inventory",
    15        "input": {
    16        },
    17        "output": {
    18          "agents": {
    19            "description": "List of agents on the server",
    20            "display_as": "Agents",
    21            "type": "array"
    22          }
    23        },
    24        "display": "always",
    25        "description": "Inventory of all agents on the server including versions, licenses and more"
    26      },
    27      {
    28        "action": "collective_info",
    29        "input": {
    30        },
    31        "output": {
    32          "main_collective": {
    33            "description": "The main Collective",
    34            "display_as": "Main Collective",
    35            "type": "string"
    36          },
    37          "collectives": {
    38            "description": "All Collectives",
    39            "display_as": "All Collectives",
    40            "type": "array"
    41          }
    42        },
    43        "display": "always",
    44        "description": "Info about the main and sub collectives that the server belongs to",
    45        "aggregate": [
    46          {
    47            "function": "summary",
    48            "args": [
    49              "collectives"
    50            ]
    51          }
    52        ]
    53      },
    54      {
    55        "action": "daemon_stats",
    56        "input": {
    57        },
    58        "output": {
    59          "threads": {
    60            "description": "List of threads active in the Choria Server",
    61            "display_as": "Threads",
    62            "type": "array"
    63          },
    64          "agents": {
    65            "description": "List of agents loaded",
    66            "display_as": "Agents",
    67            "type": "array"
    68          },
    69          "pid": {
    70            "description": "Process ID of the Choria Server",
    71            "display_as": "PID",
    72            "type": "integer"
    73          },
    74          "times": {
    75            "description": "Processor time consumed by the Choria Server",
    76            "display_as": "Times",
    77            "type": "hash"
    78          },
    79          "validated": {
    80            "description": "Count of messages that passed security validation",
    81            "display_as": "Security Validated",
    82            "type": "integer"
    83          },
    84          "unvalidated": {
    85            "description": "Count of messages that failed security validation",
    86            "display_as": "Failed Security",
    87            "type": "integer"
    88          },
    89          "passed": {
    90            "description": "Count of messages that passed filter checks",
    91            "display_as": "Passed Filter",
    92            "type": "integer"
    93          },
    94          "filtered": {
    95            "description": "Count of message that didn't pass filter checks",
    96            "display_as": "Failed Filter",
    97            "type": "integer"
    98          },
    99          "starttime": {
   100            "description": "Time the Choria Server started in unix seconds",
   101            "display_as": "Start Time",
   102            "type": "integer"
   103          },
   104          "total": {
   105            "description": "Count of messages received by the Choria Server",
   106            "display_as": "Total Messages",
   107            "type": "integer"
   108          },
   109          "replies": {
   110            "description": "Count of replies sent back to clients",
   111            "display_as": "Replies",
   112            "type": "integer"
   113          },
   114          "configfile": {
   115            "description": "Config file used to start the daemon",
   116            "display_as": "Config File",
   117            "type": "string"
   118          },
   119          "version": {
   120            "description": "Choria Server Version",
   121            "display_as": "Version",
   122            "type": "string"
   123          },
   124          "ttlexpired": {
   125            "description": "Count of messages that did pass TTL checks",
   126            "display_as": "TTL Expired",
   127            "type": "integer"
   128          },
   129          "events": {
   130            "description": "The number of lifecycle events that was published",
   131            "display_as": "Events",
   132            "type": "integer"
   133          }
   134        },
   135        "display": "always",
   136        "description": "Get statistics from the running daemon",
   137        "aggregate": [
   138          {
   139            "function": "summary",
   140            "args": [
   141              "version"
   142            ]
   143          },
   144          {
   145            "function": "summary",
   146            "args": [
   147              "agents"
   148            ]
   149          }
   150        ]
   151      },
   152      {
   153        "action": "get_config_item",
   154        "input": {
   155          "item": {
   156            "prompt": "Configuration Item",
   157            "description": "The item to retrieve from the server",
   158            "type": "string",
   159            "optional": false,
   160            "validation": "^.+$",
   161            "maxlength": 120
   162          }
   163        },
   164        "output": {
   165          "item": {
   166            "description": "The config property being retrieved",
   167            "display_as": "Property",
   168            "type": "string"
   169          },
   170          "value": {
   171            "description": "The value that is in use",
   172            "display_as": "Value"
   173          }
   174        },
   175        "display": "always",
   176        "description": "Get the active value of a specific config property",
   177        "aggregate": [
   178          {
   179            "function": "summary",
   180            "args": [
   181              "value"
   182            ]
   183          }
   184        ]
   185      },
   186      {
   187        "action": "get_data",
   188        "input": {
   189          "source": {
   190            "prompt": "Data Source",
   191            "description": "The data plugin to retrieve information from",
   192            "type": "string",
   193            "optional": false,
   194            "validation": "^\\w+$",
   195            "maxlength": 50
   196          },
   197          "query": {
   198            "prompt": "Query",
   199            "description": "The query argument to supply to the data plugin",
   200            "type": "string",
   201            "default": null,
   202            "optional": true,
   203            "validation": "^.+$",
   204            "maxlength": 200
   205          }
   206        },
   207        "output": {},
   208        "display": "always",
   209        "description": "Get data from a data plugin"
   210      },
   211      {
   212        "action": "get_fact",
   213        "input": {
   214          "fact": {
   215            "prompt": "The name of the fact",
   216            "description": "The fact to retrieve",
   217            "type": "string",
   218            "default": null,
   219            "optional": false,
   220            "validation": ".+",
   221            "maxlength": 512
   222          }
   223        },
   224        "output": {
   225          "fact": {
   226            "description": "The name of the fact being returned",
   227            "display_as": "Fact",
   228            "type": "string"
   229          },
   230          "value": {
   231            "description": "The value of the fact",
   232            "display_as": "Value",
   233            "default": null
   234          }
   235        },
   236        "display": "always",
   237        "description": "Retrieve a single fact from the fact store",
   238        "aggregate": [
   239          {
   240            "function": "summary",
   241            "args": [
   242              "value"
   243            ]
   244          }
   245        ]
   246      },
   247      {
   248        "action": "get_facts",
   249        "input": {
   250          "facts": {
   251            "prompt": "Comma-separated list of facts to retrieve",
   252            "description": "Facts to retrieve",
   253            "type": "string",
   254            "default": null,
   255            "optional": false,
   256            "validation": "^\\s*[\\w\\.\\-]+(\\s*,\\s*[\\w\\.\\-]+)*$",
   257            "maxlength": 200
   258          }
   259        },
   260        "output": {
   261          "values": {
   262            "description": "List of values of the facts",
   263            "display_as": "Values",
   264            "type": "hash"
   265          }
   266        },
   267        "display": "always",
   268        "description": "Retrieve multiple facts from the fact store"
   269      },
   270      {
   271        "action": "inventory",
   272        "input": {
   273        },
   274        "output": {
   275          "agents": {
   276            "description": "List of agent names",
   277            "display_as": "Agents",
   278            "type": "array"
   279          },
   280          "facts": {
   281            "description": "List of facts and values",
   282            "display_as": "Facts",
   283            "type": "hash"
   284          },
   285          "classes": {
   286            "description": "List of classes on the system",
   287            "display_as": "Classes",
   288            "type": "array"
   289          },
   290          "version": {
   291            "description": "Choria Server Version",
   292            "display_as": "Version",
   293            "type": "string"
   294          },
   295          "main_collective": {
   296            "description": "The main Collective",
   297            "display_as": "Main Collective",
   298            "type": "string"
   299          },
   300          "collectives": {
   301            "description": "All Collectives",
   302            "display_as": "All Collectives",
   303            "type": "array"
   304          },
   305          "data_plugins": {
   306            "description": "List of data plugin names",
   307            "display_as": "Data Plugins",
   308            "type": "array"
   309          },
   310          "machines": {
   311            "description": "Autonomous Agents",
   312            "display_as": "Machines",
   313            "type": "hash"
   314          },
   315          "upgradable": {
   316            "description": "Indicates if the server supports upgrades",
   317            "display_as": "Upgradable",
   318            "type": "boolean",
   319            "default": false
   320          }
   321        },
   322        "display": "always",
   323        "description": "System Inventory"
   324      },
   325      {
   326        "action": "ping",
   327        "input": {
   328        },
   329        "output": {
   330          "pong": {
   331            "description": "The local Unix timestamp",
   332            "display_as": "Timestamp",
   333            "type": "number"
   334          }
   335        },
   336        "display": "always",
   337        "description": "Responds to requests for PING with PONG"
   338      }
   339    ]
   340  }