<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>InfluxData Blog - David Flanagan</title>
    <description>Posts by David Flanagan on the InfluxData Blog</description>
    <link>https://www.influxdata.com/blog/author/rawkode/</link>
    <language>en-us</language>
    <lastBuildDate>Wed, 25 Mar 2020 07:00:26 -0700</lastBuildDate>
    <pubDate>Wed, 25 Mar 2020 07:00:26 -0700</pubDate>
    <ttl>1800</ttl>
    <item>
      <title>Slack Tips for Remote Communication</title>
      <description>&lt;p&gt;As the world is now forced into remote working due to COVID-19, I believe it’s important to make some things explicit that have been implicit for many a remote worker over the past few years with the rise of Slack in the distributed office. These tips are designed to be simple and actionable, with the goal of improving your remote working experience.&lt;/p&gt;

&lt;p&gt;Please keep in mind: &lt;strong&gt;remote is hard&lt;/strong&gt;. At times, you’ll feel disconnected from your peers and frustrated at the simple synchronous tasks that need to become asynchronous. However, there are many benefits you’ll hopefully come to appreciate, but with the lock-down becoming more and more prevalent in your daily lives, these may not become apparent until a sense of normality encroaches the world.&lt;/p&gt;
&lt;h2&gt;Emojis, empathy, and engagement&lt;/h2&gt;
&lt;p&gt;Be empathetic.&lt;/p&gt;

&lt;p&gt;Please remember that text messages have no tone, context, or visual cues. Emojis are great at revealing the tone of your message. Assume the best in your colleagues’ messages, even if they’re terse and direct. Assume they’ve got a child on their knee and they can’t use more words for fear of dropping said child on their head (this has never happened). Use emojis to reveal context when you think you’re being funny or sarcastic.&lt;/p&gt;
&lt;h2&gt;Liberal muting&lt;/h2&gt;
&lt;p&gt;When you’re remote, Slack IS your job — in a terrible and weird sense. Remote teams are only as successful as their ability to communicate with their peers. Collaboration across teams becomes rather difficult, as it’s no longer about wheeling over to another cluster of tables.&lt;/p&gt;

&lt;p&gt;As your company’s wealth of knowledge is primarily communicated over Slack, you’ll find yourself joining more and more channels; trying to keep abreast of the company’s objectives, projects, and progress. To do this, you will end up in more and more channels. The best advice I have for this is extremely liberal use of “/mute”. This allows you to come and go with these channels without them cluttering your notifications and sidebar. You can also mute a channel from the Slack app by right-clicking on it and choosing mute.&lt;/p&gt;
&lt;h2&gt;Liberal tagging&lt;/h2&gt;
&lt;p&gt;You should always tag someone if you want them to see a message. It doesn’t matter if it’s the message right after another message, assuming that they’re not actively following your channel (unless it’s your team channel) and tag them in the messages you want them to see.&lt;/p&gt;

&lt;p&gt;This is increasingly important as we mute more and more channels, as it’s the only way Slack will notify us of such messages. Don’t worry about tagging team mates out of hours, we’ll cover that in “Silence Notifications”.&lt;/p&gt;
&lt;h2&gt;Silence notifications&lt;/h2&gt;
&lt;p&gt;With muted channels and liberal tagging (see, there’s a reason for the order of these tips), you’ll need to take control of your own notifications. It is not your peers’ responsibility to check what hours you prefer to work. When you’re remote, the 9-5 doesn’t exist. Regardless, which 9-5? CET? BST? PST? Believe it, or not, the world doesn’t run on SFO time! ?&lt;/p&gt;
&lt;ol&gt;
 	&lt;li&gt;Set up your Slack to silence notifications outside of your working hours.&lt;/li&gt;
 	&lt;li&gt;&lt;a style="font-size: 16px; background-color: #ffffff;" href="https://roamresearch.slack.com/apps/A5F2S4UH2-away-plus"&gt;Install&lt;/a&gt;&lt;span style="font-size: 16px;"&gt; and use the "/gone" command (/gone 15m shopping) to set yourself "AFK" and set a status at the same time.&lt;/span&gt;&lt;/li&gt;
 	&lt;li&gt;Make sure your notifications are set to "Only Mentions" (see screenshot).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="/images/legacy-uploads/Screenshot-from-2020-03-23-13-31-31.png"&gt;&lt;img class="size-full wp-image-244022" src="/images/legacy-uploads/Screenshot-from-2020-03-23-13-31-31.png" alt="Settings page for Slack that shows silencing Slack notifications unless explicitly tagged" width="669" height="448" /&gt;&amp;lt;figcaption&amp;gt;&lt;/a&gt; Limit Slack notifications&amp;lt;/figcaption&amp;gt;&lt;/p&gt;
&lt;h2&gt;Value asynchronous workflows&lt;/h2&gt;
&lt;p&gt;When sending a direct message to your colleague, it may feel natural to say &lt;em&gt;“Hi”&lt;/em&gt;. However, this moves the conversation to &lt;strong&gt;synchronous&lt;/strong&gt; rather than &lt;strong&gt;asynchronous&lt;/strong&gt;. This forces your colleague to acknowledge you, taking them away from their work. Instead, we should put enough context into the message to allow our colleagues to understand what we need and when we need it.&lt;/p&gt;

&lt;p&gt;Use messages like:&lt;/p&gt;
&lt;blockquote&gt;"Hey, when you have a moment; I'd like to pair with you on the multi user login problem"&lt;/blockquote&gt;
&lt;p&gt;This message articulates what and when. What do I need? I need to pair with you on something, When do I need it? It’s not urgent, whenever you have a moment.&lt;/p&gt;

&lt;p&gt;Sorted.&lt;/p&gt;
&lt;h2&gt;Remind me&lt;/h2&gt;
&lt;p&gt;Inevitably, you will check your Slack outside of your “working” hours. Using “&lt;strong&gt;/remind&lt;/strong&gt;” will allow you to have Slack ping you the following hour, day, or week.&lt;/p&gt;
&lt;h2&gt;Avoid shouting&lt;/h2&gt;
&lt;p&gt;Avoid using &lt;strong&gt;@everyone,&lt;/strong&gt; &lt;strong&gt;@channel&lt;/strong&gt;, &lt;strong&gt;@here&lt;/strong&gt; tags. If you really need to post an announcement, which is the only valid use-case, then you should probably use a dedicated channel or drop to email.&lt;/p&gt;

&lt;p&gt;As our VP of Engineering, Ryan Betts, said &lt;em&gt;“&lt;strong&gt;@here&lt;/strong&gt; is the equivalent of standing up in the office and yelling something to everyone”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;That must mean that &lt;strong&gt;@everyone&lt;/strong&gt; is the equivalent of hiring a barber shop quartet to show-up at every employee’s home, wake them up, and sing your message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That’s not a suggestion — it’s probably best you don’t do that.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Oversharing &amp;amp; communication is key&lt;/h2&gt;
&lt;p&gt;Keep conversations to public channels. There’s no such thing as “over communication” (I hope).&lt;/p&gt;

&lt;p&gt;What seems trivial to you may be interesting and important to others. Use public channels to update on your backlog, projects, WIP, etc.&lt;/p&gt;

&lt;p&gt;Others can decide what they wish to filter.&lt;/p&gt;
&lt;h2&gt;Be accountable &amp;amp; dependable&lt;/h2&gt;
&lt;p&gt;Your colleagues can’t tap you on the shoulder and ask you a question.&lt;/p&gt;

&lt;p&gt;When you worked in an office and they did, you didn’t have the option to avoid answering their question. Being remote doesn’t give you that option either, even if it is super easy to do.&lt;/p&gt;

&lt;p&gt;If your colleague takes time to ask you a question, be courteous and answer them. This can still be asynchronous, and you don’t need to reply right away: but you do need to reply.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you don’t know, say you don’t know.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you don’t have time, say you don’t have time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don’t leave them hanging.&lt;/strong&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;We hope these tips help you in what is a rather turbulent and chaotic time.&lt;/p&gt;

&lt;p&gt;Best of luck!
David&lt;/p&gt;
</description>
      <pubDate>Wed, 25 Mar 2020 07:00:26 -0700</pubDate>
      <link>https://www.influxdata.com/blog/slack-tips-for-remote-communication/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/slack-tips-for-remote-communication/</guid>
      <category>Use Cases</category>
      <category>Developer</category>
      <author>David Flanagan (InfluxData)</author>
    </item>
    <item>
      <title>Meetup Notifications with InfluxDB Cloud</title>
      <description>&lt;p&gt;It was a warm Thursday afternoon, in Scotland, when the familiar chime of Slack woke me from my daydream. It was Thom. Hmm, what does he want?&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/legacy-uploads/ItBegins.png" target="_blank" rel="noopener noreferrer"&gt;&lt;img class="wp-image-237035 size-full" src="/images/legacy-uploads/ItBegins.png" alt="Slack message from Thom asking if we can publish Slack messages when a user group is coming up" width="1600" height="182" /&gt;&amp;lt;figcaption&amp;gt;&lt;/a&gt; Thom asks a simple question.&amp;lt;/figcaption&amp;gt;&lt;/p&gt;
&lt;h2&gt;The mission&lt;/h2&gt;
&lt;p&gt;It was simple. Thom wanted to publish updates for every user group to our &lt;a href="https://w2.influxdata.com/blog/introducing-our-new-influxdata-community-slack-workspace/"&gt;Community Slack&lt;/a&gt;. He wants these notifications posted at 1 week before each event, and 24 hours before each event. Now, of course, I could have used one of the many Slack libraries out there and some Python to parse the Meetup API and run it on a cron … but these are events, right? InfluxDB stores events. So I got to thinking … can we parse the Meetup API with &lt;a href="https://w2.influxdata.com/time-series-platform/telegraf/"&gt;Telegraf&lt;/a&gt;, store the events in InfluxDB, and then use &lt;a href="https://w2.influxdata.com/products/flux/"&gt;Flux&lt;/a&gt; tasks to send the Slack alerts?&lt;/p&gt;

&lt;p&gt;Yes. The answer is yes.&lt;/p&gt;
&lt;h3&gt;Collecting the events&lt;/h3&gt;
&lt;p&gt;First, we need to get the events from Meetup.com into &lt;a href="https://w2.influxdata.com/products/influxdb-cloud/"&gt;InfluxDB Cloud&lt;/a&gt;. We got very lucky here, as Meetup.com actually allows reasonable access to their API without authentication. Telegraf can handle authentication for HTTP requests, but it was nice to not have to worry about it.&lt;/p&gt;

&lt;p&gt;Using the Telegraf HTTP input plugin, we were able to fetch all meetup information from the Meetup.com API with a simple configuration of the &lt;a href="https://github.com/influxdata/telegraf/tree/master/plugins/inputs/http"&gt;HTTP&lt;/a&gt; plugin.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;[[inputs.http]]
  name_override = "meetup-events"
  interval = "1h"

  urls = [
    "https://api.meetup.com/pro/influxdb/events"
  ]

  data_format = "json"

  tag_keys = [
    "event_id",
    "event_venue_city",
    "event_venue_localized_country_name",
    "chapter_name"
  ]

  json_string_fields = ["event_name", "event_link"]

  fieldpass = ["event_duration", "waitlist_count", "yes_rsvp_count"]

  json_time_key = "event_time"
  json_time_format = "unix_ms"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With the configuration above, Telegraf will parse Meetup.com every hour and store the events to InfluxDB Cloud (Output configuration omitted). Yes, we’ll be writing the same points every hour; but we’re using the timestamp the event starts and the series key for each event (combination of tags) won’t change — so we’re golden.&lt;/p&gt;
&lt;h2&gt;Confirming the data&lt;/h2&gt;
&lt;p&gt;By default, when you use “Explore Metrics” to dig around your data … it assumes your data is in the past. Go figure! In order to confirm your data is there, you need to update the GUI time selector — or switch to the script editor. I’ll show you how to do both.&lt;/p&gt;
&lt;h3&gt;GUI&lt;/h3&gt;
&lt;p&gt;Select the date drop-down and select “Custom Time Range”. You can either modify the raw date string, or click fast-forward on the month selector a bunch of times.&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/legacy-uploads/custom-time-range.png"&gt;&lt;img class="aligncenter wp-image-237037 size-large" src="/images/legacy-uploads/custom-time-range-1024x245.png" alt="" width="1024" height="245" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Script editor&lt;/h3&gt;
&lt;p&gt;Flux has built-in support for dates, times and duration. This allows us to write the query below, looking for data between &lt;code class="language-markup"&gt;now()&lt;/code&gt; and 4 weeks (&lt;code class="language-markup"&gt;4w&lt;/code&gt;) time.&lt;/p&gt;

