Improve the note about start signals and alerting logic

cc: #547
This commit is contained in:
Pēteris Caune 2021-08-06 16:10:06 +03:00
parent 2a9bc42dd4
commit 74f56a5501
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
2 changed files with 15 additions and 4 deletions

View File

@ -4,8 +4,12 @@
It will store the "start" events and display the job execution times. SITE_NAME It will store the "start" events and display the job execution times. SITE_NAME
calculates the job execution times as the time gaps between adjacent "start" and calculates the job execution times as the time gaps between adjacent "start" and
"complete" events.</p> "complete" events.</p>
<p>Signaling a start kicks off a separate timer: the job now <strong>must</strong> signal a <h2>Alerting Logic</h2>
success within its configured "Grace Time," or it will get marked as "down."</p> <p>SITE_NAME applies an additional alerting rule for jobs that use the <code>/start</code> signal.</p>
<p>If a job sends a "start" signal, but then does not send a "complete"
signal within its configured grace time, SITE_NAME will assume the job
has failed. It will mark the job as "down" and send out alerts.</p>
<h2>Usage Example</h2>
<p>Below is a code example in Python:</p> <p>Below is a code example in Python:</p>
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">requests</span> <div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">requests</span>
<span class="n">URL</span> <span class="o">=</span> <span class="s2">&quot;PING_URL&quot;</span> <span class="n">URL</span> <span class="o">=</span> <span class="s2">&quot;PING_URL&quot;</span>

View File

@ -6,8 +6,15 @@
calculates the job execution times as the time gaps between adjacent "start" and calculates the job execution times as the time gaps between adjacent "start" and
"complete" events. "complete" events.
Signaling a start kicks off a separate timer: the job now **must** signal a ## Alerting Logic
success within its configured "Grace Time," or it will get marked as "down."
SITE_NAME applies an additional alerting rule for jobs that use the `/start` signal.
If a job sends a "start" signal, but then does not send a "complete"
signal within its configured grace time, SITE_NAME will assume the job
has failed. It will mark the job as "down" and send out alerts.
## Usage Example
Below is a code example in Python: Below is a code example in Python: