synapse.cmds package
Submodules
synapse.cmds.boss module
synapse.cmds.cortex module
- class synapse.cmds.cortex.Log(cli, **opts)[source]
Bases:
Cmd
Add a storm log to the local command session.
Notes
By default, the log file contains all messages received from the execution of a Storm query by the current CLI. By default, these messages are saved to a file located in ~/.syn/stormlogs/storm_(date).(format).
Examples
# Enable logging all messages to mpk files (default) log –on
# Disable logging and close the current file log –off
# Enable logging, but only log edits. Log them as jsonl instead of mpk. log –on –edits-only –format jsonl
# Enable logging, but log to a custom path: log –on –path /my/aweome/log/directory/storm20010203.mpk
# Log only the node messages which come back from a storm cmd execution. log –on –nodes-only –path /my/awesome/log/directory/stormnodes20010203.mpk
- class synapse.cmds.cortex.StormCmd(cli, **opts)[source]
Bases:
Cmd
Execute a storm query.
- Syntax:
storm <query>
- Parameters:
query – The storm query
- Optional Arguments:
–hide-tags: Do not print tags. –hide-props: Do not print secondary properties. –hide-unknown: Do not print messages which do not have known handlers. –show-nodeedits: Show full nodeedits (otherwise printed as a single . per edit). –editformat <format>: What format of edits the server shall emit.
- Options are
nodeedits (default),
count (just counts of nodeedits), or
none (no such messages emitted).
–show-prov: Deprecated. This no longer does anything. –raw: Print the nodes in their raw format. This overrides –hide-tags and –hide-props. –debug: Display cmd debug information along with nodes in raw format. This overrides other display arguments. –path: Get path information about returned nodes. –show <names>: Limit storm events (server-side) to the comma-separated list. –file <path>: Run the storm query specified in the given file path. –optsfile <path>: Run the query with the given options from a JSON/YAML file.
Examples
storm inet:ipv4=1.2.3.4 storm –debug inet:ipv4=1.2.3.4
- editformat_enums = ('nodeedits', 'count', 'none')