Skip to content

Commit

Permalink
v1.2.9-stable-luminosity
Browse files Browse the repository at this point in the history
IssueID #2642: v1.2.9-stable-luminosity
  • Loading branch information
earthgecko committed Oct 30, 2018
2 parents 5a5684f + 1c8326e commit afbe92d
Show file tree
Hide file tree
Showing 160 changed files with 1,474 additions and 506 deletions.
4 changes: 3 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ msgpack-python==0.5.6
#requests==2.18.3
# @modified 20180910 - Task #2588: Update dependencies
#requests==2.18.4
requests==2.19.1
# @modified 20181030 - Support #2652: CVE-2018-18074 - Skyline requests
#requests==2.19.1
requests==2.20.0

# ALERTERS - uncomment any alerters you want to enable
python-simple-hipchat==0.4.0
Expand Down
6 changes: 3 additions & 3 deletions docs/_build/html/_modules/algorithm_exceptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>algorithm_exceptions &mdash; Skyline 1.2.8-stable documentation</title>
<title>algorithm_exceptions &mdash; Skyline 1.2.9-stable documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="Skyline 1.2.8-stable documentation" href="../index.html"/>
<link rel="top" title="Skyline 1.2.9-stable documentation" href="../index.html"/>
<link rel="up" title="Module code" href="index.html"/>


Expand Down Expand Up @@ -208,7 +208,7 @@ <h1>Source code for algorithm_exceptions</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'1.2.8-stable',
VERSION:'1.2.9-stable',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
6 changes: 3 additions & 3 deletions docs/_build/html/_modules/analyzer/agent.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>analyzer.agent &mdash; Skyline 1.2.8-stable documentation</title>
<title>analyzer.agent &mdash; Skyline 1.2.9-stable documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Skyline 1.2.8-stable documentation" href="../../index.html"/>
<link rel="top" title="Skyline 1.2.9-stable documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>


Expand Down Expand Up @@ -322,7 +322,7 @@ <h1>Source code for analyzer.agent</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'1.2.8-stable',
VERSION:'1.2.9-stable',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
29 changes: 23 additions & 6 deletions docs/_build/html/_modules/analyzer/alerters.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>analyzer.alerters &mdash; Skyline 1.2.8-stable documentation</title>
<title>analyzer.alerters &mdash; Skyline 1.2.9-stable documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Skyline 1.2.8-stable documentation" href="../../index.html"/>
<link rel="top" title="Skyline 1.2.9-stable documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>


Expand Down Expand Up @@ -183,7 +183,9 @@ <h1>Source code for analyzer.alerters</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">msgpack</span> <span class="k">import</span> <span class="n">Unpacker</span>
<span class="kn">import</span> <span class="nn">datetime</span> <span class="k">as</span> <span class="nn">dt</span>
<span class="c1"># @added 20180809 - Bug #2498: Incorrect scale in some graphs</span>
<span class="kn">from</span> <span class="nn">time</span> <span class="k">import</span> <span class="n">time</span>
<span class="c1"># @modified 20181025 - Feature #2618: alert_slack</span>
<span class="c1"># Added gmtime and strftime</span>
<span class="kn">from</span> <span class="nn">time</span> <span class="k">import</span> <span class="p">(</span><span class="n">time</span><span class="p">,</span> <span class="n">gmtime</span><span class="p">,</span> <span class="n">strftime</span><span class="p">)</span>
<span class="c1"># @modified 20160820 - Issue #23 Test dependency updates</span>
<span class="c1"># Use Agg for matplotlib==1.5.2 upgrade, backwards compatibile</span>
<span class="kn">import</span> <span class="nn">matplotlib</span>
Expand Down Expand Up @@ -1265,6 +1267,15 @@ <h1>Source code for analyzer.alerters</h1><div class="highlight"><pre>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s1">&#39;graphite_from - </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">graphite_from</span><span class="p">))</span>
<span class="n">graphite_until</span> <span class="o">=</span> <span class="n">dt</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">fromtimestamp</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">until_timestamp</span><span class="p">))</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;%H:%M_%Y%m</span><span class="si">%d</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s1">&#39;graphite_until - </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">graphite_until</span><span class="p">))</span>
<span class="c1"># @added 20181025 - Feature #2618: alert_slack</span>
<span class="c1"># Added date and time info so you do not have to mouseover the slack</span>
<span class="c1"># message to determine the time at which the alert came in</span>
<span class="n">timezone</span> <span class="o">=</span> <span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Z&quot;</span><span class="p">,</span> <span class="n">gmtime</span><span class="p">())</span>
<span class="c1"># @modified 20181029 - Feature #2618: alert_slack</span>
<span class="c1"># Use the standard UNIX data format</span>
<span class="c1"># human_anomaly_time = dt.datetime.fromtimestamp(int(until_timestamp)).strftime(&#39;%Y-%m-%d %H:%M:%S&#39;)</span>
<span class="n">human_anomaly_time</span> <span class="o">=</span> <span class="n">dt</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">fromtimestamp</span><span class="p">(</span><span class="nb">int</span><span class="p">(</span><span class="n">until_timestamp</span><span class="p">))</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">%c</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="n">slack_time_string</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%s</span><span class="s1"> </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">human_anomaly_time</span><span class="p">,</span> <span class="n">timezone</span><span class="p">)</span>

