sap-btp-cloud-logging
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSAP BTP Cloud Logging Skill
SAP BTP Cloud Logging 技能
Related Skills
相关技能
- sap-btp-cloud-platform: Use for BTP subaccount setup, entitlements, and runtime context
- sap-btp-cloud-identity-services: Use for SAML/IAS authentication and trust configuration
- sap-btp-developer-guide: Use for application observability patterns across CAP and BTP apps
- sap-btp-best-practices: Use for production monitoring and operations governance
- sap-btp-cloud-platform:用于BTP子账户设置、权限分配和运行时上下文配置
- sap-btp-cloud-identity-services:用于SAML/IAS认证和信任配置
- sap-btp-developer-guide:用于CAP和BTP应用的应用可观测性模式
- sap-btp-best-practices:用于生产环境监控和运维治理
When to Use This Skill
适用场景
Use this skill when creating Cloud Logging instances, choosing service plans, configuring Cloud Foundry/Kyma/OpenTelemetry/JSON ingestion, rotating certificates, setting up OpenSearch dashboards, enabling SAML, or troubleshooting missing logs, metrics, traces, or alerts.
当你需要创建Cloud Logging实例、选择服务套餐、配置Cloud Foundry/Kyma/OpenTelemetry/JSON采集方式、轮换证书、设置OpenSearch Dashboards、启用SAML认证,或排查日志、指标、链路追踪或告警缺失等问题时,使用本技能。
Table of Contents
目录
Service Overview
服务概述
SAP Cloud Logging is an instance-based observability service built on OpenSearch that stores, visualizes, and analyzes application logs, metrics, and traces from SAP BTP Cloud Foundry, Kyma, Kubernetes, and other runtime environments.
Key Capabilities:
- Ingest logs, metrics, and traces via OpenTelemetry (OTLP) or JSON API
- Ingest application and request logs from Cloud Foundry runtime
- Configure data retention (1-90 days)
- Visualize and analyze data in OpenSearch Dashboards
- Create custom dashboards and alerts
- SAML authentication via SAP Identity Authentication Service
SAP Cloud Logging是基于OpenSearch构建的实例化可观测性服务,用于存储、可视化和分析来自SAP BTP Cloud Foundry、Kyma、Kubernetes及其他运行时环境的应用日志、指标和链路追踪数据。
核心能力:
- 通过OpenTelemetry (OTLP)或JSON API采集日志、指标和链路追踪数据
- 采集Cloud Foundry运行时的应用日志和请求日志
- 配置数据保留周期(1-90天)
- 在OpenSearch Dashboards中可视化和分析数据
- 创建自定义仪表盘和告警
- 通过SAP Identity Authentication Service实现SAML认证
Service Plans
服务套餐
| Plan | Capacity | Use Case | Auto-Scaling |
|---|---|---|---|
| dev | 7.5 GB fixed | Evaluation only | No |
| standard | 75 GB - 375 GB | Production (100 logs/sec) | Yes |
| large | 750 GB - 3.75 TB | Production (1000 logs/sec) | Yes |
Important: Plan updates are not supported. Migration requires running instances in parallel.
| 套餐 | 容量 | 适用场景 | Auto-Scaling |
|---|---|---|---|
| dev | 固定7.5 GB | 仅用于评估 | 否 |
| standard | 75 GB - 375 GB | 生产环境(100条日志/秒) | 是 |
| large | 750 GB - 3.75 TB | 生产环境(1000条日志/秒) | 是 |
重要提示: 不支持套餐升级。如需迁移,需并行运行新旧实例。
Quick Start
快速开始
Prerequisites
前置条件
- SAP BTP Global Account
- Subaccount with Cloud Logging entitlement
- (Recommended) SAP Cloud Identity Services tenant for SAML authentication
Note for SAP Build Code Users: If using SAP Build Code, follow the SAP Build Code Initial Setup instructions instead. Cloud Logging in SAP Build Code is available for evaluation purposes only.
- SAP BTP全球账户
- 拥有Cloud Logging权限的子账户
- (推荐)用于SAML认证的SAP Cloud Identity Services租户
SAP Build Code用户注意事项: 若使用SAP Build Code,请遵循SAP Build Code初始设置说明。SAP Build Code中的Cloud Logging仅用于评估目的。
Instance Creation Options
实例创建选项
Choose one method based on your workflow:
Option 1: SAP BTP Cockpit (UI)
- Navigate to Subaccount → Instances and Subscriptions → Create
- Select service and plan
cloud-logging - Configure parameters (see Configuration section)
- Create service key for credentials
Option 2: Cloud Foundry CLI
bash
cf create-service cloud-logging standard my-cls-instance -c '{
"retention_period": 14,
"backend": { "max_data_nodes": 10 },
"ingest": { "max_instances": 10 }
}'根据你的工作流选择以下一种方式:
选项1:SAP BTP Cockpit(UI界面)
- 导航至子账户 → 实例与订阅 → 创建
- 选择服务及对应套餐
cloud-logging - 配置参数(详见配置章节)
- 创建服务密钥以获取凭证
选项2:Cloud Foundry CLI
bash
cf create-service cloud-logging standard my-cls-instance -c '{
"retention_period": 14,
"backend": { "max_data_nodes": 10 },
"ingest": { "max_instances": 10 }
}'Wait for provisioning
等待实例创建完成
cf services # Check "last operation" status
cf services # 查看"last operation"状态
Create service key
创建服务密钥
cf create-service-key my-cls-instance my-cls-key
cf service-key my-cls-instance my-cls-key
**Option 3: SAP BTP CLI**
```bash
btp create services/instance \
--subaccount <SUBACCOUNT_ID> \
--name my-cls-instance \
--offering-name "cloud-logging" \
--plan-name standard \
--parameters '{"retention_period": 14}'cf create-service-key my-cls-instance my-cls-key
cf service-key my-cls-instance my-cls-key
**选项3:SAP BTP CLI**
```bash
btp create services/instance \
--subaccount <SUBACCOUNT_ID> \
--name my-cls-instance \
--offering-name "cloud-logging" \
--plan-name standard \
--parameters '{"retention_period": 14}'Create binding
创建绑定
btp create services/binding
--subaccount <SUBACCOUNT_ID>
--name my-cls-binding
--instance-name my-cls-instance
--subaccount <SUBACCOUNT_ID>
--name my-cls-binding
--instance-name my-cls-instance
btp create services/binding
--subaccount <SUBACCOUNT_ID>
--name my-cls-binding
--instance-name my-cls-instance
--subaccount <SUBACCOUNT_ID>
--name my-cls-binding
--instance-name my-cls-instance
Get credentials
获取凭证
btp get services/binding --name my-cls-binding --subaccount <SUBACCOUNT_ID>
**Option 4: SAP BTP Service Operator (Kubernetes/Kyma)**
```yaml
apiVersion: services.cloud.sap.com/v1
kind: ServiceInstance
metadata:
name: cloud-logging-instance
namespace: sap-cloud-logging-integration
spec:
serviceOfferingName: cloud-logging
servicePlanName: standard
parameters:
retentionPeriod: 14
---
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
name: cls-binding
namespace: sap-cloud-logging-integration
spec:
serviceInstanceName: cloud-logging-instance
secretName: sap-cloud-loggingbtp get services/binding --name my-cls-binding --subaccount <SUBACCOUNT_ID>
**选项4:SAP BTP Service Operator(Kubernetes/Kyma)**
```yaml
apiVersion: services.cloud.sap.com/v1
kind: ServiceInstance
metadata:
name: cloud-logging-instance
namespace: sap-cloud-logging-integration
spec:
serviceOfferingName: cloud-logging
servicePlanName: standard
parameters:
retentionPeriod: 14
---
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
name: cls-binding
namespace: sap-cloud-logging-integration
spec:
serviceInstanceName: cloud-logging-instance
secretName: sap-cloud-loggingConfiguration Parameters
配置参数
| Parameter | Type | Default | Description |
|---|---|---|---|
| int | 7 | Data retention in days (1-90) |
| int | 10 | Max OpenSearch data nodes (2-10) |
| string | - | Dashboard identifier (max 20 chars) |
| int | 10 | Max ingest instances for autoscaling (2-10) |
| int | 2 | Min ingest instances (2-10) |
| bool | false | Enable OpenTelemetry Protocol ingestion |
| array | [] | Experimental features (e.g., |
| bool | false | Trigger CA certificate rotation |
| object | - | SAML authentication configuration |
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| int | 7 | 数据保留天数(1-90) |
| int | 10 | OpenSearch数据节点最大数量(2-10) |
| string | - | 仪表盘标识符(最多20个字符) |
| int | 10 | 采集实例自动扩容上限(2-10) |
| int | 2 | 采集实例最小数量(2-10) |
| bool | false | 启用OpenTelemetry Protocol采集 |
| array | [] | 实验性功能(例如 |
| bool | false | 触发CA证书轮换 |
| object | - | SAML认证配置 |
Full Configuration Example
完整配置示例
json
{
"retention_period": 14,
"feature_flags": ["upgradeToOpenSearchV2"],
"dashboards": {
"custom_label": "PROD-CLS"
},
"backend": {
"max_data_nodes": 10
},
"ingest": {
"max_instances": 10,
"min_instances": 2
},
"ingest_otlp": {
"enabled": true
},
"saml": {
"enabled": true,
"initiated": true,
"admin_group": "CLS-Admins",
"roles_key": "groups",
"idp": {
"metadata_url": "https://<tenant>.accounts.ondemand.com/saml2/metadata",
"entity_id": "https://<tenant>.accounts.ondemand.com"
},
"sp": {
"entity_id": "cloud-logging-<instance-id>"
}
}
}json
{
"retention_period": 14,
"feature_flags": ["upgradeToOpenSearchV2"],
"dashboards": {
"custom_label": "PROD-CLS"
},
"backend": {
"max_data_nodes": 10
},
"ingest": {
"max_instances": 10,
"min_instances": 2
},
"ingest_otlp": {
"enabled": true
},
"saml": {
"enabled": true,
"initiated": true,
"admin_group": "CLS-Admins",
"roles_key": "groups",
"idp": {
"metadata_url": "https://<tenant>.accounts.ondemand.com/saml2/metadata",
"entity_id": "https://<tenant>.accounts.ondemand.com"
},
"sp": {
"entity_id": "cloud-logging-<instance-id>"
}
}
}Data Ingestion Methods
数据采集方式
1. Cloud Foundry Runtime
1. Cloud Foundry运行时
Bind applications directly to the Cloud Logging instance:
bash
cf bind-service <app-name> <cls-instance>Index Patterns:
- - Application logs
logs-cfsyslog-* - - Resource metrics
metrics-otel-v1-*
For user-provided services with mTLS, see .
references/cf-ingestion.md将应用直接绑定到Cloud Logging实例:
bash
cf bind-service <app-name> <cls-instance>索引模式:
- - 应用日志
logs-cfsyslog-* - - 资源指标
metrics-otel-v1-*
如需了解使用mTLS的用户提供服务,请查看。
references/cf-ingestion.md2. Kyma Runtime
2. Kyma运行时
Requires and modules enabled:
telemetrybtp-operatorbash
undefined需要启用和模块:
telemetrybtp-operatorbash
undefinedCreate namespace
创建命名空间
kubectl create namespace sap-cloud-logging-integration
kubectl create namespace sap-cloud-logging-integration
Deploy ServiceInstance and ServiceBinding (see templates above)
部署ServiceInstance和ServiceBinding(详见上方模板)
kubectl apply -n sap-cloud-logging-integration -f cls-instance.yaml
**Index Patterns:**
- `logs-json-istio-envoy-kyma*` - Istio access logs
- `logs-json-kyma*` - Application logskubectl apply -n sap-cloud-logging-integration -f cls-instance.yaml
**索引模式:**
- `logs-json-istio-envoy-kyma*` - Istio访问日志
- `logs-json-kyma*` - 应用日志3. OpenTelemetry API (OTLP)
3. OpenTelemetry API (OTLP)
Enable with , then configure your application:
ingest_otlp.enabled: trueService Key Credentials:
- - gRPC endpoint (hostname:443)
ingest-otlp-endpoint - - Client certificate (PEM)
ingest-otlp-cert - - Private key (PKCS#8)
ingest-otlp-key - - Server CA certificate
server-ca
Index Patterns:
- - Logs
logs-otel-v1-* - - Metrics
metrics-otel-v1-* - - Traces
otel-v1-apm-span-* - - Service map
otel-v1-apm-service-map
Note: Only gRPC protocol supported. Use OpenTelemetry Collector to convert http/protobuf or http/json.
For Java/Node.js automation libraries, see .
references/opentelemetry-ingestion.md通过设置启用,然后配置你的应用:
ingest_otlp.enabled: true服务密钥凭证:
- - gRPC端点(hostname:443)
ingest-otlp-endpoint - - 客户端证书(PEM格式)
ingest-otlp-cert - - 私钥(PKCS#8格式)
ingest-otlp-key - - 服务器CA证书
server-ca
索引模式:
- - 日志
logs-otel-v1-* - - 指标
metrics-otel-v1-* - - 链路追踪
otel-v1-apm-span-* - - 服务地图
otel-v1-apm-service-map
注意: 仅支持gRPC协议。使用OpenTelemetry Collector转换http/protobuf或http/json格式。
如需Java/Node.js自动化库,请查看。
references/opentelemetry-ingestion.md4. JSON API
4. JSON API
Send logs via HTTP with mTLS:
bash
curl -X PUT "https://<ingest-endpoint>/v1/ingest" \
--cert client.crt --key client.key \
-H "Content-Type: application/json" \
-d '[{"msg": "log message", "date": "2025-01-15T10:30:00Z"}]'Index Pattern:
logs-json-*For Fluent Bit configuration, see .
references/json-api-ingestion.md通过HTTP和mTLS发送日志:
bash
curl -X PUT "https://<ingest-endpoint>/v1/ingest" \
--cert client.crt --key client.key \
-H "Content-Type: application/json" \
-d '[{"msg": "log message", "date": "2025-01-15T10:30:00Z"}]'索引模式:
logs-json-*如需Fluent Bit配置,请查看。
references/json-api-ingestion.mdCertificate Management
证书管理
Certificate Validity
证书有效期
- Default: 90 days
- Configurable: 1-180 days via in binding parameters
certValidityDays
- 默认:90天
- 可配置:通过绑定参数设置1-180天
certValidityDays
Root CA Rotation (3-Step Process)
根CA轮换(三步流程)
CAUTION: Not following this process causes ingestion interruption.
- Create new CA: Update instance with
"rotate_root_ca": true - Rebind all applications: Create new bindings for each shipping mechanism
- Delete old CA: Update instance with
"rotate_root_ca": false
注意: 不遵循此流程会导致采集中断。
- 创建新CA: 更新实例并设置
"rotate_root_ca": true - 重新绑定所有应用: 为每个采集机制创建新绑定
- 删除旧CA: 更新实例并设置
"rotate_root_ca": false
OpenSearch Dashboards
OpenSearch Dashboards
Access
访问
- Create service binding/key
- Navigate to from credentials
dashboards-url - Authenticate (SAML or basic auth)
- 创建服务绑定/密钥
- 从凭证中导航至
dashboards-url - 进行认证(SAML或基础认证)
Pre-built Dashboards
预构建仪表盘
- Cloud Foundry application performance
- Request latency and error rates
- Resource utilization metrics
- Cloud Foundry应用性能
- 请求延迟和错误率
- 资源利用率指标
Custom Dashboards & Alerting
自定义仪表盘与告警
- Create custom dashboards for specific analysis needs
- Configure alerting based on observability data
- Integrate with SAP Alert Notification for SAP BTP for advanced alerting workflows
- 创建自定义仪表盘以满足特定分析需求
- 基于可观测性数据配置告警
- 与SAP Alert Notification for SAP BTP集成以实现高级告警工作流
Index Patterns Summary
索引模式汇总
| Source | Index Pattern |
|---|---|
| CF Logs | |
| CF Metrics | |
| OTLP Logs | |
| OTLP Metrics | |
| OTLP Traces | |
| JSON API | |
| Kyma Apps | |
| Kyma Istio | |
Note: Attribute names use instead of due to OpenSearch/Lucene limitations.
@.| 来源 | 索引模式 |
|---|---|
| CF日志 | |
| CF指标 | |
| OTLP日志 | |
| OTLP指标 | |
| OTLP链路追踪 | |
| JSON API | |
| Kyma应用 | |
| Kyma Istio | |
注意: 由于OpenSearch/Lucene限制,属性名称使用而非。
@.Security Best Practices
安全最佳实践
Security Recommendations
安全建议
- BTP-CLS-0001: Configure SAML authentication with Identity Authentication Service (critical)
- BTP-CLS-0002: Rotate service keys regularly; deletion doesn't automatically invalidate credentials
- BTP-CLS-0003: Review Kyma runtime and JSON API security configuration
Note: Only BTP-CLS-0001 (critical level) is currently reported to SAP Cloud ALM. Other recommendations must be manually verified.
- BTP-CLS-0001: 配置基于Identity Authentication Service的SAML认证(关键)
- BTP-CLS-0002: 定期轮换服务密钥;删除密钥不会自动使凭证失效
- BTP-CLS-0003: 审核Kyma运行时和JSON API的安全配置
注意: 目前仅BTP-CLS-0001(关键级别)会上报至SAP Cloud ALM。其他建议需手动验证。
SAML Authentication Setup
SAML认证设置
- Create SAML 2.0 application in SAP Identity Authentication
- Configure "groups" attribute from Identity Directory
- Set Name ID Format to "E-mail"
- Enable request signing (recommended)
- Configure parameters in instance configuration
saml - The maps to
admin_grouproleall_access
See for detailed setup.
references/saml-authentication.md- 在SAP Identity Authentication中创建SAML 2.0应用
- 配置来自Identity Directory的"groups"属性
- 将Name ID格式设置为"E-mail"
- 启用请求签名(推荐)
- 在实例配置中设置参数
saml - 映射到
admin_group角色all_access
详细设置请查看。
references/saml-authentication.mdBackup & Recovery
备份与恢复
Automatic Backups
自动备份
Backed up: OpenSearch settings, roles, role mappings, tenants, groups, security configs, saved objects, ISM policies
Not backed up: Alerts
备份内容: OpenSearch设置、角色、角色映射、租户、组、安全配置、保存的对象、ISM策略
不备份内容: 告警
Restoration Process
恢复流程
Create SAP support ticket with component including:
BC-CP-CLS- Dashboard URL
- Instance configuration
- Deprovisioning timestamp
- Target restoration date (max 7 days)
- Owner information
- Business justification
创建组件为的SAP支持工单,包含以下信息:
BC-CP-CLS- 仪表盘URL
- 实例配置
- 注销时间戳
- 目标恢复日期(最长7天)
- 所有者信息
- 业务理由
Common Issues & Troubleshooting
常见问题与排查
Instance Creation Fails
实例创建失败
- Verify entitlement in subaccount
- Check service plan availability in region
- Validate JSON configuration syntax
- 验证子账户中的权限
- 检查服务套餐在对应区域的可用性
- 验证JSON配置语法
Ingestion Not Working
采集功能异常
- Verify binding credentials are current (check certificate expiry)
- For CF: Binding takes effect without restaging
- For OTLP: Ensure
ingest_otlp.enabled: true - Check network connectivity to ingest endpoint
- 验证绑定凭证是否有效(检查证书过期时间)
- 对于CF:绑定无需重启应用即可生效
- 对于OTLP:确保
ingest_otlp.enabled: true - 检查与采集端点的网络连通性
Dashboard Access Issues
仪表盘访问问题
- Verify SAML configuration if enabled
- Check user is in configured admin group
- Validate IdP metadata URL accessibility
- 若启用SAML,验证SAML配置
- 检查用户是否在配置的管理员组中
- 验证IdP元数据URL是否可访问
Certificate Expiration
证书过期
- Default validity: 90 days
- Create new binding before expiration
- Consider root CA rotation if widespread
- 默认有效期:90天
- 在过期前创建新绑定
- 若涉及范围广,考虑根CA轮换
Reference Files
参考文件
For detailed information, see bundled reference files:
如需详细信息,请查看配套参考文件:
Configuration & Setup
配置与设置
- (183 lines) - Service plans comparison and capacity planning
references/service-plans.md - (270 lines) - Complete parameter reference with examples
references/configuration-parameters.md
- (183行)- 服务套餐对比与容量规划
references/service-plans.md - (270行)- 完整参数参考及示例
references/configuration-parameters.md
Ingestion Methods
采集方式
- (211 lines) - Cloud Foundry ingestion details
references/cf-ingestion.md - (293 lines) - Kyma runtime integration
references/kyma-ingestion.md - (363 lines) - OTLP setup with Java/Node.js automation
references/opentelemetry-ingestion.md - (435 lines) - JSON API and Fluent Bit configuration
references/json-api-ingestion.md
- (211行)- Cloud Foundry采集详情
references/cf-ingestion.md - (293行)- Kyma运行时集成
references/kyma-ingestion.md - (363行)- OTLP与Java/Node.js自动化设置
references/opentelemetry-ingestion.md - (435行)- JSON API与Fluent Bit配置
references/json-api-ingestion.md
Security & Authentication
安全与认证
- (329 lines) - SAML setup with Identity Authentication Service
references/saml-authentication.md
- (329行)- 基于Identity Authentication Service的SAML设置
references/saml-authentication.md
Documentation Links
文档链接
Official Sources
官方来源
- GitHub Docs: https://github.com/SAP-docs/btp-cloud-logging
- SAP Help Portal: https://help.sap.com/docs/cloud-logging
- Discovery Center: https://discovery-center.cloud.sap/serviceCatalog/cloud-logging
- Capacity Estimator: Referenced in Discovery Center
- GitHub文档: https://github.com/SAP-docs/btp-cloud-logging
- SAP帮助门户: https://help.sap.com/docs/cloud-logging
- Discovery Center: https://discovery-center.cloud.sap/serviceCatalog/cloud-logging
- 容量估算工具: 详见Discovery Center
Bundled Resources
配套资源
Reference Documentation
参考文档
- - Cloud Foundry runtime ingestion guide
references/cf-ingestion.md - - Kyma/Cloud Foundry Kyma runtime ingestion
references/kyma-ingestion.md - - OpenTelemetry data ingestion
references/opentelemetry-ingestion.md - - JSON API ingestion methods
references/json-api-ingestion.md - - SAML authentication configuration
references/saml-authentication.md - - Service plans comparison and selection
references/service-plans.md
- - Cloud Foundry运行时采集指南
references/cf-ingestion.md - - Kyma/Cloud Foundry Kyma运行时采集
references/kyma-ingestion.md - - OpenTelemetry数据采集
references/opentelemetry-ingestion.md - - JSON API采集方式
references/json-api-ingestion.md - - SAML认证配置
references/saml-authentication.md - - 服务套餐对比与选择
references/service-plans.md
Related Documentation
相关文档
- OpenSearch: https://opensearch.org/docs/latest/
- SAP Cloud Identity Services: https://help.sap.com/docs/cloud-identity
- BTP Security Recommendations: https://help.sap.com/docs/btp/sap-btp-security-recommendations-c8a9bb59fe624f0981efa0eff2497d7d/sap-btp-security-recommendations
- OpenSearch: https://opensearch.org/docs/latest/
- SAP Cloud Identity Services: https://help.sap.com/docs/cloud-identity
- BTP安全建议: https://help.sap.com/docs/btp/sap-btp-security-recommendations-c8a9bb59fe624f0981efa0eff2497d7d/sap-btp-security-recommendations
Data Protection Notice
数据保护说明
SAP Cloud Logging is not designed for personal or business-critical data. Take measures to prevent transmission of such data. Data is stored regionally but physical data center locations may differ from consumption locations within the same region.
SAP Cloud Logging不适合存储个人数据或业务关键数据。请采取措施防止此类数据传输。数据按区域存储,但同一区域内的物理数据中心位置可能与消费位置不同。