&lt;p&gt;Nice.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;from(bucket: "metrics")
|&amp;gt; range(start: now(), stop: 4w)&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Sending the alerts&lt;/h2&gt;
&lt;p&gt;Now that we’ve collected the data and confirmed it’s available. Let’s look at setting up the first notification: 1 week in advance.&lt;/p&gt;

&lt;p&gt;First, go to the Tasks page. If you’ve never been there before, you’ll see an empty page like this. Click “Create Task”.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-237041 size-full" src="/images/legacy-uploads/tasks.png" alt="" width="779" height="332" /&gt;&lt;/p&gt;
&lt;h4&gt;Task configuration&lt;/h4&gt;
&lt;p&gt;We’re going to run this task every hour, so we’ll need to keep that in mind during our range filter below. We don’t want to send a notification for an event twice, so we need to make sure each query every hour is time scoped correctly.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter wp-image-237042 size-full" src="/images/legacy-uploads/1week.png" alt="" width="373" height="210" /&gt;&lt;/p&gt;
&lt;h4&gt;Range filter&lt;/h4&gt;
&lt;p&gt;We need a very specific range for this query. We want only the events that are scheduled to start between 1 week and 1 week plus 1 hour. This “plus 1 hour” is important. As we run our task once per hour, we ensure we only fetch events from a 1 hour window; avoiding duplicate notifications.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;from(bucket: "metrics")
|&amp;gt; range(start: 1w, stop: 1w1h)&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;&lt;span style="color: #333333; font-size: 18px;"&gt;Measurement filter&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Now, we don’t want to query every measurement in our bucket. We only want the &lt;code class="language-markup"&gt;meetup-events&lt;/code&gt; measurements (name configured in Telegraf).&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;|&amp;gt; filter(fn: (r) =&amp;gt; r._measurement == "meetup-events")&lt;/code&gt;&lt;/pre&gt;
&lt;h4 class="line-numbers"&gt;Group and pivot&lt;/h4&gt;
&lt;p&gt;Due to the way data is stored in InfluxDB 2, we need a couple of extra steps to get the data in the format you’d expect. With our current query, we’re not going to have “row” based data; where each row is a single event. Instead, we’re going to get back columnar data that needs to be assembled. It looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/legacy-uploads/filter.png"&gt;&lt;img class="aligncenter wp-image-237049 size-large" src="/images/legacy-uploads/filter-1024x221.png" alt="" width="1024" height="221" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yikes. Scary! In order to get this into shape, my first thought was to &lt;a href="https://v2.docs.influxdata.com/v2.0/query-data/guides/group-data/#group-function"&gt;group()&lt;/a&gt; by the &lt;code class="language-markup"&gt;event_id&lt;/code&gt;.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;from(bucket: "metrics")
|&amp;gt; range(start: 1w, stop: 1w1h)
|&amp;gt; filter(fn: (r) =&amp;gt; r._measurement == "meetup-events")
|&amp;gt; group(columns: ["event_id"], mode:"by")&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hmm. But unfortunately, that isn’t quite right. Now we have a &lt;strong&gt;table per event&lt;/strong&gt;, with a &lt;strong&gt;row per column&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="/images/legacy-uploads/group-1.png"&gt;&lt;img class="aligncenter size-large wp-image-237050" src="/images/legacy-uploads/group-1-1024x224.png" alt="" width="1024" height="224" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OK. Let’s scratch &lt;a href="https://v2.docs.influxdata.com/v2.0/query-data/guides/group-data/#group-function"&gt;group&lt;/a&gt; and use &lt;a href="https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/built-in/transformations/pivot/"&gt;pivot&lt;/a&gt;.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;from(bucket: "metrics")
|&amp;gt; range(start: 1w, stop: 1w1h)
|&amp;gt; filter(fn: (r) =&amp;gt; r._measurement == "meetup-events")
|&amp;gt; pivot(rowKey:["event_id"], columnKey: ["_field"], valueColumn: "_value")&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="/images/legacy-uploads/pivot-1.png"&gt;&lt;img class="aligncenter wp-image-237051 size-large" src="/images/legacy-uploads/pivot-1-1024x219.png" alt="" width="1024" height="219" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pivot will return a &lt;strong&gt;table for each event&lt;/strong&gt;; with each table having a &lt;strong&gt;single row with all the event fields&lt;/strong&gt;. Perfect.&lt;/p&gt;
&lt;h4&gt;Sending to Slack&lt;/h4&gt;
&lt;p&gt;Flux has 2 methods for interacting with Slack.&lt;/p&gt;
&lt;ol&gt;
 	&lt;li&gt;The HTTP package&lt;/li&gt;
 	&lt;li&gt;The Slack package&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The HTTP package allows us to send arbitrary HTTP requests to any endpoint. This allows us to create an &lt;a href="https://api.slack.com/incoming-webhooks"&gt;incoming webhook&lt;/a&gt; with Slack and send the HTTP request to the endpoint.&lt;/p&gt;

&lt;p&gt;The Slack package allows us to provision a &lt;a href="https://api.slack.com/custom-integrations/legacy-tokens"&gt;legacy token&lt;/a&gt; and send notifications directly to the Slack API.&lt;/p&gt;

&lt;p&gt;The latter allows you to specify the sender/channel and some other details at “send time”, whereas the incoming webhook configures all those details upfront.&lt;/p&gt;

&lt;p&gt;As Slack “legacy tokens” could be deprecated at their will, we’ll use the incoming webhook and the HTTP package for this tutorial.&lt;/p&gt;

&lt;p&gt;In order to use the HTTP package, we first need to import it. This is nice and simple: &lt;code class="language-markup"&gt;import "http"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The API for the HTTP package is pretty simple at the moment:&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;import "http"

