snews_pt.remote_commands¶
Easy handle remote commands
Melih Kara, kara@kit.edu
Functions¶
|
test the server connection |
|
Ask server to print the heartbeat logs on the server as standard output |
|
If authorized, drop the current cache at the server |
|
If authorized, server changes the broker |
|
Get heartbeat feedback by email |
Module Contents¶
- snews_pt.remote_commands.test_connection(detector_name=None, firedrill=True, start_at='LATEST', patience=8)[source]¶
test the server connection It should prompt your whether the coincidence script is running in the server
- Parameters:
start_at (str) – Where hop starts looking for messages can either be “LATEST” or “EARLIEST”
patience (int) – Seconds to wait before the check
- Return type:
None
- snews_pt.remote_commands.write_hb_logs(detector_name=None, admin_pass=None, firedrill=True)[source]¶
Ask server to print the heartbeat logs on the server as standard output later admins can see them remotely. Requires admin password
- Parameters:
detector_name (str) – Name of the detector requesting the write operation
admin_pass (str) – Simple password as a string
firedrill (bool) – Whether to use the firedrill broker
- snews_pt.remote_commands.reset_cache(detector_name=None, admin_pass=None, firedrill=True, is_test=True)[source]¶
If authorized, drop the current cache at the server
- Parameters:
detector_name (str) – Name of the detector
admin_pass (str) – Simple password as a string
firedrill (bool) – Whether to use the firedrill broker
- snews_pt.remote_commands.change_broker(brokername, detector_name=None, admin_pass=None, firedrill=True)[source]¶
If authorized, server changes the broker === Not implemented yet === brokername : str
name of the broker to replace
- detector_namestr
Name of the detector
- admin_passstr
Simple password as a string
- firedrillbool
Whether to use the firedrill broker
- snews_pt.remote_commands.get_feedback(detector_name=None, email_address=None, firedrill=True)[source]¶
Get heartbeat feedback by email For a given detector, if your email is registered We are going to send that email address(es) an email with feedback from last 24hours. multiple email addresses are allowed with a semicolon delimiter (;)
- Parameters:
detector_name (str) – Name of your detector
email_address (str or list) – Registered e-mail adress(es)
firedrill (bool) – Whether to use firedrill broker or not