text stringlengths 0 1.8k |
|---|
[2211.94 --> 2215.46] something Kubernetes clusters. Is it public please? Can you add me to it? |
[2215.46 --> 2220.74] No, unfortunately not. But there's lots of examples we use from it. But yeah, we've got this one |
[2220.74 --> 2226.10] deployment, this one repo, and it's that mono repo approach to config management at least where |
[2226.10 --> 2230.98] mixings really fit nicely because you can use JSON it bundler to package manage them. And then the really |
[2230.98 --> 2235.54] cool thing comes in, you probably kind of got 90% of the way there, but then didn't have the last 10%. |
[2235.54 --> 2243.62] We use JSON it to also manage all of our Kubernetes jobs. So all our pods, stateful sets, config maps, |
[2243.62 --> 2248.18] services, you name it, it's all defined in the same language, in a single language for dashboards, |
[2248.18 --> 2255.62] for alerts, for any files, for config maps, for anything. It makes it really easy for us to deliver |
[2255.62 --> 2262.74] dashboards and alerts encoded as JSON, encoded as YAML inside a config map in the same language that's |
[2262.74 --> 2269.54] then uploaded with a single tool. And the whole process of updating an application and updating its |
[2269.54 --> 2275.38] config and updating its monitoring is a single PR, a single push and a single apply, which is all CD now. |
[2275.38 --> 2280.74] That's where the vision was. That's a bit advanced, right? It's a bit much to ask for most people. And also, |
[2280.74 --> 2285.14] it's a bit opinionated, right? You have to have the complete stack end-to-end bought into the whole thing |
[2285.14 --> 2292.26] to really realize that benefit. And let's face it, like other techniques, right? Customize and |
[2292.26 --> 2298.26] queue are gaining more popularity than JSON it ever did. And so I think the time's passed for that vision |
[2298.26 --> 2302.58] and that way that we're running things. And really, you kind of touched on something really important |
[2302.58 --> 2308.74] here. It was too hard to use. So what we've been doing in Grafana Cloud really for the past year or so, |
[2308.74 --> 2315.22] is trying to make a kind of more opinionated, more integrated, easier to use version of all of that. |
[2315.86 --> 2319.54] You sign up to Grafana Cloud, you deploy the agent, right? And so that's the first bit of |
[2319.54 --> 2323.62] simplification. The Grafana agent embeds, it's all open source, right? It embeds |
[2324.26 --> 2328.66] Prometheus remote write code and scraping code. It embeds Loki's Promptail, it embeds the open |
[2328.66 --> 2334.58] telemetry collector. It also embeds some 10 to 20 different exporters, all in a single binary, |
[2334.58 --> 2338.34] all with a single thing to deploy and a single thing to configure. And it scrapes and gathers |
[2338.34 --> 2343.14] metrics and logs and traces and sends them all to your Grafana Cloud instance. And then within that |
[2343.14 --> 2347.54] instance, we've built a service that it's almost like an app store, right? You can select the |
[2347.54 --> 2351.14] integration you want to install. I want to monitor some MySQL, I want to monitor some Kubernetes, |
[2351.14 --> 2354.82] I want to monitor Docker. And it will install the dashboards and the alerts and it will keep them |
[2354.82 --> 2358.82] up to date for you. And it will connect them through to the integration in the agent. |
[2358.82 --> 2363.46] And behind the scenes, this is all mix-ins, right? This is all JSON it. This is all automation we've |
[2363.46 --> 2368.58] built to make this whole thing easy to use and integrated and opinionated. It's much harder to |
[2368.58 --> 2374.42] do, you know, to do that easy to use story in open source because the opinions change, right? And the |
[2374.42 --> 2379.78] integrations change. But in Cloud where it's a much more controlled environment, we can deliver that |
[2379.78 --> 2386.74] easy to use experience. This just means for people who maybe have seen me talk or seen someone else |
[2386.74 --> 2391.94] talk about Prometheus and talk about Grafana and talk about how easy it is to use and how powerful it is |
[2391.94 --> 2396.02] and how awesome it is and how much value they've got out of it. But maybe, you know, |
[2396.02 --> 2401.38] don't really have the time to jump into the intricacies of JSON it and learn 50 new tools. |
[2401.38 --> 2403.86] We're just trying to make that accessible to that group of people. |
[2403.86 --> 2419.46] This episode is brought to you by our friends at Cockroach Labs, the makers of CockroachDB, |
[2419.94 --> 2425.94] the most highly evolved database on the planet. With CockroachDB, you can scale fast, survive |
[2425.94 --> 2432.50] anything and thrive everywhere. It's open source, Postgres wire compatible and Kubernetes friendly, |
[2432.50 --> 2436.74] which means you can launch and run it anywhere. For those who need more, you can build and scale |
[2436.74 --> 2441.86] fast with Cockroach Cloud, which is CockroachDB hosted as a service. It's the simplest way to |
[2441.86 --> 2447.38] deploy CockroachDB and is available instantly on AWS and Google Cloud. With Cockroach Cloud, |
[2447.38 --> 2453.14] a team of world-class SREs maintains and manages your database infrastructure so you can focus less |
[2453.14 --> 2458.02] on ops and more on code. Get started for free with a 30-day free trial or try their new forever |
[2458.02 --> 2464.26] free tier that's super generous. Head to CockroachLabs.com to learn more. Again, CockroachLabs.com |
[2464.26 --> 2465.78] slash changelog. |
[2474.74 --> 2481.06] As I was saying, we use JSON it bundler, JB. I remember the cube Prometheus operator and the |
[2481.06 --> 2487.54] cube Prometheus stack, which was generated out of that. So we did away with all of that. We used to, |
[2487.54 --> 2494.42] obviously, set up our own Grafana, set up Loki, set up Prometheus. Now all we have is a Grafana |
[2494.42 --> 2500.34] agent, which is really nice. By the way, do you know that docs recommend two Grafana agents? One |
[2500.34 --> 2506.02] to scrape the logs, one to get the metrics. So I figured out how to get a single one, and that was |
[2506.02 --> 2513.78] okay because one can do both. But the thing which I still struggle with is how to get the dashboards |
[2513.78 --> 2518.10] working nicely together. I think that's the most important thing. We have Prometheus. That's the |
[2518.10 --> 2523.86] library that we use in Elixir and Phoenix to get the metrics out. And it's actually on the Grafana |
[2523.86 --> 2530.26] blog as well. So it was featured. Alex Kutmos is working close with the Grafana team. He's also |
[2530.26 --> 2535.38] a friend of changelogs. Very close, a very close friend. We worked together. We even did a couple of |
[2535.38 --> 2541.70] episodes together, even a YouTube stream on how we upgraded Erlang 24 and we were using Grafana |
[2541.70 --> 2544.50] cloud to see the impact of that for changelog.com. Nice. |
[2544.50 --> 2549.46] It was a Friday evening deploy. Prometheus was there. It was a great one. We had great fun. It was a few |
[2549.46 --> 2557.54] weeks back. So in that world, the dashboards, I still feel they are the strongest thing that you, |
[2557.54 --> 2563.54] and the best thing that you have, but also the most difficult one to integrate. Because the Grafana |
[2563.54 --> 2568.26] agent doesn't really handle dashboards, right? It just like gets the logs and the metrics out. |
[2568.26 --> 2574.18] So we're using Prometheus, but it's really clunky because you're building your dashboards in Grafana |
[2574.18 --> 2580.58] cloud. A lot of the time they don't work because the metrics don't show up reasons. And then you |
[2580.58 --> 2586.02] adjust them. Then you have to export them. Then you have to version control them. And then Prometheus |
[2586.02 --> 2591.14] has to be configured to upload them to Grafana cloud. So it's just a bit clunky. So I'm wondering, |
[2591.14 --> 2593.86] how could that be done better? Do you have some ideas? |
[2593.86 --> 2596.90] David Poulos There's some kind of guidelines for |
[2596.90 --> 2601.54] building dashboards in my opinion. First thing, you should always template out the data source, |
[2602.18 --> 2606.58] right? Different Grafana installations will name their data sources, different things. And so a |
[2606.58 --> 2611.30] dashboard imported from one might not necessarily work in another. So I always make sure my data |
[2611.30 --> 2616.58] sources are templated out. Second thing, I always tend to template out the job and the instance labels, |
[2616.58 --> 2620.82] maybe with wildcard selectors. And again, same reason. This means the dashboard can effectively |
[2621.38 --> 2627.86] dynamically discover what jobs you've got with certain metrics. This actually fits a pattern |
[2627.86 --> 2632.98] in Prometheus really nicely where we have this Go build info if you're in Go and Java building for |
[2632.98 --> 2637.70] if you're in Java and so on, where every job exports a metric that tells you the version it was built |
[2637.70 --> 2645.46] with and so on. We call these info level metrics. I tend to add an info metric to every piece of software |
[2645.46 --> 2650.66] right, right. You know, maybe it's Cortex info, right? And then I'll tell the template selector |
[2650.66 --> 2656.18] for any Cortex dashboard to just look for all the unique jobs and instances that export a Cortex build. |
[2656.18 --> 2656.74] Mm-hmm. |
[2656.74 --> 2661.86] Right. And this again, this kind of turns a static dashboard that might have encoded to use a |
[2661.86 --> 2665.94] particular set of labels into a very dynamic dashboard, which allows you to select the job |
[2665.94 --> 2670.26] you want to look at and also means that the chances are when you load it, as long as there's some job |
[2670.26 --> 2674.50] exporting some relevant metrics, it will work. So first things first, template your dashboards. |
[2674.50 --> 2675.14] Right. |
[2675.14 --> 2680.18] Right. Second thing, I'm a big fan of dashboards as code, right? So I actually don't tend to build |
[2680.18 --> 2685.78] my dashboards in Grafana. I tend to build them in my text editor. And I tend to use JSON it, |
[2685.78 --> 2689.70] unfortunately. I tend to use a library called Grafana or there's another one called Grafana |
[2689.70 --> 2693.46] Builder. And if you don't like JSON it, there's a good library called Grafana Lib that helps you |
[2693.46 --> 2698.74] build them in Python. And yeah, I tend to build them there. I tend to version control them from the get-go. |
[2698.74 --> 2704.02] And really I tend to use a much more kind of GitOps style approach. There's a couple of tools you can use to do |
[2704.02 --> 2708.58] this, but the one I've been using more recently is called Grizzly by Malcolm Holmes and it's on the |
[2708.58 --> 2713.38] Grafana GitHub. And you can install that and you can point to a JSON it definition of a dashboard |
[2713.38 --> 2719.06] and it will upload it to Grafana. And generally, you know, I do a kind of dev deploy cycle on my |
[2719.06 --> 2723.06] laptop as I'm developing these dashboards, uploading to Grafana, refreshing, seeing the change. |
[2724.02 --> 2728.90] That way, kind of the definition of the dashboard is already in Git, right? And because I'm version |
[2728.90 --> 2734.90] controlling source code and not a big blob of JSON, the code is much more reviewable and I can create |
[2734.90 --> 2738.66] PRs and have someone else review those PRs and it's meaningful to do that. |
[2738.66 --> 2743.70] That sounds exactly what I would want. I mean, you've described my ideal approach, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.