Ep. 28: Working with InfluxDB integration in Checkmk

Please accept marketing cookies to watch this video.

[0:00:00] Welcome to the Checkmk channel. Today, I'm going to show you how to send metrics to InfluxDB.
[0:00:15] So, InfluxDB introduced a new protocol to send data to InfluxDBs. So, we went ahead and overhauled our InfluxDB integration.
[0:00:27] So, the old integration is still available, so if you're using it, it will work on until InfluxDB deprecates the old protocol which is called Graphite.
[0:00:36] But we created a new connector, that is using the new flux protocol and can talk natively to the InfluxDB.
[0:00:43] So, let's have a look how that is configured. So, to get started, we need a token to authenticate against InfluxDB, and for that, I'm going to log in here.
[0:00:56] I'm using the administrator and I will go to Data, Tokens, and there we can find my initial token. So, I'm going to go in here, copy it to clipboard, and then we can move over to Checkmk.
[0:01:14] So, we are going to store the token in our password store, so we can easily reuse it. Add the password. Let's give it a name.
[0:01:27] And we put the token in here and we can save this, so now we can reuse this token everywhere we want to. And now let's create the InfluxDB connection.
[0:01:40] So, this is the first thing we need, the connection and the second rule will decide which metrics will be sent to InfluxDB.
[0:01:48] But first, let's create the connection. Create a new connection, that has an ID. And we can just call it tribe29, for example.
[0:02:00] We want to use it for all sites but you could configure it here, so if you have several sites that should send their metrics to several InfluxDB instances, you can configure that in here, you can create one rule or one connection per site.
[0:02:13] But in this scenario, we are going to use all sites, so all the metrics would be sent. We are gonna use HTTP in this demo environment.
[0:02:26] This is the default InfluxDB port here. I am gonna use this IP address here and now we need to give it a token to authenticate.
[0:02:36] We will use this from the password store and it's already pre-filled here. So, this is all the information we really need.
[0:02:42] We need a Protocol and the port number, under which InfluxDB will be reachable, the Hostname or IP address, of course, and we need a token to authenticate. So, that's really all there is to do for the connection. Let's save that.
[0:02:55] Now the connection is here. It's enabled and usable. And now there's a shortcut with which you could go to the send metrics to InfluxDB rule. Let's do that here real quick.
[0:03:08] The other way would be just to show you to search again for InfluxDB and then there's the rule, Set to send metrics to InfluxDB.
[0:03:17] Okay, but we're already here. So, let's start. We need to choose a connection as we only have one. This is the one I'm going to choose.
[0:03:25] The Organization is tribe29 and the Bucket checkmk. This is something that you get from your InfluxDB configuration and you should be already aware about the organization and bucket you are using.
[0:03:37] And we are going to keep the rest of the rule here at default levels. There's a lot that is customizable. You could add different tags that will be sent to InfluxDB, you could also send the service date.
[0:03:50] But let's start simple with just the metrics of the service. And we want to apply this rule to all services that we have, there are no exceptions no services that we don't want to send. So, this is fine and we can save the rule here.
[0:04:04] And now we just need to activate the changes to start sending metrics to InfluxDB. So, with this the configuration is done Checkmk-wise. So, let's head over to the InfluxDB and take a look at the data.
[0:04:26] Okay, so now we go to the Explore section here, and there we see our bucket checkmk. Now let's look, for example, for the utilization.
[0:04:36] We want to see the value and you see here, it's all our hosts. So, I'm not going to select anyone here, so we see all the values. And now if I click on Submit, we see there are data points here already.
[0:04:53] And if we wait for a few seconds or let's say, 1 or 2 minutes, then we will see the start of the graph because at this point we only have one metric in here. And if we wait for a few moments, we will have some more.
[0:05:11] So, now you at least can see that we have 2 data points in here and you can see the graph is getting drawn.
[0:05:21] So, that's it for today. You just learned how to send metrics to InfluxDB using the new flux protocol.
[0:05:26] Thanks for watching. Make sure to subscribe and I will see you next time.

Want to know more about Checkmk? Join us for our Introduction to Checkmk Webinar

Register now

More Checkmk Videos