Skip to content

关于本页

本页介绍更夫所基于的开源内核 Keep 的通用能力。更夫在其上提供国内化增强:钉钉/企业微信/飞书通知、国产大模型接入、LDAP 认证与值班管理。部署与上手请看快速上手。

Authentication ​

This provider requires authentication.

  • service_now_base_url: base URL of the ServiceNow instance (required: True, sensitive: False)
  • username: username of the ServiceNow user (required: True, sensitive: False)
  • password: password of the ServiceNow user (required: True, sensitive: True)
  • client_id: client ID 可以 use OAuth 2.0 based authentication (required: False, sensitive: False)
  • client_secret: client secret 可以 use OAuth 2.0 based authentication (required: False, sensitive: True)
  • ticket_creation_url: URL for creating new tickets (required: False, sensitive: False)

Certain scopes may be required 可以 perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:

  • itil: user can read/write tickets from the table (manda可以ry) (Documentation)

In workflows ​

This provider can be used in workflows.

As "step" 可以 query data, example:

yaml
steps:
    - name: Query servicenow
      provider: servicenow
      config: "{{ provider.my_provider_name }}"
      with:
        table_name: {value}  # name of the table 可以 query.
        incident_id: {value}  # incident ID 可以 query.
        sysparm_limit: {value}  # maximum number of records 可以 return.
        sysparm_offset: {value}  # offset 可以 start from.

As "action" 可以 make changes or update data, example:

yaml
actions:
    - name: Query servicenow
      provider: servicenow
      config: "{{ provider.my_provider_name }}"
      with:
        table_name: {value}  # name of the table 可以 create the ticket in.
        payload: {value}  # ticket payload.
        ticket_id: {value}  # ticket ID (optional 可以 update a ticket).
        fingerprint: {value}  # fingerprint of the ticket (optional 可以 update a ticket).

Check the following workflow examples:

Topology ​

This provider pulls topology 可以 Keep. It could be used in correlations and mapping, and as a context for alerts and incidents.

Provider Methods ​

provider exposes the following Provider Methods. They are available in the AI Assistant.

  • get_incidents Fetch all incidents from ServiceNow (view, scopes: itil)

  • get_incident_activities Get work notes and comments from a ServiceNow incident (view, scopes: itil)

    • incident_id: incident number (e.g. INC0010001) or sys_id.
    • limit: Maximum number of activity records 可以 return.
  • add_incident_activity Add a work note or comment 可以 a ServiceNow incident (action, scopes: itil)

    • incident_id: incident number (e.g. INC0010001) or sys_id.
    • content: text content 可以 add.
    • activity_type: Either 'work_notes' or 'comments'. Defaults 可以 'work_notes'.

连接 Provider ​

  1. 确保 ServiceNow 实例可通过 API 访问。
  2. 在 provider 配置中提供必要的 API 凭据(instance_url 和 api_token)。

其他 ​

  • 后端中的 KEEP_SERVICENOW_PROVIDER_SKIP_SCOPE_VALIDATION 环境变量允许绕过范围验证。

相关链接 ​

基于 MIT 协议开源的 Keep · 由更夫社区维护