{ "$schema": "https://choria.io/schemas/mcorpc/ddl/v1/agent.json", "metadata": { "name": "rpcutil", "description": "Utility actions that expose information about the state of the running Server", "author": "R.I.Pienaar ", "license": "Apache-2.0", "version": "0.23.0", "url": "https://choria.io/", "timeout": 2 }, "actions": [ { "action": "agent_inventory", "input": { }, "output": { "agents": { "description": "List of agents on the server", "display_as": "Agents", "type": "array" } }, "display": "always", "description": "Inventory of all agents on the server including versions, licenses and more" }, { "action": "collective_info", "input": { }, "output": { "main_collective": { "description": "The main Collective", "display_as": "Main Collective", "type": "string" }, "collectives": { "description": "All Collectives", "display_as": "All Collectives", "type": "array" } }, "display": "always", "description": "Info about the main and sub collectives that the server belongs to", "aggregate": [ { "function": "summary", "args": [ "collectives" ] } ] }, { "action": "daemon_stats", "input": { }, "output": { "threads": { "description": "List of threads active in the Choria Server", "display_as": "Threads", "type": "array" }, "agents": { "description": "List of agents loaded", "display_as": "Agents", "type": "array" }, "pid": { "description": "Process ID of the Choria Server", "display_as": "PID", "type": "integer" }, "times": { "description": "Processor time consumed by the Choria Server", "display_as": "Times", "type": "hash" }, "validated": { "description": "Count of messages that passed security validation", "display_as": "Security Validated", "type": "integer" }, "unvalidated": { "description": "Count of messages that failed security validation", "display_as": "Failed Security", "type": "integer" }, "passed": { "description": "Count of messages that passed filter checks", "display_as": "Passed Filter", "type": "integer" }, "filtered": { "description": "Count of message that didn't pass filter checks", "display_as": "Failed Filter", "type": "integer" }, "starttime": { "description": "Time the Choria Server started in unix seconds", "display_as": "Start Time", "type": "integer" }, "total": { "description": "Count of messages received by the Choria Server", "display_as": "Total Messages", "type": "integer" }, "replies": { "description": "Count of replies sent back to clients", "display_as": "Replies", "type": "integer" }, "configfile": { "description": "Config file used to start the daemon", "display_as": "Config File", "type": "string" }, "version": { "description": "Choria Server Version", "display_as": "Version", "type": "string" }, "ttlexpired": { "description": "Count of messages that did pass TTL checks", "display_as": "TTL Expired", "type": "integer" } }, "display": "always", "description": "Get statistics from the running daemon", "aggregate": [ { "function": "summary", "args": [ "version" ] }, { "function": "summary", "args": [ "agents" ] } ] }, { "action": "get_config_item", "input": { "item": { "prompt": "Configuration Item", "description": "The item to retrieve from the server", "type": "string", "optional": false, "validation": "^.+$", "maxlength": 120 } }, "output": { "item": { "description": "The config property being retrieved", "display_as": "Property", "type": "string" }, "value": { "description": "The value that is in use", "display_as": "Value" } }, "display": "always", "description": "Get the active value of a specific config property", "aggregate": [ { "function": "summary", "args": [ "value" ] } ] }, { "action": "get_data", "input": { "source": { "prompt": "Data Source", "description": "The data plugin to retrieve information from", "type": "string", "optional": false, "validation": "^\\w+$", "maxlength": 50 }, "query": { "prompt": "Query", "description": "The query argument to supply to the data plugin", "type": "string", "default": null, "optional": true, "validation": "^.+$", "maxlength": 200 } }, "output": {}, "display": "always", "description": "Get data from a data plugin" }, { "action": "get_fact", "input": { "fact": { "prompt": "The name of the fact", "description": "The fact to retrieve", "type": "string", "default": null, "optional": false, "validation": ".+", "maxlength": 512 } }, "output": { "fact": { "description": "The name of the fact being returned", "display_as": "Fact", "type": "string" }, "value": { "description": "The value of the fact", "display_as": "Value", "default": null } }, "display": "always", "description": "Retrieve a single fact from the fact store", "aggregate": [ { "function": "summary", "args": [ "value" ] } ] }, { "action": "get_facts", "input": { "facts": { "prompt": "Comma-separated list of facts to retrieve", "description": "Facts to retrieve", "type": "string", "default": null, "optional": false, "validation": "^\\s*[\\w\\.\\-]+(\\s*,\\s*[\\w\\.\\-]+)*$", "maxlength": 200 } }, "output": { "values": { "description": "List of values of the facts", "display_as": "Values", "type": "hash" } }, "display": "always", "description": "Retrieve multiple facts from the fact store" }, { "action": "inventory", "input": { }, "output": { "agents": { "description": "List of agent names", "display_as": "Agents", "type": "array" }, "facts": { "description": "List of facts and values", "display_as": "Facts", "type": "hash" }, "classes": { "description": "List of classes on the system", "display_as": "Classes", "type": "array" }, "version": { "description": "Choria Server Version", "display_as": "Version", "type": "string" }, "main_collective": { "description": "The main Collective", "display_as": "Main Collective", "type": "string" }, "collectives": { "description": "All Collectives", "display_as": "All Collectives", "type": "array" }, "data_plugins": { "description": "List of data plugin names", "display_as": "Data Plugins", "type": "array" }, "machines": { "description": "Autonomous Agents", "display_as": "Machines", "type": "hash" } }, "display": "always", "description": "System Inventory" }, { "action": "ping", "input": { }, "output": { "pong": { "description": "The local Unix timestamp", "display_as": "Timestamp", "type": "string" } }, "display": "always", "description": "Responds to requests for PING with PONG" } ] }