 So as Zayn mentioned, I'm going to talk to you a little bit about writing your own pixel script and kind of like why you would want to do that and how to write an easy one. So this should be pretty quick. So basically to back up a little bit, pixel scripts are the API for working with data in Pixi. Pixel scripts can be executed by the Pixi platform through the UI, the CLI, and coming soon we're actually going to have an API and client libraries to run pixel scripts. And so pixel comes with a lot of built-in scripts to query the data that we automatically collect in your system. Actually is this text too small? Can people see it? It's probably better if we make it a little bit bigger Natalie. Okay, okay. Is that better? Yep. Okay, cool. So like I just ran PX Script List in the CLI and you can see all the different scripts that are built into Pixi that you can run. You can also use Pixel to actually extend the Pixi platform to query new data that isn't automatically collected but for this tutorial we're just going to focus on querying existing data. So before we get into a custom script, let's run a built-in script really fast. So this is one for HTTP data. We're running it on the particular cluster ID that we're interested in and we're running this PX live command which is basically an interactive CLI. And so we can see here that the CLI is showing the HTTP data that Pixi is automatically collected for me in this format. And if we do a keyboard shortcut we can see the script that actually backs that. And I will go through the syntax in the language a little bit now. So in terms of the use case, like why am I writing a script? So imagine that in your Kubernetes cluster you're really interested in analyzing the volume of traffic coming in and out of each pod. Like the total bytes received by that pod over the network and the total bytes sent by that pod over the network. Because you're interested in knowing if that traffic is spread evenly across pods for your various services. So that's the little mini use case that we're working with today. So the kind of prerequisites I've installed Pixi in my cluster and that is what I'm trying to analyze. So every pixel script basically begins with this line. And I'm going to set the syntax to Python because the pixel language is actually built to be valid Python. And we also built it to follow the Pandas API because we didn't really want to invent a brand new query language. We wanted to build on something that people were already familiar with, already had a community. So that's why we made those decisions. So when I import PX what I'm doing is I'm saying import the module that I can use to query my Pixi data. We'll build up this script over time but the next thing that we'll do is we'll instantiate our first data frame. So data frame is Pixi, Pandas, and also project like Sparks, way of representing tables. And so you can think of it as just like a table with rows and columns. So we'll say df equals px.dataframe and we'll ask specifically for the constats table. So you can look in our docs, the various tables that we have, but I can just tell you that the constats table tracks various statistics about the traffic in and out of your cluster. And we want to give it a start time of one minute ago to now. And we'll actually manipulate this table but I like to build stuff up more incrementally. So let's do our equivalent of a console log or a print line and do px.displaydf. And so what this is going to do is output this table that I've initialized on line three. So if we run that, we're going to do the same px.live command but we're going to do dash f for file and tutorial.pixel which is the file that I have. And we can see that it has worked. I have written a script on the fly but this data is a very low level. It's like a low level time series of connections opening and closing to particular addresses. So we're going to have to do some work to aggregate this information and we're also going to need to make this data in terms of pods because that's the unit that I'm interested in analyzing. So in order to do that, every data frame in Pixi has an attribute called context which you can use to pull out things like the service that the record was collected on, the pod that it was collected on, the host name, basically just pull out important metadata about the data. So we're going to get a pod column by doing df.contextctx and access the pod attribute. Then we mentioned that we actually wanted to aggregate all this data to be one row per pod of the traffic coming in and out in terms of bytes. So what we want to do is do an aggregate in pixel. So we're going to say df equals df.groupby because we want to group by the pod column and we want to aggregate the byte sent. This is our output column and the input to it is the byte sent column and we're going to run px.sum on it which is our function that sums up values and we want to also do bytes received which is basically the same thing and all this stuff is documented in our doc so it's okay if you're not like memorizing the exact syntax right now I'm just trying to kind of walk you through like how you would do this kind of script. So I have my group by, I have my pod, I have my aggregate so let's rerun this one and see if it's closer to what we're looking for. Okay great so what we can see is that for all the pods in my cluster I see the bytes that they've sent out and the bytes that they've received and you know nicely like the language has actually figured out that these are bytes so it's showing me units I can sort and see you know which ones have the most and wow I mean as we might expect elastic is consuming and sending quite a lot of data I'm seeing 7.7 terabytes in there so that might be worth looking into but one more thing that I want to do here is actually pull out the service that these pods are part of so I can make sure I'm looking per service if the traffic is spread evenly so I'm just going to make a couple more edits so just like we pulled out pod let's pull out service and we're going to also group by service as well and since I noticed that there was a problem with elastic potentially like maybe it's normal but I just want to look into it more to see that volume of the traffic let's filter it down to a particular namespace so I'll show you how to do a filter and this will be kind of the last syntax that we cover in this tutorial so we'll say df equals df and in order to do a filter what you do is you just put a boolean expression in brackets here so I could say true for all I hear and it would be about filter but in this case what we're interested in doing is taking the namespace and filtering out the namespace equals the one we're interested in which is plc so I happen to know there's a function in pixel that does pod name to namespace we're going to pass in df.pod and we're going to say equals plc so what this will give us is only pods that um that are from the plc namespace we'll run that okay great so what we can see is that now we have the service and we know that all of these are from the particular plc namespace so we can see for example that for this cloud proxy service um that we have you know 3.4 gigabytes into one pod 2.7 to the other that's probably pretty close but are sent by that pod but then we have maybe double in compared to out so like maybe that's worth looking into but other ones are looking a little bit more even like the api service and so like this is actually a script I can keep around and reuse if I ever want to investigate this type of question in the future um I'll just show you one more thing which is the kind of like portability of these scripts so we're going to go to the pixie ui and we're going to open the scratch pad which is a place you can put a new script and open the editor here and run the script and we can see the same data in the ui that we just saw on the cli so we have a lot of great scripts already but I think that we've really just scratched the surface in terms of what we can do with pixel scripts so we would love to see the scripts that you write and the scripts that you think would be useful to other people in the community so Ishaan after this will be sending out in his email a link to the tutorial for how to push pixel scripts to get hub if you're interested in in doing that and we would love to see your scripts and let me know if you have any questions