System stop, Load Balancing, DMZ server, profile quickview (REST API)
All accesses are logged in the file ./logs/services/message.log (or in the Control Center in the Server Logs under internal/message.log). The password can be obfuscated.
The response is a JSON document (with HTTP status 200). Following is an example of a response to a request with incorrect access data. The response is always structured this way. Only status (ok or failed) and reason have different values. In case of success, further information might be displayed.
{
"response"
: {
"reason"
:
"permission denied (user=xxxx&passwd=xxxx)"
,
"status"
:
"failed"
}
}
{
"response": {
"status": "failed",
"reason": "unknown operation: use /dmz, /shutdown, /emergency, /quickview, /info or /loadbalance"
}
}
Force stop
Besides the manual triggering of a Force Stop in the Control Center (see notes there!) and the possibility of a Force Stop via file, there is the possibility to trigger a Force Stop via HTTP. See also the notes on crashed jobs.
Please use the following URL (e.g. controlled by Nagios).
http(s)://<your_server>/dw/rc/v1/shutdown |
Maintenance stop
Besides the manual triggering of a Maintenance Stop in the Control Center (see notes there!), there is the possibility to trigger a Maintenance Stop via HTTP.
http(s)://<your_server>/dw/rc/v1/maintenance |
Emergency halt
In addition to the manual triggering of an Emergency Halt in the Control Center (see notes there!) and the possibility of an Emergency Halt via the Admin Console, there is the possibility to trigger and end an Emergency Halt via HTTP.
Please use the following URL (e.g. controlled by Nagios).
http(s)://<your_server>/dw/rc/v1/emergency?mode=enable |
Note: Parameter mode=disable ends the Emergency Halt mode.
DMZ
Set new DMZ server via HTTP
A new DMZ server can also be set with this servlet (like under Control Center → System → Settings). Note: After a restart, the DMZ server set in configuration file ./etc/startup.xml will be used again.
The URL for this is the following.
http(s)://<your_server>/dw/rc/v1/dmz?target=<IP>:<port> |
The port is the Message port of the DMZ server (default 8020).
Reset list of active DMZs
If parameter target is omitted or its value is empty, the list of active DMZ servers is reset. This corresponds to the action DMZ Reset in the Control Center. Note: This list is also empty after a restart. The DMZ server entered in the configuration file ./etc/startup.xml is then automatically entered first. This list is only used to check the number of DMZ servers allowed by the license. If a new request comes from a DMZ server, it is first checked whether this server is already in the list. If yes, the request is allowed. If no, then this DMZ server is entered into the list, if the maximum number is not yet reached, and the request is allowed. If the maximum number is reached, then the request is rejected.
http(s)://<your_server>/dw/rc/v1/dmz |
Load Balancing
If in the following we do not explicitly use the term 'Node Controller' or 'Working Node' but 'Node', then both can be meant.
Send crashed and queued jobs to other node
You can send crashed and queued jobs to another node in a Load Balancing system (like under Control Center -> System -> Load Balance).
http(s)://<your_server>/dw/rc/v1/loadbalance/crashedjobs?node=<node> |
The name of the Node (from the configuration file ./etc/factory.xml) from which you want to take over the jobs must be entered in <node>.
And <your_server> is the address of the Node that should take the jobs.
Display failover list
If you are using the Load Balancing failover mechanism, you can use the following request to display a list of all known Load Balancing participants and their priority in case the current Node Controller fails and another participant has to take over this role. See also section Load Balance (Control Center). Parameter enablecheck is optional and tires to reach the other servers in the network if set to true.
http(s)://<your_server>/dw/rc/v1/loadbalance/list?enablecheck=true |
If you get the following response, you first have to activate the failover mechanism.
{
"response"
: {
"status"
:
"failed"
,
"reason"
:
"failover is not switched on"
}
}
It should look something like this:
{
"response"
: {
"status"
:
"ok"
,
"reason"
:
"list of nodes contains 5 hosts"
,
"information"
: {
"myState"
:
"RUNNING"
,
"controller"
:
"41NC1"
,
"details"
:
null
,
"41NC1"
: {
"externalURL"
:
"https://www.google.de"
,
"priority"
:
"0"
},
"41WN1"
: {
"externalURL"
:
"https://www.google.de"
,
"priority"
:
"1"
},
"41WN4"
: {
"externalURL"
:
"https://www.google.de"
,
"priority"
:
"2"
},
"41WN3"
: {
"externalURL"
:
"https://www.google.de"
,
"priority"
:
"3"
},
"41WN2"
: {
"externalURL"
:
"https://www.google.de"
,
"priority"
:
"4"
}
}
}
}
Manually switch Node Controller
The following request to the Node Controller (<your_server>) makes the Node <node> the new Node Controller . Note: If the previous Node Controller was a Node Controller by license and configuration, it terminates and can only be restarted manually. If the previous Node Controller was a Working Node by license and configuration, then it automatically restarts as a Working Node.
http(s)://<your_server>/dw/rc/v1/loadbalance/toggle?node=<node> |
The switch takes place during runtime. Example: .../dw/rc/v1/loadbalance/toggle?node=Node1...
Manually set Node Controller
The following request informs the called Working Node (<your_server>) about the active Node Controller (<node>).
http(s)://<your_server>/dw/rc/v1/loadbalance/join?node=<node> |
This is helpful if this Working Node was started after a change of the Node Controller and therefore still tries to find the old Node Controller. Example: .../dw/rc/v1/loadbalance/join?node=Node1...
Quickview for profiles
The following request shows the most important parameters of a profile in a compact form.
http(s)://<your_server>/dw/rc/v1/quickview?profile=<profile name or profile ID> |