Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

A technical walk-through of how the PerformanceGuard backend server works.
Backend Server Telnet Interface
The backend service exposes a Telnet interface. By default the Telnet server runs on port 4005, but the port number may be changed using the telnetPort parameter.
In order to log in to the backend service Telnet interface you need to supply the name and password of the PerformanceGuard administrator. By default this is

  1. User name: admin
  2. Password: admin

<span style="color: #404040">The following is a snapshot of a Telnet session, with the built-in command overview:</span>
PerformanceGuard Backend Server login: adminpassword: ***** >help Commands:  conf                 - Shows server configuration  exit | quit          - Exits this admin session  help                 - Shows this message  history              - Shows history of commands  jobs [cancel|start]  - Lists/cancels/starts database aggregate jobs  log [level] [regexp] - Shows server log, where level is INFO,FINE or FINEST                           (level must be at least what is in logging.properties)  refresh              - Refreshes configuration/filters  select ...           - Executes database request  shutdown             - Shuts down the server  stat [code]          - Shows server statistics       recv            - Shows receivers       alarms          - Shows number of alarms       sent            - Shows number of sent notifications       fail            - Shows number of failed notifications       data secs       - Shows data counters  test                 - Send test notification e-mail to default receiver  test name            - Send test notification e-mail to named receiver  status               - Shows database & time status  version              - Shows server version  dump [variable]      - Dump internal data        cache          - Dump internal cache        server         - Dump server        connections    - Dump ConnectionPool and the corresponding thread information  ![number]            - Re-executes the command 'number'  ee                   - List the Id and filter running in the eventengine.        list           - List the running filters in the event engine and their id number.        list [number]  - Dump the state of a specific filter/container with the 'number'        count          - list the number of events sendt around in the event engine.        pool           - list the thread pool data.        dispatch       - list the event receivers subscribing to event types from the dispatcher.        tick           - list the number of event send from the TimeTickDispatcher and the latest send time.        info           - list the event statistic from on the event dispatcher.        info [num]     - list the count of the different events going through event dispatcher.        dump [number]  - Dump the state of a specific filter/container with the 'number'        path [number   - Output the information path to a given event receiver/container with the 'number'        notify [number]- Triggers a event container to send a event notification.        conf [number]  - Output the configuration of the elements of the event path.        test           - List the test available to run on the event engine.        test [number]  - Run the test.        clean [number] - Removes the stored data in a filter/container.        diff timestamp - Calculates difference to currenttime.>
<ac:structured-macro ac:name="anchor" ac:schema-version="1" ac:macro-id="9ca09519-a87a-4407-838b-7fffca1a35b7"><ac:parameter ac:name="">concept367</ac:parameter></ac:structured-macro><span style="color: #404040">Event Engine Configuration</span>
<span style="color: #404040">The configuration of the event engine is used to set up the event engine and create the event paths from the event dispatcher to the event containers.</span>
<span style="color: #404040">The configuration of the event engine is placed in the db table <strong>event_containers_config_param</strong>.</span>
<span style="color: #404040">The table contains two rows. A Key row and a Value row. Both are String type.</span>
<span style="color: #003366"><strong>Key Structure</strong></span>
<span style="color: #404040">The key is a string to make it easy to read. The key is structured to in levels bisected by ".".</span>
<span style="color: #404040">So, a key like this "AllFrontendsOffline.1.SeverityType" should be read:</span>

Level

Key Component

Description

Level 1

AllFrontendsOffline

Name of the event path. Every component in a event path starts with this name.

Level 2

1

Object number 1 in the event path. Used to link information flow from component to component.

Level 3

SeverityType

Key name that's looked for by the code when initializing the component.

Level #

 

Can be used if the key has more levels.


Information Read Direction
The reading of the configuration information in the database takes place in a fixed direction determined by information need, starting with the 'general' key it traverses the configuration.

Key

Description

General.#

Contains all the basic information used to set up the event engine. Including the list of event path.

'EventparthKey'.#

General information used in setup of a event path.


'EventparthKey'.'UnitId'Specific.# information needed when initializing a specific event path unit.
Example:
The example is only to show the read direction. Is not a full event path.

Step

Key

Value

Description

1

General.EventEngineOn

True

Should the event engine be turned on?

2

General.FilterPath.1

ServerConnectionAlarming

A event path key name. To be used to search the configuration for the event path with same key name.

3

General.FilterPath.1.On

True

Should the event path be enabled?

4

ServerConnectionAlarming.Name

Possible Malware Alert.

External Name to be used by the event container and filter elements.

5

ServerConnectionAlarming.Units.1

ValueListEventContainer

Defining the first unit to be of the type 'ValueListEventContainer'

6

ServerConnectionAlarming.1.

20

First value to be read by the ValueListEventContainer is its Container ID. For a given read the key name is the last part of the key and is what the code is looking for at that specific.


For a given read the key name is the last part of the key and is what the code is looking for at that specific point in the configuration read.
List of #
In various places in the configuration it's necessary to define multiple values for the same base key. When this is the case, a "key.number" is used to distinguish between the different keys.
This is used when the code can receive multiple inputs, for example multiple receivers for events.
At present the only usage for the list feature is:

Key

Description

General.FilterPath.(FilterparthId)

List of the different event paths.

EventParthName.Unit.(UnitId)

List of the units in a given event path.

EventParthName.UnitId.Destination.(destinationId)

List of destinations a unit should send
the event to.

EventParthName.UnitId.DrillDownChartUrl.(DrillDownChartUrlId)

List the inputs to be shown in a graph in the console.


It isn't necessary for the numbers to start from 1 or be incremental or continuous.
Recursive Value Read
The way a key is read is reverse recursive. Starting by looking for the key name in the current key path position.
The last part of the key is the key name, and the first is the key path.

  1. If the key name is not percent on a given key path level the code try to find the key name a level higher.
  2. If reaching the highest event path level "EventParthName" and still not finding the key name, it tries the key path "General".
  3. If still not finding the key the code, it either:
    1. Doesn't enable the feature
    2. Inserts a default value
    3. Throws an exception.

This is done to reduce the need for multiple keys containing the same value for multiple units in a event path, while we still have the option to define the key name directly on a given key path.
Example:

  1. FrontendsOnline.1.DBStoreTime
  2. FrontendsOnline.DBStoreTime
  3. General.DBStoreTime

The key name "DBStoreTime" is used by the event containers as a unit under an event path, but because all the event containers at this point in time use the same store time, there is no need to write the key name other places than in General.
Key Description
Some of the values are very code-specific and not very easy to read without access to the "common.EventTypes.java" file.
General

Key

Description

Value

General.Id

Version ID. Changes every time the event engine page is updated. new number will trigger a restart of the event engine.

(incrementing number)

General.ContainerStoreTime

The time a container should store data before the time out.

900000 (15 min in
milliseconds)

General.DBStoreTime

The time data should be stored in the database for historic retrieve.

1209600000 (2 weeks in
millisecond)

General.DbKeepNumber

The number of inserts to keep in the db (not distinct lines) for each event container.

1000

General.UseTimeWindow

Default key to all the elements using a calculation window.

true

General.TimeWindow

Default timespan to be used by the elements using a calculation window. value can be milliseconds or [Report*]#, delivery*#, or


 

18000 (3 min in
milliseconds)

General.EventEngineOn

Use the new configuration fed event engine.

true

General.NotificationWaitTime

The wait time between the event engine sends the compiled notifications to the rest interface.

15000 (15 sec)

General.NotificationSendTrigSeverity

The severity level of a notification needs to bypass the wait time constraint. (also sends the other notifications)

3 (Error level)

General.FilterPath.1

Event path (1)

ServerConnectionAlarming

General.FilterPath.1.On

Is event path (1) enabled

true


Event Path
Event path units.

Key

Description

Dafault

AllFrontendsOffline.GroupingType

The type of grouping ID used/accepted by the event part elements.

8 (group by location on almost all the event path)

AllFrontendsOffline.Name

The Name Usd as base for all the event path elements names.

All Frontend Servers are Offline. (Name can be any string)

AllFrontendsOffline.TimeWindow

The elements in this eventpath is using another TimeWindow period.

Delivery*2 (delivery interval * 2)

AllFrontendsOffline.Units.1

1 unit in the event path. The event containers should be first.

EmptyListEventContainer

AllFrontendsOffline.Units.2

2 unit in the event path.

ChangeEventTypeFilter

AllFrontendsOffline.Units.3

3 unit in the event path.

MissingEventFilter

AllFrontendsOffline.Units.4

4 unit in the event path. Defines the subscription to the event dispatcher.

Subscribe ( more than one Subscribe can exist in the same event path)

AllFrontendsOffline.4.Destination.1

Define the destination unit for the output.

3 ( Points to unit 3 in the event path )

AllFrontendsOffline.4.EventType.1

Defines the event type to subscribe to.

17 ( event type EVENT_TYPE_FRONTEND_ONLINE)


Event Container
The event container receives the events from the filters or directly from the event dispatcher basic input. It stores the current state for a given interval or until changed by new events.
If any changes occurs in the event container, it saves the new state to the database.
When receiving events, the event container keeps the event for a time and thereby keeps a record of the state. If the state changes (not just update) the event container writes its new state to the database.
Event Container Parameters
Event path is removed to save space.

Key

Description

Default

Name

Name of the event Container.

No default

EventContainerId

The ER ID the event container have on the rest interface.

2 (unique for every event

Description

Description to be shown on the rest interface.

text (can contain (#1) for

NotifyOnUpdate

If the event container should notify the console on data update.

true

SeverityType

The severity type of the event container and its events.

3 (warning)

ValueUnit

The unit to put behind the event values (if any).

Empty string

IdentType

The type of data delivered by the event container. AM,AT

AT (agent)

DBStoreTime

The maximum amount of time (in milliseconds) that a state is kept in the database.

1209600000 (equivalent to 15 days)

DbKeepNumber

Limits the number of states saved in the database in order to prevent flooding of the database.

1000


Event Container Optional Parameters

Key

Description

Example

ValueUnit

The unit shown after values.

millisecond, %, Agents

IdentType

The type of object the data in the event containers.

Agent data, frontend data

SubscriptionLockOff

Disable the default lock for input.

Used when an event path always should deliver data.

EventTemplate

Set the template for the event text written in the db. Used to combine complex event descriptions.

"Frontend FD(#3)." (insert event text from filter 3)

DrillDownUrl

Link to the rest where more data it to be found.

/rest/agents/AT#/metrics/utilization-index-all

DrillDownDataType

The type of data to be expected from the drill down URL.

(5) list of data, (1)graph, (7)bar-chart

DrillDownChartUrl.#

Link to the rest where graph data it to be found. Can be more than one.

/rest/agents/AT#/metrics/startup-time

ChartType

The type of chart to use with the drill down graph URL.

(5) list of data, (1)graph, (7)bar-chart

Period

The default time period to show in the graph in milliseconds.

3600000 (an hour)

TrigValue

A value to be used when showing the trigger time, if any.

10000 (startup time in milli), 51( process usage in %)


Filters
The event filters are the building blocks of the event containers that shape/calculate on the data flowing into the event engine.
The input parameters vary a lot from filter to filter.
ActivEventFilter
The filter's function is to change single events into a state.
The filter keeps a record of all the events it receives, sending out one event when receiving an unknown event and storing the event in an internal list.
Subsequent events received with the same ID won't trigger an event, but the internal time stamp of the event will be updated.
If the time stamp of an event is older than the allowed time window, the filter deletes the event and sends a remove event with id event.
This has two benefits:

  1. It limits the number of events entering the EventContainer and being written into the database
  2. it gives a clear definition of No/Off

Parameters:

Parameter

Description

Name

Name of the filter.

GroupingType

ID to limit the events entering the filter to a specific grouping type.

UseTimeWindow

Must be true here.

TimeWindow

The period of time from now defining the events as active.


ActivityCountFilter
The filter counts the incoming events for a given period of time and delivers a value event containing the number of events received.
The filter keeps a record of all the events it receives updating the time stamp for every new event with same ID. If an event becomes to old, it's removed by the filter. Once every TimeWindow period it counts the number of events in the internal list. If the number of distinct events in a specific grouping is over a trigger value, the filter send out one value event per grouping containing the number of events in each grouping.
Used by the "Agents online" filter path.
Parameters:

Parameter

Description

Name

Name of the filter.

GroupingType

ID to limit the events entering the filter to a specific grouping type.

TimeWindow

The period of time from now defining the events as active and countable.

TrigValue

The number of events received by the filter needed to trigger a event sending.


ChangeEventTypeFilter
The change event filter changes the event type ID from one to another. The event is not affected in any other way.
If the incoming event's type is not in the filters internal type list, the event will be discarded. The filter can be loaded with multiple event type sets to facilitate many changes (there is no destination differentiation).
Parameters:

Parameter

Description

Name

Name of the filter.

InputEventType

The type ID of the event to be type changed

OutputEventType

The new event type ID to be inserted in the event.


GroupByFilter
The filter function is to give an event a grouping value based on the ID of the event and the selected grouping type (normally the event ID is the Agent ID) .
The filter has an internal map linking the agent ID to different groupings (location, CPU type, OS type, ...).
So defining the grouping type as OS will give the event the grouping value of the agent OS (for example Win7).
Parameters:

Parameter

Description

Name

Name of the filter.

GroupingType

ID that defines what grouping type the groupBy filter should lookup in to the grouping value.


MissingEventFilter
The missing event filter function is to keep a list of the events received sorted by grouping. If a grouping becomes empty all of a sudden it should send a event with all the agents in that group.
Inserting new events into a internal list. Updating the time stamp when receiving events with same ID. Once every time window it cleans the lists. If an event's time stamp is too old, the filter removes the event from the internal list.
If the number of events in a grouping goes from (user defined value) to zero in one time window, the filter sends an event containing all the events that timed out.
Filter sets the grouping as EMPTY internal.
If the filter receives an event matching the (EMPTY) grouping, a grouping online again event is sent and the EMPTY flag is removed.
Parameters:

Parameter

Description

Name

Name of the filter.

GroupingType

ID that defines what grouping type the groupBy filter should lookup in to the grouping value.

MinMissing

The minimum number of events, needed in a grouping before it goes empty, to send an event.

UseTimeWindow

Must be true here.

TimeWindow

The period of time the events is considered active.


ValueEventFilter
The value filter received value events and based on the event value and a preset trigger value it sends a value event when the value is surpassed.
When surpassed it can either send an event every time or only once per event if only sending when the state changes.
Parameters:

Parameter

Description

Name

Name of the filter.

GroupingType

ID that defines what grouping type the groupBy filter should lookup in to the grouping value.

UseTimeWindow

Can be true of false.

TimeWindow

Time window is used here to limit the number of events entering the filter based on event time stamp.

CalcType

(0) value must be higher or equal than trigger value (1) value must be under or equal than trigger value.

TrigValue

the value to compare the events value with.

StateFirm

If true an event is only send ones for every time it state changes. Else its is every time trigger value is surpassed.


Complex Parameters
Some of the values in the configuration are complex. They are described in more detail here.
TimeWindow Value Types
TimeWindow can have the following values:

  1. Any integer
  2. Delivery*[the number of delivery intervals]

  3. Report*[the number of delivery intervals]

  4. Description.Parameter.#

A parameter can have the following values

  1. a string value
  2. key reference to another value on the same level ( Frontend.TrigValue )

Order of Event Path Elements.
When setting up a new event path, it's important to include the elements in the reverse order of the event flow.
To link an event part element as receiver to a event stream, it must already be present in the system.
Grouping Types

Grouping ID

Grouping Type

-2

GROUPING_TYPE_GROUP_INFO

-1

GROUPING_TYPE_NON

0

GROUPING_TYPE_ALL

1

GROUPING_TYPE_CONFIGURATION

2

GROUPING_TYPE_CPU

3

GROUPING_TYPE_NUM_PROCESS

4

GROUPING_TYPE_OS

5

GROUPING_TYPE_LOCATION

6

GROUPING_TYPE_MEMORY

7

GROUPING_TYPE_AGENT_VERSION

8

GROUPING_TYPE_FRONTEND

9

GROUPING_TYPE_AGENT_GROUP


Number of Events in Queue
If your PerformanceGuard system generates excessive amounts of events, it may in turn generate large amounts of spool files that contain data waiting to be processed by PerformanceGuard. That may slow the PerformanceGuard system down, and have the unwanted effect that events are not processed by PerformanceGuard until some time after they have occurred.
If this is a problem, you can solve it by:

  1. Changing your event management configuration so that fewer events are generated, for example by changing some of the thresholds used.
  2. Using more powerful equipment for running PerformanceGuard.
  3. Increasing the number of events that PerformanceGuard is able to queue. If you choose to increase the number, this is how you do it:
    1. Open SQL Server Management Studio and connect to the server that runs the PerformanceGuard backend server
    2. Expand the database pguard, and then open the table pguard.config_params
    3. Increase the value of the parameter maximum.nr.events.in.eventqueue.berfore.busy so that more than the default 100000 events can be queued

Search this documentation

On this page

In this section

  • No labels