Like the command add, his command dynamically add a process to monitor in gafferd. Informations are gathered from a file or stdin if the name of file is -. The file sent is a json file that have the same format described for the HTTP message.
HTTP/1.1 POST /processes
Content-Type: application/json
Accept: application/json
{
"name": "somename",
"cmd": "cmd to execute":
"args": [],
"env": {}
"uid": int or "",
"gid": int or "",
"cwd": "working dir",
"detach: False,
"shell": False,
"os_env": False,
"numprocesses": 1
}
The response return {“ok”: true} with an http status 200 if everything is ok.
It return a 409 error in case of a conflict (a process with this name has already been created.
gafferctl load_process [--start] <file>
Example of usage:
$ gafferctl load_process ../test.json
$ cat ../test.json | gafferctl load_process -
$ gafferctl load_process - < ../test.json