Template Pattern Matching

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

A brief example

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.

Try it yourself

Let's see how this works, step by step.

  1. Create a new template
  2. On the newly created template's detail page, add the Linux monitoring category by clicking "Monitoring" and then "Add" on the Linux card.
  3. On the newly added Linux category card (in the same modal), click Configure Metrics
  4. With the Linux metrics pane now open, click "Add +" for Kilobytes IN for the month.
  5. 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.

  1. At the top of the template page, click the dropdown arrow attached to the edit button.
  2. Select Apply by Server
  3. 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).
  4. 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.
  5. 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.