Die BPC Version 4.1 wird nicht mehr gewartet.

Sollten Sie diese BPC Version nutzen, empfehlen wir Ihnen eine Migration auf eine aktuelle Version. Die Dokumentation zur neusten BPC Version finden Sie hier. Sollten Sie Fragen haben, wenden Sie sich bitte an unseren Support.

Karaf Console Commands for the BPC

Some core functions can be controlled via the Karaf console.

Info

Some information about the BPC installation.

bpc:info

BPC
  Name                        BPC-1
  UUID                        3dfde089-c1a2-48ac-a9a1-b6d9137dd548
OpenSearch
  Version                     2.19.4
  Status                      Connected to [[host=http://localhost:9200]]
OpenSearch Plugin
  Plugin status               ACCESSIBLE
  Websocket status            CONNECTED

Controlling Maintenance Mode

Maintenance mode can be enabled and disabled via the Karaf console. You can also check the current status.

Below are the commands and examples

Enabling maintenance mode

# Keine Nachrichten hinterlegt
bpc:maintenance-mode on

# Mit Nachrichten
bpc:maintenance-mode -m 'some messages' on

Disabling maintenance mode

bpc:maintenance-mode off

Querying the maintenance mode status

bpc:maintenance-mode status

Forcing the local Identity Provider (IdP)

The use of the local Identity Provider can be enabled or disabled via the Karaf console. You can also check the current status.

Below are the commands and examples

Enabling the local IdP

bpc:force-local-idp on

Disabling the local IdP

bpc:force-local-idp off

Checking the status of the local IdP

bpc:force-local-idp status

User Sessions

You can list and delete BPC user sessions via the Karaf console.

Below are the commands and examples

List all user sessions

bpc:sessions-list

Session ID                           │ User     │ Firstname │ Lastname │ Expires
─────────────────────────────────────┼──────────┼───────────┼──────────┼────────────────────────
c403dd65-93da-42c5-a06c-598e6d91d6cd │ bpcadmin │ Timo      │ Virt     │ 2020-10-15 11:42:30.009
a9602f8a-f9b6-49ba-9411-6e16665cf5a3 │ of       │ Oliver    │ Fürniß   │ 2020-10-15 12:44:04.162
dec79e6f-12a5-43a8-82aa-2d5aa5b7548b │ bpcadmin │ Timo      │ Virt     │ 2020-10-15 11:42:50.672

Delete a single user session

bpc:sessions-delete <Session ID>

Delete all user sessions

bpc:sessions-delete-all

Backups / Snapshots

Backups created by the BPC can be listed, deleted, and restored via the Karaf console.

Below are the commands and examples

List backup groups

bpc:backup-list

Indices Group
──────────────────────────
bpc-analysis-queries
bpc-auditlog
bpc-configuration
of-test-child,of-test-main

List backups in a group

bpc:backup-list bpc-configuration

Date                     │ State   │ Name
─────────────────────────┼─────────┼───────────────────────────────────────────
2020-11-05T10:53:21.190Z │ SUCCESS │ snapshot-bpc-configuration-20201105-115321
2020-11-06T12:44:20.585Z │ SUCCESS │ snapshot-bpc-configuration-20201106-134420
2021-02-01T07:15:55.821Z │ SUCCESS │ snapshot-bpc-configuration-20210201-081555
2021-02-02T08:30:45.624Z │ SUCCESS │ snapshot-bpc-configuration-20210202-093045

Delete a backup

bpc:backup-delete snapshot-bpc-configuration-20201105-115321

Restore a backup

 bpc:backup-restore snapshot-bpc-configuration-20210202-093045

Backup Jobs

The BPC periodically performs backups of OpenSearch indices. These backup jobs can also be listed and started manually via the Karaf console.

Below are the commands and examples

Listing backup jobs

bpc:backupjob-list

Backup Job Identifier                             │ Enabled │ State  │ Runs Every    │ Next Check In │ Latest Backup           │ Next Backup             │ Indices
──────────────────────────────────────────────────┼─────────┼────────┼───────────────┼───────────────┼─────────────────────────┼─────────────────────────┼───────────────────────────────────────────────────────────
core:audit-logger                                 │ X       │ active │ 86400 seconds │ 49 seconds    │ 2022-07-26T13:42:47.999 │ 2022-07-27T13:42:47.999 │ [bpc-auditlog]
core:bpc-configuration                            │ X       │ active │ 86400 seconds │ 49 seconds    │ 2022-07-26T13:11:44.932 │ 2022-07-27T13:11:44.932 │ [bpc-configuration]
core:logservice:monitor-test-grid-header-filter   │ -       │ -      │ -             │ 49 seconds    │ <none>                  │ -                       │ [monitor-test-grid-header-filter]
core:logservice:monitor-test-module-jump-column   │ -       │ -      │ -             │ 49 seconds    │ <none>                  │ -                       │ [monitor-test-module-jump-column]
core:storageservice:bpc-store-datalock            │ X       │ active │ 86400 seconds │ 49 seconds    │ 2022-07-26T06:09:34.774 │ 2022-07-27T06:09:34.774 │ [bpc-store-datalock]
core:storageservice:bpc-store-monitor-view-states │ X       │ active │ 86400 seconds │ 49 seconds    │ 2022-07-26T06:09:35.975 │ 2022-07-27T06:09:35.975 │ [bpc-store-monitor-view-states]
core:storageservice:bpc-store-state               │ X       │ active │ 86400 seconds │ 49 seconds    │ 2022-07-26T06:09:35.775 │ 2022-07-27T06:09:35.775 │ [bpc-store-state]
weather                                           │ X       │ active │ 600 seconds   │ 49 seconds    │ 2022-07-26T13:35:35.695 │ 2022-07-26T13:45:35.695 │ [weather-child, weather-parent]

Start a backup job

bpc:backupjob-start <backup job identifier>

Database Connection Pool

Information about the Database Connection Pool (dbcp2) can be retrieved.

Concise list of Database Connection Pool entries

bpc:db-connection-pool-list

Name  │ Active │ Waiters │ Idle │ Max Total │ Borrowed │ Returned │ Mean Borrow Wait Time (ms) │ Max Borrow Wait Time (ms) │ DB URL                                      │ DB Username │ DB Name
──────┼────────┼─────────┼──────┼───────────┼──────────┼──────────┼────────────────────────────┼───────────────────────────┼─────────────────────────────────────────────┼─────────────┼─────────────────────────────────────────
pool3 │ 0      │ 0       │ 5    │ 10        │ 10254    │ 10254    │ 0                          │ 42243                     │ jdbc:oracle:thin:@localhost:1521:XE         │ OLFUERNISS  │ Oracle JDBC driver
pool4 │ 0      │ 0       │ 1    │ 10        │ 4        │ 4        │ 9                          │ 38                        │ jdbc:mysql://127.0.0.1:3306/bpc             │ olfuerniss  │ MariaDB Connector/J
pool5 │ 0      │ 0       │ 1    │ 10        │ 4        │ 4        │ 28                         │ 113                       │ jdbc:postgresql://localhost:5432/postgre... │ postgres    │ PostgreSQL JDBC Driver
pool2 │ 0      │ 0       │ 1    │ 10        │ 802      │ 802      │ 0                          │ 746                       │ jdbc:oracle:thin:@dev03.virtimo.net:1521... │ VPMA_PM     │ Oracle JDBC driver
pool  │ 0      │ 0       │ 1    │ 10        │ 4        │ 4        │ 210                        │ 843                       │ jdbc:sqlserver://dev05.virtimo.net:1433;... │ DEV05_EBIX  │ Microsoft JDBC Driver 7.4 for SQL Server

You can retrieve all available information about the Database Connection Pools using the command bpc:db-connection-pool-list extended.

Copy OpenSearch Index

An index can be copied from one system to another via deployment. The following three commands are available for this purpose.

List of Deployment Destinations

The IDs of the deployment systems are required for the following two commands. The deployment systems are created via the BPC interface as backend Connections of type 'deployment_system'.

bpc:deployment-list-systems

ID            │ Name                         │ Sort Priority
──────────────┼──────────────────────────────┼──────────────
ds_local      │ Local BPC                    │ 100
1632738353151 │ Develop Stage                │ 1000
1644918332765 │ Test Stage                   │ 2000
1644998745328 │ Prod Stage                   │ 2000
@@@JSON@@@    │ [JSON]                       │ 2147483647

Listing the indices of a deployment system

In the following example, 1632738353151 is the ID of the Develop Stage from which the existing indices are to be listed. The index name is then required for the actual copy command.

bpc:deployment-list-indices 1632738353151

Health │ State  │ Index                                 │ Alias                     │ Docs Count │ Docs Count (Lucene) │ Docs Deleted (Lucene)
───────┼────────┼───────────────────────────────────────┼───────────────────────────┼────────────┼─────────────────────┼──────────────────────
close  │ yellow │ bpc-auditlog_1638439270124            │ []                        │            │                     │
open   │ yellow │ bpc-auditlog_1645622599914            │ [bpc-auditlog]            │ 2608       │ 2608                │ 17
open   │ yellow │ bpc-configuration_1638439267666       │ [bpc-configuration]       │ 638        │ 638                 │ 9
open   │ yellow │ bpc-forms_1641883263224               │ [bpc-forms]               │ 0          │ 0                   │ 0
close  │ yellow │ bpc-metrics_1638439285764             │ []                        │            │                     │
open   │ yellow │ bpc-metrics_1645622622387             │ [bpc-metrics]             │ 29325      │ 29325               │ 0
open   │ yellow │ bpc-notification_1638439270752        │ [bpc-notification]        │ 9251       │ 9251                │ 0
open   │ yellow │ bpc-performance_1638530235746         │ [bpc-performance]         │ 10655      │ 10655               │ 240
open   │ yellow │ bpc-replicationjobs-log_1638439266291 │ [bpc-replicationjobs-log] │ 6          │ 6                   │ 0
open   │ yellow │ bpc-store-datalock_1638439266963      │ [bpc-store-datalock]      │ 0          │ 0                   │ 0
open   │ yellow │ units_1631702902240                   │ [units]                   │ 34         │ 0                   │ 0

Copying an Index

In the following example, the index units_1631702902240 is copied from Develop Stage (ID: 1632738353151 ) to Test Stage (ID: 1644918332765 ). If the index already exists on the target system, the operation is aborted and an error message is displayed.

bpc:deployment-copy-index --source 1632738353151 --target 1644918332765 units_1631702902240

OpenSearch

A few administrative actions can be performed on the currently used OpenSearch. The commands and examples are listed below.

List indices

os:list
Health │ State  │ Index                                                 │ Alias                                     │ Shards │ Replicas │ Docs Count │ Docs Count (Lucene) │ Docs Deleted (Lucene) │ Store Size │ Primary Store Size
───────┼────────┼───────────────────────────────────────────────────────┼───────────────────────────────────────────┼────────┼──────────┼────────────┼─────────────────────┼───────────────────────┼────────────┼───────────────────
open   │ green  │ .tasks                                                │ []                                        │ 1      │ 0        │ 25         │ 25                  │ 0                     │ 58,94 KB   │ 58,94 KB
open   │ yellow │ bpc-analysis-queries_1647495911203                    │ [bpc-analysis-queries]                    │ 1      │ 1        │ 0          │ 0                   │ 0                     │ 208 B      │ 208 B
open   │ yellow │ bpc-auditlog_1696930053134                            │ [bpc-auditlog]                            │ 5      │ 1        │ 27647      │ 27647               │ 13                    │ 8,34 MB    │ 8,34 MB
close  │ yellow │ bpc-configuration_1684738165295                       │ []                                        │ 1      │ 1        │            │                     │                       │            │
open   │ yellow │ bpc-configuration_1697110020805                       │ [bpc-configuration]                       │ 10     │ 1        │ 5271       │ 5271                │ 1                     │ 1,59 MB    │ 1,59 MB
...

Delete an index

os:delete <name of index>

View the contents of an index

os:cat <name of index>
ID │ p_processid (long) │ processname (text) │ timestamp (date)
───┼────────────────────┼────────────────────┼────────────────────────────
7  │ 7                  │ Prozess 7          │ 2023-06-13T06:53:53.043545Z
5  │ 5                  │ Prozess 5          │ 2023-06-13T06:06:38.364433Z
2  │ 2                  │ Prozess 2          │ 2023-06-13T05:56:20.782316Z
3  │ 3                  │ Prozess 3          │ 2023-06-13T05:56:29.98964Z
4  │ 4                  │ Prozess 4          │ 2023-06-13T06:06:38.349114Z
8  │ 8                  │ Prozess 8          │ 2023-06-13T06:55:29.956788Z
1  │ 1                  │ Prozess 1          │ 2023-06-13T05:56:09.718081Z
6  │ 6                  │ Prozess 6          │ 2023-06-13T06:06:38.377993Z
...

View an index’s settings and mapping

os:mapping <name of index>
{
  "settings" : {
    "creation_date" : "1695804537997",
    "number_of_shards" : "5",
    "number_of_replicas" : "1",
    ...
  },
  "mappings" : {
    "properties" : {
      "p_processid" : {
        "type" : "long"
      },
      "processname" : {
        "type" : "text",
        "fields" : {
          "lowercase" : {
            "normalizer" : "lowercaseNormalizer",
            "type" : "keyword"
          },
          "raw" : {
            "type" : "keyword"
          }
        }
      },
      "timestamp" : {
        "type" : "date"
      }
    },
    ...
  }
}

Remove all read-only flags

OpenSearch automatically sets indexes to read-only mode when disk space becomes scarce. In this case, all indexes are marked with the read-only flag. The user must manually remove this flag from each index after providing sufficient free disk space. This command removes the read-only flags from all indexes.

os:remove-all-read-only-flags

Keywords: