Discussion:
[influxdb] kapacitor is not alerting to slack
Ravi Kumar Singh1
2017-05-17 17:37:13 UTC
Permalink
<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10.5pt" ><div dir="ltr" ><p>Hi Team,<br>I have below installed to my Mac OS:<br>InfluxDB v1.2.3, Telegraf v1.2.1 and Kapacitor.</p> <p>After running Influx DB, starting telegraf and starting kapacitor, I can see the alerts being logged to the log file present in my Mac but I can't see the alerts being sent to Slack channel.<br>Below is output of the: kapacitor show cpu_alert2</p> <p>ID: cpu_alert2<br>Error:<br>Template:<br>Type: stream<br>Status: enabled<br>Executing: true<br>Created: 16 May 17 16:38 CDT<br>Modified: 17 May 17 12:09 CDT<br>LastEnabled: 17 May 17 12:09 CDT<br>Databases Retention Policies: ["kapacitor_example"."autogen"]<br>TICKscript:<br>stream<br>// Select just the cpu measurement from our example database.<br>|from()<br>.measurement('cpu')<br>|alert()<br>.crit(lambda: sigma("usage_idle") &gt; 3)<br>// Whenever we get an alert write it to a file.<br>.log('/Users/ravikumarsingh/Desktop/alerts.log')<br>.slack()</p> <p>DOT:<br>digraph cpu_alert2 {<br>graph [throughput="0.00 points/s"];</p> <p>stream0 [avg_exec_time_ns="0s" ];<br>stream0 -&gt; from1 [processed="962"];</p> <p>from1 [avg_exec_time_ns="619ns" ];<br>from1 -&gt; alert2 [processed="962"];</p>
<p>alert2 [alerts_triggered="21" avg_exec_time_ns="72.024µs" crits_triggered="12" infos_triggered="0" oks_triggered="9" warns_triggered="0" ];<br>}</p>
<p>So, I can see 21 alerts being triggered and I can see the alerts to the log file also but its not being sent to the slack channel.</p>
<p>Below is the slack configuration in kapacitor.conf file:</p>
<p>[slack]<br>enabled = true<br>url = "<a href="https://hooks.slack.com/services/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" >https://hooks.slack.com/services/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</a>"<br>channel = "#general"<br>username = "kapacitor"<br>icon-emoji = ""<br>global = true<br>state-changes-only = false</p>
<div>&nbsp;</div>
<p>Below is telegrapf.conf file:<br>[agent]<br>interval = "1s"</p>
<p>[outputs]</p>
<p>[outputs.influxdb]<br>urls = ["http://localhost:8086"]<br>database = "kapacitor_example"<br>user_agent = "telegraf"</p>
<p>[cpu]<br>percpu = false<br>totalcpu = true<br>drop = ["cpu_time"]<br>~<br>I am not sure if there is some issue with my Databases Retention Policies. Requesting you to please let me know what I am doing wrong here.</p>
<div>Any help would be highly appreciated!</div>
<div>&nbsp;</div>
<div>Thanks and Regards,</div>
<div>Ravi Singh</div>
<div>IBM Watson -IoT</div></div></div><BR>

<p></p>

-- <br />
Remember to include the version number!<br />
--- <br />
You received this message because you are subscribed to the Google Groups &quot;InfluxData&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:influxdb+***@googlegroups.com">influxdb+***@googlegroups.com</a>.<br />
To post to this group, send email to <a href="mailto:***@googlegroups.com">***@googlegroups.com</a>.<br />
Visit this group at <a href="https://groups.google.com/group/influxdb">https://groups.google.com/group/influxdb</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/influxdb/OFB4DE0DD9.1535A4D9-ON00258123.0060A4A6-00258123.0060CAE0%40notes.na.collabserv.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/influxdb/OFB4DE0DD9.1535A4D9-ON00258123.0060A4A6-00258123.0060CAE0%40notes.na.collabserv.com</a>.<br />
For more options, visit <a href="https://groups.google.com/d/optout">https://groups.google.com/d/optout</a>.<br />
Loading...