http.post(
  url: "http://localhost:9999/",
  headers: {x:"a", y:"b", z:"c"},
  data: bytes(v: "body")
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So with this in mind, we can take our Flux code that we’ve been building up and start to put it all together into something useful.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NB: We’re also using the &lt;/em&gt;&lt;code class="language-markup"&gt;json&lt;/code&gt;&lt;em&gt; package to encode the HTTP payload.&lt;/em&gt;&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;import "http"
import "json"

from(bucket: "metrics")
	|&amp;gt; range(start: 1w, stop: 1w1h)
	|&amp;gt; filter(fn: (r) =&amp;gt;
		(r._measurement == "meetup-events"))
	|&amp;gt; pivot(rowKey: ["event_id"], columnKey: ["_field"], valueColumn: "_value")
	|&amp;gt; map(fn: (r) =&amp;gt; {
		message = {text: "1 Week Warning! ${r.event_group_name} is meeting this time next week in ${r.event_venue_city}, ${r.event_venue_localized_country_name}, and there's ${string(v: r.event_yes_rsvp_count)} amazing people for you to join and learn with. ${r.event_link}"}
		_ = http.post(url: "https://hooks.slack.com/services/SECRET/SECRET/SECRET", data: json.encode(v: message))

		return r
	})&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Oh, shi ... oot!&lt;/h3&gt;
&lt;p&gt;Yeah, did you spot that too? We’re storing a hard-coded secret inside of our Flux task. Shoot!&lt;/p&gt;

&lt;p&gt;Fortunately, InfluxDB 2 provides a secrets API. Sadly, for the moment, there’s no shiny GUI; but we can use the raw API with &lt;code class="language-markup"&gt;curl&lt;/code&gt; for now.&lt;/p&gt;

&lt;p&gt;Let’s add our Slack webhook endpoint to our organization with &lt;code class="language-markup"&gt;curl&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;curl -XPATCH \
  https://us-west-2-1.aws.cloud2.influxdata.com/api/v2/orgs/${ORG_ID}/secrets \
  -H 'authorization: Token ${TOKEN}' \
  -H 'Content-type: application/json' \
  --data '{"slackWebhook": "${SLACK_WEBHOOK_ENDPOINT}"}'&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You’ll need:&lt;/p&gt;
&lt;ol&gt;
 	&lt;li&gt;Organization ID (Grab this from your URI when logged into InfluxDB Cloud)&lt;/li&gt;
 	&lt;li&gt;InfluxDB Cloud token (Grab this from the token page)&lt;/li&gt;
 	&lt;li&gt;Slack Webhook Endpoint&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;Things to note&lt;/h4&gt;
&lt;p&gt;You can use the &lt;code class="language-markup"&gt;curl&lt;/code&gt; with &lt;code class="language-markup"&gt;-XPATCH&lt;/code&gt; as many times as you like to add new secrets. You can see the keys, but not the values, of your secrets with a &lt;code class="language-markup"&gt;GET&lt;/code&gt; request.&lt;/p&gt;

&lt;p&gt;&lt;code class="language-markup"&gt;curl -XGET \
https://us-west-2-1.aws.cloud2.influxdata.com/api/v2/orgs/${ORG_ID}/secrets \
-H 'authorization: Token ${TOKEN}' \
-H 'Content-type: application/json'&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;Cleaning up&lt;/h4&gt;
&lt;p&gt;Now that we’ve created a secret via the API, let’s bring this into our Flux task to clean up the code. Here’s the cleaned up code in full.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;import "http"
import "json"
import "influxdata/influxdb/secrets"

webhookUri = secrets.get(key: "slackWebhook")

from(bucket: "metrics")
	|&amp;gt; range(start: 1w, stop: 1w1h)
	|&amp;gt; filter(fn: (r) =&amp;gt;
		(r._measurement == "meetup-events"))
	|&amp;gt; pivot(rowKey: ["event_id"], columnKey: ["_field"], valueColumn: "_value")
	|&amp;gt; map(fn: (r) =&amp;gt; {
		message = {text: "1 Week Warning! ${r.event_group_name} is meeting this time next week in ${r.event_venue_city}, ${r.event_venue_localized_country_name}, and there's ${string(v: r.event_yes_rsvp_count)} amazing people for you to join and learn with. ${r.event_link}"}
		_ = http.post(url: webhookUri, data: json.encode(v: message))

		return r
	})&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here’s the output on Slack. A job well done, even if I do say so myself ???? &lt;a href="/images/legacy-uploads/notification.png"&gt;&lt;img class="aligncenter size-large wp-image-237070" src="/images/legacy-uploads/notification-1024x58.png" alt="" width="1024" height="58" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Final thoughts&lt;/h2&gt;
&lt;p&gt;InfluxDB Cloud with Flux, tasks and secrets is a powerhouse of functionality. We hope you enjoyed this tutorial and we can’t wait to see what you build.&lt;/p&gt;

&lt;p&gt;Have a rockin’ day.&lt;/p&gt;
</description>
      <pubDate>Thu, 19 Sep 2019 09:48:57 -0700</pubDate>
      <link>https://www.influxdata.com/blog/meetup-notifications-with-influxdb-cloud/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/meetup-notifications-with-influxdb-cloud/</guid>
      <category>Product</category>
      <category>Developer</category>
      <author>David Flanagan (InfluxData)</author>
    </item>
    <item>
      <title>InfluxDB 2 Migration Path: Instrumentation</title>
      <description>&lt;p&gt;InfluxDB 2 and our SaaS offering, &lt;a href="https://cloud2.influxdata.com"&gt;InfluxDB Cloud 2&lt;/a&gt;, are right around the corner. While we’re finalizing the last of our wonderful updates to give you the InfluxDB 2 experience you deserve, we’re going to talk to you about migration paths.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;This article is part of a series. This installment will cover migrating existing instrumentation in your applications with the InfluxDB 1 client libraries to InfluxDB 2 with NO code changes.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;The official migration path&lt;/h2&gt;
&lt;p&gt;InfluxDB 2 will ship with a compatibility mode for InfluxDB 1, but this will come later in the year — closer to our first GA release of InfluxDB 2. This means that you’ll still be able to utilize the client libraries for v1 when using v2, at least in a limited capacity. As that isn’t available right now, we can do something pretty similar, using Telegraf; and that’s what I want to talk about today.&lt;/p&gt;

&lt;p&gt;But before we get to that, let’s talk about client libraries.&lt;/p&gt;
&lt;h3&gt;Client libraries&lt;/h3&gt;
&lt;p&gt;Our CTO Paul Dix has previously mentioned that we’ll be creating, maintaining, and supporting our own official client libraries for InfluxDB 2! While there are some client libraries for InfluxDB 1 under the InfluxData banner on GitHub, these are often maintained by external contributors and the APIs can vary greatly. With InfluxDB 2, we’re going to take a much more active role in the progression and maintenance of the client libraries.&lt;/p&gt;

&lt;p&gt;Of course, these aren’t available at this moment in time either; but on (or near) the launch of 2.0, we plan to support dotNet, Go, Java, JS, PHP, Python and Ruby.&lt;/p&gt;

&lt;p&gt;So how can you start instrumenting your applications for InfluxDB 2 in the meantime?&lt;/p&gt;
&lt;h3&gt;Introducing Telegraf&lt;/h3&gt;
&lt;p&gt;Well … obviously Telegraf needs no introduction … but, more often than not, people don’t quite understand the width and breadth of the plugins available. Case in point: did you know Telegraf has an input plugin called &lt;code class="language-markup"&gt;influxdb_listener?&lt;/code&gt; This plugin allows Telegraf to provide an InfluxDB 1 &lt;code class="language-markup"&gt;/write&lt;/code&gt; compatible proxy.&lt;/p&gt;
&lt;p style="text-align: center;"&gt;???? Woah ????&lt;/p&gt;

&lt;h4&gt;Caveats&lt;/h4&gt;
&lt;p&gt;There are a few things worth noting before you get too excited. Firstly, it really is just the &lt;code class="language-markup"&gt;/write&lt;/code&gt; path. This will not allow you to read from InfluxDB, should you be using any of the client libraries for that purpose. &lt;code class="language-markup"&gt;CREATE DATABASE&lt;/code&gt; requests will respond with a &lt;code class="language-markup"&gt;200 OK&lt;/code&gt; but nothing is actually executed on the remote InfluxDB server; only the Telegraf plugin can determine which database you can write to. More about this shortly.&lt;/p&gt;
&lt;h3&gt;The migration path&lt;/h3&gt;
&lt;p&gt;Let’s get down to details and look at your current, assumed and estimated, architecture.&lt;/p&gt;

&lt;p&gt;&lt;img class="wp-image-235215 size-full" src="/images/legacy-uploads/InfluxDB1-Architecture.png" alt="Writing to InfluxDB 1" width="792" height="162" /&gt;&amp;lt;figcaption&amp;gt; Writing to InfluxDB 1&amp;lt;/figcaption&amp;gt;&lt;/p&gt;

&lt;p&gt;Nice and simple. You’ve got one of our client libraries in your application and you’re using it to write directly to InfluxDB 1.&lt;/p&gt;

&lt;p&gt;Now, we want to change as few pieces as possible. So instead of writing to InfluxDB 1, we’re going to bring in Telegraf to sit in the middle and proxy our requests. Depending on the volume you’re sending through to InfluxDB, it’s up to you on how to deploy this Telegraf.&lt;/p&gt;

&lt;p&gt;Common scenarios are:&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;Telegraf on every host (or DaemonSet)&lt;/li&gt;
 	&lt;li&gt;Telegraf sidecar (Kubernetes)&lt;/li&gt;
 	&lt;li&gt;Centralized Telegraf service&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img class="wp-image-235217 size-full" src="/images/legacy-uploads/InfluxDB2-Architecture.png" alt="Writing to InfluxDB 2 with InfluxDB 1 Client Libraries Through Telegraf" width="1082" height="162" /&gt;&amp;lt;figcaption&amp;gt; Writing to InfluxDB 2 with InfluxDB 1 client libraries through Telegraf&amp;lt;/figcaption&amp;gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;i&gt;If you’re running Telegraf in a container, be sure to check out my &lt;/i&gt;&lt;/b&gt;&lt;a href="https://w2.influxdata.com/blog/bring-your-own-telegraf/"&gt;&lt;b&gt;&lt;i&gt;Bring Your Own Telegraf&lt;/i&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;i&gt; work.&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;h4&gt;Configuring Telegraf&lt;/h4&gt;
&lt;p&gt;The first step is to enable the &lt;code class="language-markup"&gt;influxdb_listener plugin&lt;/code&gt; and get it configured. You can do that with the following:&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;[[inputs.influxdb_listener]]
  ## Address and port to host HTTP listener on
  service_address = ":8086"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is the simplest setup with no authentication, but we don’t recommend running InfluxDB this way. So in order to configure authentication, you can provide TLS and basic authentication details within your Telegraf configuration:&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;[[inputs.influxdb_listener]]
  ## Set one or more allowed client CA certificate file names to enable mutually authenticated TLS connections
  tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
  ## Add service certificate and key
  tls_cert = "/etc/telegraf/cert.pem"
  tls_key = "/etc/telegraf/key.pem"
  ## Optional username and password to accept for HTTP basic authentication.
  ## You probably want to make sure you have TLS configured above for this.
  basic_username = "foobar"
  basic_password = "barfoo"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now when you run Telegraf, it will accept InfluxDB 1 write requests on the configured port.&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;em&gt;&lt;strong&gt;???? Sweet! ????&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now to configure our InfluxDB 2 output. Again, Telegraf makes this trivial:&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;[[outputs.influxdb_v2]]
    ## The URLs of the InfluxDB cluster nodes.
    ## Multiple URLs can be specified for a single cluster, only ONE of the
    ## urls will be written to each interval.
    urls = ["http://127.0.0.1:9999"]

    ## Token for authentication.
    token = ""

    ## Organization is the name of the organization you wish to write to.
    organization = ""

    ## Destination bucket to write into.
    bucket = ""&lt;/code&gt;&lt;/pre&gt;
&lt;p style="text-align: left;"&gt;&lt;em&gt;&lt;strong&gt;Simple!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h5&gt;But wait, there's more!&lt;/h5&gt;
&lt;p&gt;Why stop there? Did you know you can use Telegraf to combi-write? There’s no need to migrate entirely to InfluxDB 2, because who would do that while we’re still in alpha, &lt;em&gt;&lt;strong&gt;amirite&lt;/strong&gt;&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;Why not write to InfluxDB 1, InfluxDB 2, and InfluxDB Cloud 2 … with no code changes whatsoever?&lt;/p&gt;

&lt;p&gt;To do so, just configure multiple output plugins.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;[[outputs.influxdb_v2]]
    # As above
[[outputs.influxdb_v2]]
    # Configure for Cloud 2 (See your settings page)
[[outputs.influxdb]
    # As you currently have right now&lt;/code&gt;&lt;/pre&gt;
&lt;p style="text-align: center;"&gt;????????????&lt;/p&gt;
&lt;p&gt;There you have it, a pain-free way to give InfluxDB 2 a try without changing a single line of code.&lt;/p&gt;

&lt;p&gt;Until next time
????????????&lt;/p&gt;
&lt;p style="text-align: center;"&gt;?? Did you know our &lt;a style="text-align: center;" href="https://w2.influxdata.com/products/influxdb-cloud-2-0/"&gt;SaaS offering, Cloud 2, has a fantastic free tier?&lt;/a&gt; ??&lt;/p&gt;
</description>
      <pubDate>Thu, 15 Aug 2019 07:00:47 -0700</pubDate>
      <link>https://www.influxdata.com/blog/influxdb-2-migration-path-instrumentation/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/influxdb-2-migration-path-instrumentation/</guid>
      <category>Product</category>
      <category>Use Cases</category>
      <category>Developer</category>
      <author>David Flanagan (InfluxData)</author>
    </item>
    <item>
      <title>Bring Your Own Telegraf</title>
      <description>&lt;p&gt;I have the privilege of telling people I work for a truly open source company. What do I mean by that?&lt;/p&gt;

&lt;p&gt;90% of the InfluxData code is open source, with that other 10% being our enterprise additions to our database, &lt;a href="https://w2.influxdata.com/products/influxdb-overview/"&gt;InfluxDB&lt;/a&gt;. That 10% fuels the company and it’s open source commitment.&lt;/p&gt;

&lt;p&gt;Our commitment to open source doesn’t stop there. We also actively encourage, maintain, and support contributions that integrate our products with other products, OSS or otherwise; even those which some may consider our “competitors”. Alas, we don’t see it this way. We welcome and encourage an open and supporting ecosystem around time series, monitoring, and alerting.&lt;/p&gt;

&lt;p&gt;Of course, this comes at a cost. While &lt;a href="https://w2.influxdata.com/time-series-platform/telegraf/"&gt;Telegraf&lt;/a&gt; supports reading and writing to over 200 software components; such as DataDog, Elasticsearch, Kafka, MongoDB, OpenTSDB, Prometheus, Wavefront, and much much more…this comes at a cost…a cost of bytes.&lt;/p&gt;

&lt;p&gt;&lt;img class="wp-image-233338 size-full" src="/images/legacy-uploads/325j6y.jpg" alt="Plugins everywhere" width="735" height="500" /&gt;&amp;lt;figcaption&amp;gt; Plugins everywhere&amp;lt;/figcaption&amp;gt;&lt;/p&gt;

&lt;p&gt;Presently, the Telegraf binary weighs in at &lt;code class="language-markup"&gt;60MiB&lt;/code&gt; (amd64 binary), &lt;code class="language-markup"&gt;244MiB&lt;/code&gt; (Docker Image), and &lt;code class="language-markup"&gt;80MiB&lt;/code&gt; (Docker Image Alpine).&lt;/p&gt;

&lt;p&gt;While not massive, depending on your usage of our plugins, this might be too much for you to chew. As more and more of our community adopts Kubernetes, embracing patterns like sidecars, the size of utilising multiple Telegraf instances can become problematic.&lt;/p&gt;
&lt;h2&gt;Introducing Bring Your Own Telegraf (BYOT)&lt;/h2&gt;
&lt;p&gt;BYOT is a Docker-based framework for building Docker Images with a custom, slim-line, Telegraf binary; that only includes the plugins you need. This does not require any special configuration. You just need to provide your Telegraf configuration, as you normally would.&lt;/p&gt;

&lt;p&gt;This will result in substantially smaller image sizes. Let’s take a look at a comparison. Below are the image sizes for the normal Telegraf image, and the Alpine variant. Next to it is a custom Kubernetes image I built with only the following plugins:&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;Inputs
&lt;ul&gt;
 	&lt;li&gt;Prometheus&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
 	&lt;li&gt;Outputs
&lt;ul&gt;
 	&lt;li&gt;InfluxDB&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;$ docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
telegraf            1.10                c14f9454c5aa        13 days ago         244MB
telegraf            1.10-alpine         f6d6ea3f4972        4 days ago          80MB
rawkode/telegraf    kubernetes          3437fe686f23        4 days ago          25.4MB&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Getting started&lt;/h3&gt;
&lt;p&gt;My recommended approach is to provide a Git repository for each Telegraf configuration within your infrastructure. Let’s assume we want to build a Telegraf with the following plugins:&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;Inputs
&lt;ul&gt;
 	&lt;li&gt;Docker&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
 	&lt;li&gt;Outputs
&lt;ul&gt;
 	&lt;li&gt;InfluxDB 2&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Configuring Telegraf&lt;/h3&gt;
&lt;p&gt;First, we’d create our Telegraf configuration. The build process expects there to be a &lt;code class="language-markup"&gt;telegraf&lt;/code&gt; directory in the root of your build context. This directory is no different from your &lt;code&gt;/etc/telegraf&lt;/code&gt; directory on any other system. You can use a single file, &lt;code class="language-markup"&gt;telegraf.conf&lt;/code&gt;, or a directory-based approach, &lt;code class="language-markup"&gt;telegraf.d&lt;/code&gt;. For simplicity, this example uses a single file.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;[agent]
  interval = "5s"
  omit_hostname = true

[[inputs.docker]]
  endpoint = "unix:///var/run/docker.sock"

[[outputs.influxdb_v2]]
  urls = ["http://influxdb2:9999"]
  token = "$INFLUXDB_2_TOKEN"
  organization = "InfluxData"
  bucket = "default"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next you need to add a &lt;code class="language-markup"&gt;Dockerfile&lt;/code&gt; to your repository:&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;FROM rawkode/telegraf:byo AS build
FROM alpine:3.7 AS telegraf
COPY --from=build /etc/telegraf /etc/telegraf
COPY --from=build /go/src/github.com/influxdata/telegraf/telegraf /bin/telegraf
ENTRYPOINT [ "/bin/telegraf" ]&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Build&lt;/h3&gt;
&lt;p&gt;That’s it! Have your CI system automagically build this image on every commit and push it to your registry and you’re good to go. You can specify the version of Telegraf to build with a &lt;code&gt;build-arg&lt;/code&gt;.&lt;/p&gt;
&lt;pre class="line-numbers"&gt;&lt;code class="language-markup"&gt;docker image build --build-arg VERSION=1.10 -t my_telegraf&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;A custom Telegraf with only the plugins you require, within a few minutes!&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;How does it work?&lt;/h3&gt;
&lt;p&gt;BYOT utilizes the often forgotten &lt;code class="language-markup"&gt;ONBUILD&lt;/code&gt; instruction available within a &lt;code class="language-markup"&gt;Dockerfile&lt;/code&gt;. This allows us to define instructions that are deferred until a subsequent calling, such as your &lt;code class="language-markup"&gt;docker image build&lt;/code&gt; command. Feel free to peruse my &lt;a href="https://github.com/rawkode/bring-your-own-telegraf"&gt;code&lt;/a&gt;, or checkout my &lt;a href="https://github.com/rawkode/bring-your-own-telegraf-example"&gt;example repository&lt;/a&gt;, to understand it a little better.&lt;/p&gt;
&lt;h3&gt;Any other improvements?&lt;/h3&gt;
&lt;p&gt;During my initial tests, which are not extensive, I’ve noticed that the memory usage of Telegraf is about a 1/3 (&lt;code class="language-markup"&gt;6MiB&lt;/code&gt; vs. &lt;code class="language-markup"&gt;12MiB&lt;/code&gt;) of running the normal Telegraf binary with only 4 plugins (system, cpu, mem, disk) enabled. This could be circumstantial and I will publish more results on this in due course.&lt;/p&gt;
&lt;h2&gt;What's next&lt;/h2&gt;
&lt;p&gt;Currently, BYOT supports custom building with input and output plugins based on your configuration. I plan to add support for aggregators and processors shortly also, which will bring our image size down even further.&lt;/p&gt;

&lt;p&gt;Thanks for listening. I’d love to know what you think, so please reach out in the comments section or via &lt;a href="https://twitter.com/rawkode"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Thu, 06 Jun 2019 08:00:41 -0700</pubDate>
      <link>https://www.influxdata.com/blog/bring-your-own-telegraf/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/bring-your-own-telegraf/</guid>
      <category>Use Cases</category>
      <category>Developer</category>
      <category>Product</category>
      <author>David Flanagan (InfluxData)</author>
    </item>
    <item>
      <title>Monitoring TLS Certificates with Telegraf</title>
      <description>&lt;p&gt;We’ve all been there. You’re sitting eating your lunch in the office canteen and you notice a flurry of people walking briskly and asking each other to check the website on their phone. Is it just one phone? Oh, it’s your phone too. Maybe it’s the WiFi … they check on 4G …&lt;/p&gt;

&lt;p&gt;The faces slowly turn in your direction, eyes catching awkwardly. You feel your phone vibrate in your pocket … not just once. Production can’t be down, you think. My pager hasn’t gone off … everything must be fine, they’re confused; right?&lt;/p&gt;

&lt;p&gt;Oh dear. The x509 / TLS certificate expired and nobody in the world can browse our high-profile, 24x7, worldwide, super amazing website.&lt;/p&gt;

&lt;p&gt;While it’s common for operators and developers to monitor their systems, using the metrics we treasure so dearly: RED/USE/4 Golden Signals, something so simple is often overlooked - the x509 certificates with which we deliver our website, used to authenticate microservices, or to authenticate against the Kubernetes API.&lt;/p&gt;

&lt;p&gt;Fortunately, we’ve got you covered! Telegraf has had an x509_cert plugin for many years now, and it couldn’t be easier to setup.&lt;/p&gt;
&lt;h2&gt;Configuring the plugin&lt;/h2&gt;
&lt;p&gt;The x509_cert input plugin supports local and remote x509 endpoints. So whether you’re running Telegraf as a daemonset on your Kubernetes cluster, monitoring your local cert directory, or running a single instance to monitor your certificates from a users perspective; we’ve got you covered.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-markup"&gt;[[inputs.x509_cert]]
    sources= ["https://www.example.org:443", "/etc/tls/certs/www.example.org"]&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Available metrics&lt;/h2&gt;
&lt;p&gt;Now that we’ve got Telegraf collecting and sending our x509 metrics to InfluxDB, we can begin to build a query to alert on its expiration. Fortunately, this is almost as simple as configuring the plugin.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT (expiry / 60 / 60 / 24) as "expiry" FROM "telegraf"."autogen"."x509_cert"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will return the number of days until each certificate expires.&lt;/p&gt;

&lt;p&gt;Telegraf provides the following tags to filter or add to your alerts:&lt;/p&gt;
&lt;ul&gt;
 	&lt;li&gt;common_name&lt;/li&gt;
 	&lt;li&gt;country&lt;/li&gt;
 	&lt;li&gt;locality&lt;/li&gt;
 	&lt;li&gt;organization&lt;/li&gt;
 	&lt;li&gt;organizational_unit&lt;/li&gt;
 	&lt;li&gt;province&lt;/li&gt;
 	&lt;li&gt;source&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you’ve got Telegraf configured to add the hostname to each measurement, that will also be available. Be sure to only use this when running Telegraf as a daemonset or on bare metal.&lt;/p&gt;

&lt;p&gt;Telegraf makes it incredibly simple to monitor these certificates that nobody should ever have to get caught off guard again.&lt;/p&gt;
</description>
      <pubDate>Thu, 25 Apr 2019 14:20:00 -0700</pubDate>
      <link>https://www.influxdata.com/blog/monitoring-tls-certificates-with-telegraf/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/monitoring-tls-certificates-with-telegraf/</guid>
      <category>Use Cases</category>
      <category>Developer</category>
      <author>David Flanagan (InfluxData)</author>
    </item>
    <item>
      <title>One Click to Awesome: Deploying with the DigitalOcean Marketplace</title>
      <description>&lt;p&gt;We’re thrilled to announce that we’ve worked with DigitalOcean to bring the TICK Stack to their new &lt;a href="https://marketplace.digitalocean.com/apps/influxdb-tick-stack" target="_blank" rel="noopener noreferrer"&gt;Marketplace&lt;/a&gt;, providing all DigitalOcean users with a one-click TICK Stack.&lt;/p&gt;
&lt;h2&gt;Getting started&lt;/h2&gt;
&lt;p&gt;We’re going to assume you already have a DigitalOcean account. If you don’t, stop here and go &lt;a href="https://cloud.digitalocean.com/registrations/new"&gt;sign-up&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Creating the droplet&lt;/h3&gt;
&lt;p&gt;From the DigitalOcean dashboard, we’re going to click “Marketplace” on the left-hand side menu. From there, you can then select “Monitoring” and you’ll see “InfluxDB TICK Stack”. Hover over the TICK Stack and click “Create Droplet”.&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter size-large wp-image-223814" src="/images/legacy-uploads/Screenshot-2019-03-06-at-11.00.08-1024x598.png" alt="" width="1024" height="598" /&gt;&lt;/p&gt;

&lt;p&gt;The TICK Stack runs great on DigitalOcean’s $5 droplet, so let’s start with that; you can increase capacity as you need later.&lt;/p&gt;

&lt;p&gt;&lt;img class="wp-image-223477 size-large" src="/images/legacy-uploads/Screenshot-2019-03-04-at-14.23.10-1024x432.png" alt="" width="1024" height="432" /&gt;&amp;lt;figcaption&amp;gt; Select $5 droplet&amp;lt;/figcaption&amp;gt;&lt;/p&gt;

&lt;p&gt;Create the droplet! Once it’s ready, you’ll have a new item in your droplet list. It’ll show a blue loading bar until it’s ready, then you’ll see the IP address. ???? Boom! We’re almost there.&lt;/p&gt;

&lt;p&gt;&lt;img class="wp-image-223478 size-large" src="/images/legacy-uploads/Screenshot-2019-03-04-at-14.49.05-1024x75.png" alt="" width="1024" height="75" /&gt;&amp;lt;figcaption&amp;gt; Wait for the IP address to be shown&amp;lt;/figcaption&amp;gt;&lt;/p&gt;
&lt;h3&gt;Configuring Chronograf&lt;/h3&gt;
&lt;p&gt;After a minute, or two, Chronograf will be ready and listening on your droplet’s IP address. You can use your browser of choice and navigate to that IP. You’ll be presented with the Chronograf welcome page.&lt;/p&gt;

&lt;p&gt;&lt;img class="wp-image-223481 size-large" src="/images/legacy-uploads/Screenshot-2019-03-04-at-14.28.12-1024x551.png" alt="" width="1024" height="551" /&gt;&amp;lt;figcaption&amp;gt; Chronograf Welcome Page&amp;lt;/figcaption&amp;gt;&lt;/p&gt;

&lt;p&gt;Click “Get Started” and it’ll ask for your InfluxDB configuration. You can get the credentials with the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;ssh -l root ip_address_of_droplet -C "cat ~/.digitalocean_password"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This should return something akin to:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;influxdb_admin_username="admin"
influxdb_admin_password="01c59692c3409696bee7fb2d1b82a4a5c46da6b67e58b832"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Enter the username and password into the text fields and click “Add Connection”.&lt;/p&gt;

&lt;p&gt;&lt;img class="wp-image-223482 size-large" src="/images/legacy-uploads/Screenshot-2019-03-04-at-14.29.12-1024x551.png" alt="Chronograf Add Connection" width="1024" height="551" /&gt;&amp;lt;figcaption&amp;gt; Chronograf Add Connection&amp;lt;/figcaption&amp;gt;&lt;/p&gt;

&lt;p&gt;We’ve already configured Telegraf on your droplet to ship metrics to InfluxDB, so you will be presented with the option to add a System dashboard.&lt;/p&gt;

&lt;p&gt;&lt;img class="wp-image-223483 size-large" src="/images/legacy-uploads/Screenshot-2019-03-04-at-14.29.22-1024x551.png" alt="Chronograf Add System Dashboard" width="1024" height="551" /&gt;&amp;lt;figcaption&amp;gt; Chronograf Add System Dashboard&amp;lt;/figcaption&amp;gt;&lt;/p&gt;

&lt;p&gt;Click “Create 1 Dashboard”, followed by “Continue” on the Kapacitor page and you’re all set!&lt;/p&gt;
&lt;h3&gt;Using Chronograf&lt;/h3&gt;
&lt;p&gt;After Telegraf has been collecting metrics for a few moments, you’ll be able to see data on your system dashboard and via the metric explorer.&lt;/p&gt;

&lt;p&gt;&lt;img class="size-large wp-image-223484" src="/images/legacy-uploads/Screenshot-2019-03-04-at-15.05.25-1024x467.png" alt="" width="1024" height="467" /&gt;&amp;lt;figcaption&amp;gt; Chronograf System Dashboard&amp;lt;/figcaption&amp;gt;&lt;/p&gt;
&lt;h2&gt;Next steps&lt;/h2&gt;
&lt;p&gt;We cannot wait for you to get started with your own TICK Stack on top of DigitalOcean, but before you do, we have some final thoughts.&lt;/p&gt;
&lt;h3&gt;Securing Chronograf&lt;/h3&gt;
&lt;p&gt;Out of the box, Chronograf is not secured. We recommend that this is the first thing you configure. Chronograf &lt;a href="https://docs.influxdata.com/chronograf/v1.7/administration/managing-security/"&gt;can be configured&lt;/a&gt; with OAuth 2.0 authentication with many providers, including Google, GitHub, and GitLab. We also recommend enabling &lt;a href="https://docs.influxdata.com/chronograf/v1.7/administration/managing-security/#configuring-tls-transport-layer-security-and-https"&gt;TLS&lt;/a&gt; with a LetsEncrypt certificate, as soon as you’ve added a CNAME record to your droplet.&lt;/p&gt;
&lt;h3&gt;Adding more metrics&lt;/h3&gt;
&lt;p&gt;You’re now free to configure Telegraf on other droplets or instrument your application to ship metrics to InfluxDB. You can create new users for this, rather than using &lt;code class="language-markup"&gt;admin&lt;/code&gt; via the &lt;a href="https://docs.influxdata.com/chronograf/v1.7/administration/managing-chronograf-users/#creating-users"&gt;Chronograf admin pages&lt;/a&gt;, or &lt;a href="https://docs.influxdata.com/influxdb/v1.7/administration/authentication_and_authorization/#user-management-commands"&gt;using the CLI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Curious what Telegraf can ship to InfluxDB for you? Checkout our &lt;a href="https://docs.influxdata.com/telegraf/v1.9/plugins/inputs/"&gt;input plugin documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We hope you enjoy our new one-click setup with DigitalOcean. Let us know what you think by tweeting us at &lt;a href="https://twitter.com/InfluxDB"&gt;@InfluxDB&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Wed, 06 Mar 2019 13:40:32 -0700</pubDate>
      <link>https://www.influxdata.com/blog/one-click-to-awesome-deploying-with-the-digitalocean-marketplace/</link>
      <guid isPermaLink="true">https://www.influxdata.com/blog/one-click-to-awesome-deploying-with-the-digitalocean-marketplace/</guid>
      <category>Use Cases</category>
      <category>Developer</category>
      <author>David Flanagan (InfluxData)</author>
    </item>
  </channel>
</rss>
