Table of Contents
BTP Application Events Monitor
The BTP Application Events Monitor tracks and alerts on audit events within your SAP BTP Cloud Foundry environment. It allows for granular tracking of application lifecycle changes, security events, and operational actions by communicating with the Cloud Foundry V3 Audit Events API.
Prerequisites
- Network connectivity from the collector to your BTP API endpoints (e.g.,
api.cf.eu10.hana.ondemand.com). - BTP Credentials: A User Profile with at least Space Auditor permissions for the targeted spaces/organizations.
- Endpoints accessed:
/v3/audit_events: To retrieve the stream of events for specific applications, spaces or organizations./v3/apps: To resolve application, space and organization names into GUIDs. - Authentication: OAuth2 Password Grant (handled automatically using the configured User Profile).
API Endpoints used
| Endpoint | Purpose |
|---|---|
| POST /oauth/token | Authentication via UAA (password grant) |
| GET /v3/audit_events | Retrieve audit events with time, type and scope filters |
| GET /v3/apps | Discovery of applications, spaces and organizations |
Key Features
Event Tracking
The monitor captures detailed information for every discovered event:
- Event Type: Lifecycle events (
audit.app.update,audit.app.restage), crashes (audit.app.process.crash), or any other Cloud Foundry audit event. - Actor Details: Identifies who initiated the event. The actor is a user for manual actions, and a process or the application itself for platform events such as crashes.
- Target Info: Maps events to the affected resource, and to its Space and Subdomain.
- Contextual Data: Captures reasons, exit descriptions, and instance IDs where available.
Audit events do not only target applications: service keys, routes, bindings and spaces produce events too. Those are reported with their TARGET_TYPE and TARGET_NAME, and with an empty APP_NAME.
Flexible Filtering
- Event Type Filtering: Monitor specific events (e.g., only
audit.app.process.crash) or use*for everything. - Scope Control: Filter by Application Name, Space, or Subdomain. Values are matched exactly (case-insensitive), or
*for all. Partial wildcards such asmyapp*are not supported. - Temporal Precision: Each cycle collects the events created since the previous run, with a deliberate overlap, and removes the duplicates that overlap produces.
Alarm Capabilities
- Event-Based Alarming: Trigger an alarm immediately when an event matching your criteria is detected.
- Unique Identification: Each alarm is tied to the BTP Event GUID, ensuring multiple events of the same type in one cycle are all reported.
- Configurable Severity: Assign a severity per configuration row.
- Event alarms are never cleared automatically: they report something that happened, not a state that persists.
Metrics
The monitor emits one counter per event type and application for each cycle:
- Metric:
promonitor.btp.cloud_foundry.audit_events.count - Tags:
event_type,app_name,space_name,subdomain_name - Value: the number of matching events collected in that cycle
Only the combinations that actually occurred are sent, a cycle without events sends no metric. This makes it possible to alert on a rate (for example more than three crashes in an hour), which per-event alarms cannot express. It also catches crashes that the BTP Application Stats monitor cannot see: an application that crashes and restarts between two polls never shows a crashed instance, but always produces an audit event.
How It Works
Data Collection Process
- Metadata Sync: At every run the monitor loads the applications, spaces and organizations from
/v3/apps, so that human-readable names can be used in the configuration instead of GUIDs. This list is not kept between runs, it is always current. - Request Generation: For each active row a filtered API request is built using the
created_ats[gt]parameter. Rows filtering on an application usetarget_guids, rows filtering only on a Space or a Subdomain usespace_guidsandorganization_guidsso that the API does the filtering. - Pagination: Events are read 1000 per page, up to 10 pages per row and per cycle. If that limit is ever reached a warning is written in the collector log naming the request.
- Metadata Storage: Discovered events are stored as metadata (visible in the Event Log/Reports). Metadata, Metrics and Alarm are independent: disabling one does not disable the others.
Collection Window
Each cycle collects the events created since the previous successful run, minus a five minute overlap. The overlap is deliberate: the Cloud Foundry documentation states that audit event timestamps come from different Cloud Controller instances and are not guaranteed to be ordered, so a strict window would silently drop late events.
If the monitor has not run for a long time, it looks back at most 60 minutes.
If any request of a cycle fails, the window is not advanced. The events are collected again on the next cycle instead of being lost, and the collector log states that the collection was incomplete.
De-duplication
The overlap above, and several other situations, cause the same event to be read more than once. The monitor reports each event exactly once:
- Crash events: Cloud Foundry emits both
audit.app.process.crashand the legacyapp.crashfor a single crash. Only theaudit.*event is reported, unless the row explicitly asks forapp.crashin its Event Types. - Overlapping rows: an event matched by several rows is reported once, under the first matching row. Rows resolving to exactly the same query are collected only once.
- Between cycles: the GUIDs of the reported events are remembered and re-reported events are discarded.
A Test run does not use this memory: it always shows what the configuration matches, even if the scheduled runs already reported those events. This also means a Test run never marks events as reported.
Configuration
Connection Settings
- Create a Web Service Connector:
- URL: Your BTP API endpoint (e.g., https://api.cf.eu10.hana.ondemand.com).
- Auth Type: Associate with a User Profile containing valid BTP credentials.
Monitor Configuration
Method 1: Load BTP Apps (Recommended)
- Open the monitor configuration.
- Click the “Load BTP Apps” button.
- The table will populate with known applications.
- Specify the Event Types you wish to monitor for those apps (e.g.,
audit.app.process.crash).
Method 2: Global/Wildcard Monitoring
To monitor all events across a whole space or subdomain:
- App Name: Set to
*. - Space / Subdomain: Enter a specific name to filter, or
*for the entire subaccount. - Event Types: Set to
*to see every audit event.
A row filtering on a Space or a Subdomain without an application name reports every audit event of that scope, including the events that do not target an application. Narrow the Event Types on such a row if you enable its Alarm, otherwise every platform event raises one.
Settings Reference
| Field | Description | Default |
|---|---|---|
| Active | Enable/disable this configuration row | true |
| App Name | Exact application name, or * for all | * |
| Space | Exact BTP Space name, or * for all | * |
| Subdomain | Exact BTP Subdomain name, or * for all | * |
| Event Types | Comma-separated list of types (e.g., audit.app.process.crash, audit.app.update), or * for all | * |
| Metadata | Store event details in the database | true |
| Metrics | Send the audit event counter | true |
| Alarm | Enable/disable alarm triggering for discovered events | false |
| Severity | Severity of the alarm (1=Information, 2=Warning, 3=Minor, 4=Major, 5=Critical) | 2 |
| Alarm tag | Custom tag added to the triggered alarm | |
App Name, Space, Subdomain and Event Types are mandatory. A row left empty is a misconfiguration and is skipped, with a warning in the collector log: an empty filter is never treated as *.
Configuration Examples
Example 1: alert on crashes of one application
The most common setup. One row per application, obtained with the “Load BTP Apps” button, narrowed to crash events.
| Field | Value |
|---|---|
| App Name | payment-service |
| Space | production |
| Subdomain | acme-prod |
| Event Types | audit.app.process.crash |
| Metadata | true |
| Metrics | true |
| Alarm | true |
| Severity | 4 (Major) |
What you get, for each crash:
- One alarm:
BTP Event: audit.app.process.crash [App: payment-service][Space: production][Subdomain: acme-prod][Actor: web][Date: 2026-08-14T09:51:02Z] - One metadata row, with
REASON=CRASHEDandEXIT_DESCRIPTIONgiving the exit status (for exampleExited with status 137 (out of memory)) - One metric point:
audit_events.count= 1, taggedevent_type=audit.app.process.crash,app_name=payment-service
Note that Cloud Foundry emits a second, legacy app.crash event for the same crash. It is dropped automatically, so a crash produces one alarm and a count of 1, not two.
The Actor of a crash is web, the application process. Crashes are not user actions, so no user name is reported.
Example 2: full audit trail of a space, without alarms
Useful for compliance or for investigating afterwards, when you want the record but not the noise.
| Field | Value |
|---|---|
| App Name | * |
| Space | production |
| Subdomain | * |
| Event Types | * |
| Metadata | true |
| Metrics | false |
| Alarm | false |
What you get:
- Every audit event of that space, stored as metadata: application lifecycle, but also service keys, routes, bindings and space changes
- For an event that does not target an application,
APP_NAMEis empty and the resource is described byTARGET_TYPEandTARGET_NAME, for exampleTARGET_TYPE=service_key,TARGET_NAME=db-credentials
Metrics are disabled here on purpose: with Event Types set to * a busy space produces a separate counter for each of the many Cloud Foundry event types.
Alarm is disabled for the same reason. Every deployment, restart and binding change of the space would raise one.
Example 3: security-relevant events across the whole subaccount
No scope filter at all, narrowed by event type instead.
| Field | Value |
|---|---|
| App Name | * |
| Space | * |
| Subdomain | * |
| Event Types | audit.service_key.create, audit.service_key.delete, audit.app.environment_variables.show, audit.user.space_developer_add |
| Metadata | true |
| Metrics | true |
| Alarm | true |
| Severity | 3 (Minor) |
What you get:
- Those four event types wherever they happen in the subaccount, whatever the space
- Alarms naming the affected resource rather than an application, for example
BTP Event: audit.service_key.create [Target: service_key db-credentials][Space: production][Subdomain: acme-prod][Actor: alice@example.com][Date: …] - Metric points with an empty
app_nametag, since those events do not target an application
This is the row type where the Actor is most useful: these are user actions, so ACTOR_NAME is the user who performed them.
Collected Data (Metadata)
The monitor stores data under the category: BTP_APP_EVENTS
| Field | Description |
|---|---|
| GUID | Unique identifier of the event in BTP |
| TYPE | The BTP Event type (e.g., audit.app.stop) |
| CREATED_AT | Timestamp of the event in BTP |
| ACTOR_NAME | User, process or application that triggered the event |
| ACTOR_TYPE | user, process, app… |
| TARGET_TYPE | Type of the affected resource (app, service_key, route…) |
| TARGET_NAME | Name of the affected resource |
| APP_NAME | Name of the affected application, empty if the event does not target an application |
| APP_GUID | GUID of the affected application, empty if the event does not target an application |
| SPACE_NAME | BTP Space where the event occurred |
| SUBDOMAIN | BTP Subdomain where the event occurred |
| INSTANCE | Application instance concerned, when applicable |
| REASON | Optional reason provided by the BTP platform |
| EXIT_DESCRIPTION | Exit description provided by the BTP platform, for crashes |
Every field is always present, a field that does not apply to an event is empty.
Troubleshooting
| Issue | Resolution |
|---|---|
| No cache → skipping monitoring | The applications could not be loaded. Check that the Connector URL is reachable and that the User Profile credentials are valid, then use the “Load BTP Apps” action to confirm. |
| Alarms not triggering | Check that the “Alarm” checkbox is ticked for that specific row. If using “Event Types”, ensure the string matches the official BTP audit event type exactly, for example audit.app.process.crash and not audit.app.crash. |
| Missing Events | The monitor fetches events since its last execution. If the monitor was inactive for a long time, it will only look back at the last 60 minutes by default. |
| No application matches row N | The App Name, Space or Subdomain of that row matches no known application. The row is skipped rather than collecting everything. Check the spelling, and remember that only exact names are supported. |
| No space named X / No subdomain named X | That Space or Subdomain is unknown. Only the spaces and organizations owning at least one application are known to the monitor. |
| Events show “Unknown” Space/Subdomain | The space or organization of the event owns no application, so its name could not be resolved. Events of a space containing at least one application always resolve. |
| Collection incomplete, the collection window is kept | One of the API requests failed. The events are not lost, they are collected again on the next cycle. Check the preceding warning in the log for the HTTP status returned by BTP. |
