Send is a an automation tool that works over ssh. It consists of three main components:
- the send binary (gives you access to the send command if added to your path)
- the api (acts as a broker between the http interface and the send binary. requires node/npm)
- the http interface
as this project continues to grow, I aim to make packaging easier and easier. right now I assume you know a few things:
- how to use git to clone the repository
- how to install packages on your operating system (go, node, and npm in this case)
- send/api/config/default.json contains information that node will use during runtime. the api section is used for api configuration, such as logging path, and the location of the send binary. the send section contains information pertinent to the send configuration which the end user cant control, like which key they can use and where to send logs to.
- send/api/data/nodes.json is where the http interface looks when it populates the dropdown
- send/frontend/* is where you can modify the stylesheet/html and make any required configuration changes to index.html and main.js
- send is a passwordless application, ssh keys must be traded with all target machines
- once compiled, send will need to be added to your path.
- if you're running the api, it needs to know the path as well
this is what the api expects. the values serve as examples, but the keys matter.
let command = {
"cmd": "uptime",
"user": "sadmin",
"host": null,
"port": 22,
"timeout": "120",
"ordered": false
}
please see the provided "api.py" for a working example
send commands to remote machines with golang
Usage of send:
-c string
specify command
-conf string
json config location
-fatal
return failed exit codes
-file string
specify a file separated by newline
-hosts string
multiple hosts inside quotes
-key string
path to key if not default
-log PROTO@ADDR:PORT
for flat file: /path/name.ext, syslog: PROTO@ADDR:PORT
-ordered
run in order instead of async
-port int
port number (default 22)
-timeout int
timeout in seconds (default 90)
-uniq string
a unique string (default "_SEND_")
-user string
username