Sensor Configuration

A Sensor is a small piece of code that instruments the monitored applications at certain points to extract relevant data. For example, a Sensor can transport tagging information from one host to another when a web service call executes. The AppMon installation includes a set of built-in Knowledge Sensor Packs for a wide set of application servers and frameworks. AppMon maintains these Knowledge Sensor Packs, and you can activate/deactivate them as needed.

Sensor rules

A Sensor rule defines application classes and methods which should be instrumented.

Method Sensor Rules define which methods are instrumented by Java/.NET Sensors and collect PurePath info, related to these methods. They are useful for diagnosing performance issues deeper in the application at the package/namespace, class or method levels. Each Method Sensor Rule is a child of a Class Rule, and can only instrument methods from classes or interfaces, defined by this Class Rule.

Memory Sensor Rules define which classes and interfaces are included to memory monitoring by Java/.NET Sensors, and collect PurePath object allocation information and Selective Memory Dumps.

Function/Method Rules define which functions or methods are instrumented by PHP Sensors. Each Function/Method Sensor Rule is a child of a Path Rules, and can only instrument functions or methods from PHP files, defined by this Path Rule.

AppMon requires a Discovery Run to discover what packages/namespaces, classes and methods are available to instrument. It locates all packages/namespaces of the application. The Method Sensor Rule configuration is used to gather information about specific packages/namespaces, classes and methods. Additionally, AppMon Method Sensor Rules capture specific method arguments and can be very useful in diagnosing issues.

Rule execution order

To create adequate Sensor Groups, it is important to understand the way AppMon evaluates these rules:

Java and .NET rules

  • Sensors are evaluated from the first to the last in their order.
  • For every Sensor, these steps are applied:
    • All Sensor Rules are evaluated top down.
    • The first matching Sensor Rule is applied, whether it is an inclusion or an exclusion.
    • After the first match in a Sensor, the evaluation for this Sensor is stopped.
  • Any global excludes override any includes in all Sensors.

PHP rules

More restrictive rules have the priority over less restrictive rules.

Sensor Groups

Sensor rules are created and stored in Sensor Groups. A Sensor Group can contain only one type of rules (Method or Memory) for a specific technology (Java, .NET, PHP). Once a group is created, those parameters cannot be changed.

Sensor Groups are stored in the System Profile, and are not available for other System Profiles. If a System Profile is exported and then imported to another AppMon Server, all Sensor Groups are moved as well. A new System Profile contains empty Method Sensor Groups for Java, .NET, and PHP.

To create a Sensor Group:

  1. Open the System Profile Preferences dialog box, and select the Sensor item.
  2. In the top-right corner, click the Add Sensor Group icon. The Sensor Group Configuration dialog box appears.
  3. From the Technology list, select your technology: Java, .NET, or PHP.
  4. Java and .NET From the Sensor Type list, select the type of rules this group will contain: Method or Memory. It appears as Category in the Sensor Placement and Sensor Configuration tables of the Agent Groups in the System Profile.
  5. Give a unique, meaningful name for the new group. It appears as Sensor pack in the Sensor Placement and Sensor Configuration tables of the Agent Groups in the System Profile.
  6. Click OK.

You can set rules in two ways:

  • Create Class Rules first, then add Method Rules to them. For Memory Rules groups you only need to specify Class Rules.
  • Use the Class Browser, to add everything at once.

Sensor Rules in a group are prioritized by their order. The matching performs from top to bottom, the first matching rule is the only one applied. To change rule priority, select it, and move to the required position by using the Higher Priority and Lower Priority buttons.

For more information see the following topics:

Overhead

Add only packages/namespaces, classes or methods which are critical in terms of performance to a Sensor Group. Avoid processing too much non-essential information, especially methods that are called frequently, but have very short execution times, as it can lead to increased overhead.

See System Profile - Sensors for additional information on handling Sensor Groups.

Sensor Packs

A Sensor Pack is the same container as a Sensor Group, but it is stored on the AppMon Server, and available for all System Profiles and users of this Server. If you move your System Profile to an another Server, Sensor Packs won't be available there.

You can create a Sensor Pack out of one or several Sensor Rules:

  1. Open the System Profile Preferences dialog box, and select the Sensor item.
  2. Click the tab of the required Sensor group.
  3. Select the rules to be added to the pack.
  4. Right-click and select Create Sensor Pack from the context menu. The Custom Sensor Pack dialog box appears.
  5. Give a unique, meaningful name for the new pack. It appears as Sensor pack in the Sensor Placement and Sensor Configuration tables of the Agent Groups in the System Profile. 1.Specify category for the new pack. It appears as Category in the Sensor Placement and Sensor Configuration tables of the Agent Groups in the System Profile.
  6. Specify a domain for the new Sensor Pack.
  7. If you're going to use these rules only as a Server-wide Sensor Pack, you can automatically remove them from the original Sensor Group. To do so, select the Remove Method or Memory Sensor Rules after Custom Sensor Pack has been created.
  8. Click OK.

Sensor properties

To access the Sensor Properties dialog box, open the System Profile Preferences dialog box and select Agent group > Sensor configuration. Double-click the required sensor. Find the list of configurable sensors at the Sensor properties page.