<span class="k">if</span> <span class="n">settings</span><span class="o">.</span><span class="n">GRAPHITE_PORT</span> <span class="o">!=</span> <span class="s1">&#39;&#39;</span><span class="p">:</span>
<span class="k">if</span> <span class="n">known_derivative_metric</span><span class="p">:</span>
Expand Down Expand Up @@ -1382,9 +1393,14 @@ <h1>Source code for analyzer.alerters</h1><div class="highlight"><pre>

<span class="k">for</span> <span class="n">channel</span> <span class="ow">in</span> <span class="n">channels</span><span class="p">:</span>
<span class="k">if</span> <span class="n">settings</span><span class="o">.</span><span class="n">IONOSPHERE_ENABLED</span><span class="p">:</span>
<span class="n">initial_comment</span> <span class="o">=</span> <span class="n">slack_title</span> <span class="o">+</span> <span class="s1">&#39; :: &lt;&#39;</span> <span class="o">+</span> <span class="n">link</span> <span class="o">+</span> <span class="s1">&#39;|graphite image link&gt;</span><span class="se">\n</span><span class="s1">*Ionosphere training dir* :: &lt;&#39;</span> <span class="o">+</span> <span class="n">ionosphere_link</span> <span class="o">+</span> <span class="s1">&#39;|training data link&gt;&#39;</span>
<span class="c1"># @modified 20181025 - Feature #2618: alert_slack</span>
<span class="c1"># Added date and time info so you do not have to mouseover the slack</span>
<span class="c1"># message to determine the time at which the alert came in</span>
<span class="c1"># initial_comment = slack_title + &#39; :: &lt;&#39; + link + &#39;|graphite image link&gt;\n*Ionosphere training dir* :: &lt;&#39; + ionosphere_link + &#39;|training data link&gt;&#39;</span>
<span class="n">initial_comment</span> <span class="o">=</span> <span class="n">slack_title</span> <span class="o">+</span> <span class="s1">&#39; :: &lt;&#39;</span> <span class="o">+</span> <span class="n">link</span> <span class="o">+</span> <span class="s1">&#39;|graphite image link&gt;</span><span class="se">\n</span><span class="s1">*Ionosphere training dir* :: &lt;&#39;</span> <span class="o">+</span> <span class="n">ionosphere_link</span> <span class="o">+</span> <span class="s1">&#39;|training data link&gt; :: for anomaly at &#39;</span> <span class="o">+</span> <span class="n">slack_time_string</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">initial_comment</span> <span class="o">=</span> <span class="n">slack_title</span> <span class="o">+</span> <span class="s1">&#39; :: &lt;&#39;</span> <span class="o">+</span> <span class="n">link</span> <span class="o">+</span> <span class="s1">&#39;|graphite image link&gt;&#39;</span>
<span class="c1"># initial_comment = slack_title + &#39; :: &lt;&#39; + link + &#39;|graphite image link&gt;&#39;</span>
<span class="n">initial_comment</span> <span class="o">=</span> <span class="n">slack_title</span> <span class="o">+</span> <span class="s1">&#39; :: &lt;&#39;</span> <span class="o">+</span> <span class="n">link</span> <span class="o">+</span> <span class="s1">&#39;|graphite image link&gt;</span><span class="se">\n</span><span class="s1">For anomaly at &#39;</span> <span class="o">+</span> <span class="n">slack_time_string</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1"># slack does not allow embedded images, nor links behind authentication</span>
<span class="c1"># so we have to upload an image with the message</span>
Expand Down Expand Up @@ -1425,6 +1441,7 @@ <h1>Source code for analyzer.alerters</h1><div class="highlight"><pre>
<span class="sd"> alert[0]: The matched substring of the anomalous metric\n</span>
<span class="sd"> alert[1]: the name of the strategy being used to alert\n</span>
<span class="sd"> alert[2]: The timeout of the alert that was triggered\n</span>
<span class="sd"> alert[3]: The second order resolution hours [optional for Mirage]\n</span>
<span class="sd"> :param meric:</span>
<span class="sd"> The metric tuple.\n</span>
<span class="sd"> metric[0]: the anomalous value\n</span>
Expand Down Expand Up @@ -1478,7 +1495,7 @@ <h1>Source code for analyzer.alerters</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'1.2.8-stable',
VERSION:'1.2.9-stable',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
6 changes: 3 additions & 3 deletions docs/_build/html/_modules/analyzer/algorithms.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>analyzer.algorithms &mdash; Skyline 1.2.8-stable documentation</title>
<title>analyzer.algorithms &mdash; Skyline 1.2.9-stable documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Skyline 1.2.8-stable documentation" href="../../index.html"/>
<link rel="top" title="Skyline 1.2.9-stable documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>


