Monitoring templates are an incredibly powerful feature within Panopta. They enable you to scale your monitoring in a cohesive and consistent way. Taking templates a step further with pattern matching allows your monitoring strategy to scale in an automated fashion
Let's say you want to monitor every network interface that starts with "eth" across every server . In the past, this would be very time consuming. With pattern matching, however, you can create a single interface-related check on a template - say Bandwidth In - and use "eth*" for wildcard pattern matching. Now, every time you apply this template to a server, it will add a metric for every interface that starts with "eth" on the server. Even better, you can have this matching be performed every time meta-data discovery is performed. If new resources are discovered that match your pattern, metrics will be created for them automatically.
Let's see how this works, step by step.
- Create a new template
- On the newly created template's detail page, add the Linux monitoring category by clicking "Monitoring" and then "Add" on the Linux card.
- On the newly added Linux category card (in the same modal), click Configure Metrics
- With the Linux metrics pane now open, click "Add +" for Kilobytes IN for the month.
- By default, "Pattern Match" is selected. This means whatever string you enter will be evaluated against that particular metric's resource options - in this case, network interfaces. If you wanted to always add every discovered network interface that starts with eth, you would merely add eth in the pattern match input. Let's do that. Go ahead and put eth in the input and save it.
Now your template has a single metric on it. You'll notice in the monitoring table, the metric that you just added has the pattern matching rule next to its name as a friendly reminder.
Now, let's apply this template to some servers.
- At the top of the template page, click the dropdown arrow attached to the edit button.
- Select Apply by Server
- Select any number of servers that you'd like to apply this template to (they need to be servers with the agent running, for this particular use case).
- Bonus: at the bottom, you'll notice an option to continually apply this template. That means every time meta-data discovery is performed by the server agent (once an hour), these template rules will be re-evaluated and any matches will result in newly created metrics.
- Apply the template
Now if you visit any of the servers you applied the template to, you'll see a metric has been created for every network interface which the Panopta agent had previously discovered on the given server.