-
-
Save agent462/5368716 to your computer and use it in GitHub Desktop.
# | |
# Welcome to the sensu-cli. | |
# ______ | |
# .-' '-. | |
# .' __ '. | |
# / / \ \ | |
# ------------------ | |
# /\ | |
# '--' | |
# SENSU | |
# | |
Available subcommands: (for details, sensu SUB-COMMAND --help) | |
** Aggregate Commands ** | |
sensu aggregate list | |
sensu aggregate show CHECK | |
sensu aggregate delete CHECK | |
** Check Commands ** | |
sensu check list | |
sensu check show CHECK | |
sensu check request | |
** Client Commands ** | |
sensu client list | |
sensu client show NODE | |
sensu client delete NODE | |
sensu client history NODE | |
** Event Commands ** | |
sensu event list | |
sensu event show NODE (OPTIONS) | |
sensu event delete NODE CHECK | |
** Info Commands ** | |
sensu info | |
** Silence Commands ** | |
sensu silence client (OPTIONS) | |
** Stash Commands ** | |
sensu stash list | |
sensu stash show STASHPATH | |
sensu stash delete STASHPATH | |
** Resolve Commands ** | |
sensu resolve client check | |
--version, -v: Print version and exit | |
--help, -h: Show this message |
Nice, I think this is the right structure.
@joemiller +1 for the example, but if socket is only listening on localhost, cli client won't be able to do much.
What do you think about adding an on-demand check to the API, or a way to trigger a check test?
Thanks @joemiller @agoddard. I'm all for adding features once the core api is implemented. One of my guys wants to be able to filter clients by some data because we jam tons of client data in the client config.
I have one bug to work with the way I'm doing ARGV shifting and capturing when someone actually does --help where I expect a value to be. Well, then some code refactor too :). It's all in the cli branch.
Only a couple items have options now but I also need to add paging to the items that support it. This is an example of one of the ones with options:
sensu silence client SOME_HOST --check some_check
i like it. fits what i had in mind after using the current version for a few minutes.
what do you think about extending it beyond just the rest api and providing interfaces to other things like the sensu client socket? eg:
sensu event create NAME STATUS OUTPUT (options)
would be equiv to:echo '{"name": "some_check", "status": 2, "output": "check output"}' | nc 127.0.0.1 3030