Expand Down Expand Up @@ -888,7 +888,7 @@ <h1>Source code for analyzer.algorithms</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'1.2.8-stable',
VERSION:'1.2.9-stable',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
13 changes: 8 additions & 5 deletions docs/_build/html/_modules/analyzer/analyzer.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>analyzer.analyzer &mdash; Skyline 1.2.8-stable documentation</title>
<title>analyzer.analyzer &mdash; Skyline 1.2.9-stable documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Skyline 1.2.8-stable documentation" href="../../index.html"/>
<link rel="top" title="Skyline 1.2.9-stable documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>


Expand Down Expand Up @@ -1549,7 +1549,9 @@ <h1>Source code for analyzer.analyzer</h1><div class="highlight"><pre>

<span class="k">if</span> <span class="n">settings</span><span class="o">.</span><span class="n">ENABLE_MIRAGE</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">SECOND_ORDER_RESOLUTION_FULL_DURATION</span> <span class="o">=</span> <span class="n">alert</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
<span class="c1"># @modified 20181023 - Feature #2618: alert_slack</span>
<span class="c1"># SECOND_ORDER_RESOLUTION_FULL_DURATION = alert[3]</span>
<span class="n">SECOND_ORDER_RESOLUTION_FULL_DURATION</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">alert</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span>
<span class="n">mirage_metric</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">analyzer_metric</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span>
Expand Down Expand Up @@ -1585,7 +1587,8 @@ <h1>Source code for analyzer.analyzer</h1><div class="highlight"><pre>
<span class="k">try</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">redis_conn</span><span class="o">.</span><span class="n">setex</span><span class="p">(</span><span class="n">mirage_metric_cache_key</span><span class="p">,</span> <span class="n">alert</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">packb</span><span class="p">(</span><span class="n">metric</span><span class="p">[</span><span class="mi">0</span><span class="p">]))</span>
<span class="k">except</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s1">&#39;error :: failed to add mirage.metrics Redis key&#39;</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">traceback</span><span class="o">.</span><span class="n">format_exc</span><span class="p">())</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s1">&#39;error :: failed to add mirage.metrics Redis key - </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">mirage_metric_cache_key</span><span class="p">))</span>

<span class="c1"># metric_timestamp = int(time())</span>
<span class="c1"># anomaly_check_file = &#39;%s/%s.%s.txt&#39; % (settings.MIRAGE_CHECK_PATH, metric_timestamp, metric[1])</span>
Expand Down Expand Up @@ -2253,7 +2256,7 @@ <h1>Source code for analyzer.analyzer</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'1.2.8-stable',
VERSION:'1.2.9-stable',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
6 changes: 3 additions & 3 deletions docs/_build/html/_modules/analyzer_dev/agent.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>analyzer_dev.agent &mdash; Skyline 1.2.8-stable documentation</title>
<title>analyzer_dev.agent &mdash; Skyline 1.2.9-stable documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Skyline 1.2.8-stable documentation" href="../../index.html"/>
<link rel="top" title="Skyline 1.2.9-stable documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>


Expand Down Expand Up @@ -380,7 +380,7 @@ <h1>Source code for analyzer_dev.agent</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'1.2.8-stable',
VERSION:'1.2.9-stable',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down
6 changes: 3 additions & 3 deletions docs/_build/html/_modules/analyzer_dev/alerters.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>analyzer_dev.alerters &mdash; Skyline 1.2.8-stable documentation</title>
<title>analyzer_dev.alerters &mdash; Skyline 1.2.9-stable documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="Skyline 1.2.8-stable documentation" href="../../index.html"/>
<link rel="top" title="Skyline 1.2.9-stable documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>


Expand Down Expand Up @@ -374,7 +374,7 @@ <h1>Source code for analyzer_dev.alerters</h1><div class="highlight"><pre>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'1.2.8-stable',
VERSION:'1.2.9-stable',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
Expand Down

0 comments on commit afbe92d

Please sign in to comment.