Skip to main content

Check out Port for yourself ➜ 

Komodor

Port's Komodor integration allows you to model Komodor resources in your software catalog and ingest data into them.

Overview

This integration allows you to map, organize, and sync your desired Komodor resources and their metadata in Port.

Supported resources

The resources that can be ingested from Komodor into Port are listed below:

Prerequisites

Generate a Komodor Api Key

  1. Log in to the Komodor platfrom.
  2. Access API Keys management page:
    • Click on your user profile in the top-right corner of the platform.
    • Select API Keys from the dropdown menu.
  3. Generate a new API key:
    • Click the Generate Key button.
    • Provide a descriptive name for the API key to help you identify its purpose later (e.g., "Port.io api key").
  4. Copy the token and save it in a secure location.

To read more, see the Komodor documentation.

API key permissions

Make sure the user who creates the API key has view permissions (ideally full access) for the resources you wish to ingest into Port, since the API key inherits the user's permissions.

Setup

Choose one of the following installation methods:
Not sure which method is right for your use case? Check the available installation methods.

  1. Go to the data source page in your portal.

  2. Under Select your installation method, choose Hosted by Port.

  3. Configure the Installation parameters and Advanced configuration as you wish (see below for details).

Installation parameters

Each integration requires specific parameters (such as an API token, a URL, etc.), as seen in Port's UI when installing it. Hover over the ⓘ icon next to each parameter to see more details about it.

Advanced configuration

  • During the installation process each integration may have additional settings under the Advanced configuration section in Port's UI.
    Additionally, each integration has one or more settings that can be configured after installation. To do so, click on the integration's name in the Data sources page and navigate to the Setting tab.
    Hover over the ⓘ icon next to each setting to see more details about it.

  • If the integration supports live events, the option to enable/disable them will be available in this section.

    Currently, live events are not supported for this integration.
    Resyncs will be performed periodically (with a configurable interval), or manually triggered by you via Port's UI.

    Therefore, real-time events (including GitOps) will not be ingested into Port immediately.
    Live events support for this integration is WIP and will be supported in the near future.

Port secrets

Some integration settings require sensitive pieces of data, such as tokens. For these settings, Port secrets will be used, ensuring that your sensitive data is encrypted and secure.

When filling in such a setting, its value will be obscured (shown as ••••••••). For each such setting, Port will automatically create a secret in your organization.

To see all secrets in your organization, follow these steps.

Limitations

  • The maximum time for a full sync to run is based on the configured resync interval. For very large amounts of data where a resync operation is expected to take longer, please use a longer interval.

Port source IP addresses

When using this installation method, Port will make outbound calls to your 3rd-party applications from static IP addresses. You may need to add these addresses to your allowlist, in order to allow Port to interact with the integrated service:

  • Europe (EU): 54.73.167.226, 63.33.143.237, 54.76.185.219
  • United States (US): 3.234.37.33, 54.225.172.136, 3.225.234.99

Configuration

Port integrations use a YAML mapping block to ingest data from Komodor's API into Port.

The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.

Default mapping configuration

This is the default mapping configuration you get after installing the Komodor integration.

Default mapping configuration (Click to expand)

deleteDependentEntities: true
createMissingRelatedEntities: false
enableMergeEntity: true
resources:
- kind: komodorService
selector:
query: 'true'
port:
entity:
mappings:
identifier: .kind + "-" + .cluster + "-" + .namespace + "-" + .service
title: .service
blueprint: '"komodorService"'
properties:
service_id: .uid
status: .status
cluster_name: .cluster
workload_kind: .kind
namespace_name: .namespace
service_name: .service
komodor_link: .link + "&utmSource=port"
labels: .labels
last_deploy_at: .lastDeploy.endTime | todate
last_deploy_status: .lastDeploy.status
- kind: komodorHealthMonitoring
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .komodorUid | gsub("\\|"; "-") | sub("-+$"; "")
blueprint: '"komodorHealthMonitoring"'
properties:
status: .status
resource_identifier: .komodorUid | gsub("\\|"; "-") | sub("-+$"; "")
severity: .severity
supporting_data: .supportingData
komodor_link: .link + "&utmSource=port"
created_at: .createdAt | todate
last_evaluated_at: .lastEvaluatedAt | todate
check_type: .checkType
workload_type: .komodorUid | split("|") | .[0]
cluster_name: .komodorUid | split("|") | .[1]
namespace_name: .komodorUid | split("|") | .[2]
workload_name: .komodorUid | split("|") | .[3]
- kind: komodorHealthMonitoring
selector:
query: ( .komodorUid | split("|") as $parts | (length == 4 and all($parts[]; length > 0)) )
port:
entity:
mappings:
identifier: .id
title: .komodorUid | gsub("\\|"; "-") | sub("-+$"; "")
blueprint: '"komodorHealthMonitoring"'
properties: {}
relations:
service: .komodorUid | gsub("\\|"; "-")

Monitoring and sync status

To learn more about how to monitor and check the sync status of your integration, see the relevant documentation.

Examples

Examples of blueprints and the relevant integration configurations:

Services

Service Blueprint
{
"identifier": "komodorService",
"title": "Komodor Service",
"icon": "Komodor",
"schema": {
"properties": {
"status": {
"type": "string",
"title": "Status",
"enum": [
"healthy",
"unhealthy"
],
"enumColors": {
"healthy": "green",
"unhealthy": "red"
}
},
"cluster_name": {
"icon": "Cluster",
"type": "string",
"title": "Cluster"
},
"workload_kind": {
"icon": "Deployment",
"type": "string",
"title": "Kind"
},
"service_name": {
"icon": "DefaultProperty",
"type": "string",
"title": "Service"
},
"namespace_name": {
"icon": "Environment",
"type": "string",
"title": "Namespace"
},
"last_deploy_at": {
"type": "string",
"title": "Last Deploy At",
"format": "date-time"
},
"komodor_link": {
"type": "string",
"title": "Komodor Link",
"format": "url",
"icon": "LinkOut"
},
"labels": {
"icon": "JsonEditor",
"type": "object",
"title": "Labels"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
Integration configuration
deleteDependentEntities: true
createMissingRelatedEntities: false
enableMergeEntity: true
resources:
- kind: komodorService
selector:
query: 'true'
port:
entity:
mappings:
identifier: .uid
title: .service
blueprint: '"komodorService"'
properties:
service_id: .uid
status: .status
cluster_name: .cluster
workload_kind: .kind
namespace_name: .namespace
service_name: .service
komodor_link: .link + "&utmSource=port"
labels: .labels
last_deploy_at: .lastDeploy.endTime | todate
last_deploy_status: .lastDeploy.status

Health Monitors

Health Monitor blueprint
{
"identifier": "komodorHealthMonitoring",
"title": "Komodor Health Monitoring",
"icon": "Komodor",
"schema": {
"properties": {
"supporting_data": {
"icon": "JsonEditor",
"type": "object",
"title": "Supporting Data"
},
"komodor_link": {
"icon": "LinkOut",
"type": "string",
"title": "Komodor Link",
"format": "url"
},
"severity": {
"type": "string",
"title": "Severity",
"enum": [
"high",
"medium",
"low"
],
"enumColors": {
"high": "red",
"medium": "orange",
"low": "yellow"
}
},
"created_at": {
"type": "string",
"title": "Created at",
"format": "date-time"
},
"last_evaluated_at": {
"icon": "Clock",
"type": "string",
"title": "Last Evaluated At",
"format": "date-time"
},
"check_type": {
"type": "string",
"title": "Check Type"
},
"status": {
"type": "string",
"title": "Status",
"enum": [
"open",
"confirmed",
"resolved",
"dismissed",
"ignored",
"manually_resolved"
],
"enumColors": {
"open": "red",
"confirmed": "turquoise",
"resolved": "green",
"dismissed": "purple",
"ignored": "darkGray",
"manually_resolved": "bronze"
}
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"service": {
"title": "Service",
"target": "komodorService",
"required": false,
"many": false
}
}
}
Integration configuration
deleteDependentEntities: true
createMissingRelatedEntities: false
enableMergeEntity: true
resources:
- kind: komodorHealthMonitoring
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .komodorUid | gsub("\\|"; "-") | sub("-+$"; "")
blueprint: '"komodorHealthMonitoring"'
properties:
status: .status
resource_identifier: .komodorUid | gsub("\\|"; "-") | sub("-+$"; "")
severity: .severity
supporting_data: .supportingData
komodor_link: .link + "&utmSource=port"
created_at: .createdAt | todate
last_evaluated_at: .lastEvaluatedAt | todate
check_type: .checkType
workload_type: .komodorUid | split("|") | .[0]
cluster_name: .komodorUid | split("|") | .[1]
namespace_name: .komodorUid | split("|") | .[2]
workload_name: .komodorUid | split("|") | .[3]
- kind: komodorHealthMonitoring
selector:
query: (.komodorUid | split("|") | length) == 4
port:
entity:
mappings:
identifier: .id
title: .komodorUid | gsub("\\|"; "-") | sub("-+$"; "")
blueprint: '"komodorHealthMonitoring"'
properties: {}
relations:
service: .komodorUid | gsub("\\|"; "-")

Let's Test It

This section includes a sample response data from Komodor. In addition, it includes the entity created from the resync event based on the Ocean configuration provided in the previous section.

Payload

Here is an example of the payload structure from Komodor. All variables are written in uppercase letters for improved readability:

Service response data
{
"data": {
"services": [
{
"annotations": {
"checksum/config": "CHECKSUM",
"deployment.kubernetes.io/revision": "1",
"meta.helm.sh/release-name": "komodor-agent",
"meta.helm.sh/release-namespace": "komodor"
},
"cluster": "test",
"kind": "Deployment",
"labels": {
"app.kubernetes.io/instance": "komodor-agent",
"app.kubernetes.io/managed-by": "Helm",
"app.kubernetes.io/name": "komodor-agent",
"app.kubernetes.io/version": "X.X.X",
"helm.sh/chart": "komodor-agent-X.X.X"
},
"lastDeploy": {
"endTime": 1740140297,
"startTime": 1740140297,
"status": "success"
},
"link": "https://app.komodor.com/services/ACCOUNT.CLUSTER.SERVICE?workspaceId=null&referer=public-api",
"namespace": "komodor",
"service": "komodor-agent",
"status": "healthy",
"uid": "INTERNAL_KOMODOR_UID"
}
]
},
"meta": {
"nextPage": 1,
"page": 0,
"pageSize": 1
}
}
Health Monitor response data
{
"checkType": "restartingContainers",
"createdAt": 1742447493,
"id": "RANDOM_UID",
"komodorUid": "WORKLOAD_KIND|CLUSTER_NAME|NAMESPACE_NAME|WORKLOAD_NAME",
"lastEvaluatedAt": 1743292800,
"link": "https://app.komodor.com/health/risks/drawer?checkCategory=workload-health&checkType=restartingContainers&violationId=78f44264-dbe1-4d0f-9096-9925f5e74ae8",
"severity": "medium",
"status": "open",
"supportingData": {
"restartingContainers": {
"containers": [
{
"name": "CONTAINER_NAME",
"restarts": 969
}
],
"restartReasons": {
"breakdown": [
{
"message": "Container Exited With Error - Exit Code: 1",
"percent": 100,
"numOccurences": 1825,
"reason": "ProcessExit"
}
],
"additionalInfo": {
"podSamples": [
{
"podName": "POD_NAME_1",
"restarts": 607
},
{
"podName": "POD_NAME_2",
"restarts": 170
},
{
"podName": "POD_NAME_3",
"restarts": 57
},
{
"podName": "POD_NAME_4",
"restarts": 53
},
{
"podName": "POD_NAME_5",
"restarts": 22
}
],
"numRestartsOnTimeseries": 909,
"numRestartsOnDB": 1825
}
}
}
}
}

Mapping Result

The combination of the sample payload and the Ocean configuration generates the following Port entities:

Service entity in Port
{
"identifier": "SERVICE_ID",
"title": "komodor-agent",
"blueprint": "komodorService",
"properties": {
"serviceId": "KOMODOR_INTERNAL_ID",
"status": "healthy",
"cluster_name": "test",
"workload_kind": "Deployment",
"namespace_name": "komodor",
"service_name": "komodor-agent",
"link_to_komodor": "https://app.komodor.com/services/ACCOUNT_NAME.CLUSTER.SERVICE?workspaceId=null&referer=public-api",
"labels": {
"app.kubernetes.io/instance": "komodor-agent",
"app.kubernetes.io/managed-by": "Helm",
"app.kubernetes.io/name": "komodor-agent",
"app.kubernetes.io/version": "X.X.X",
"helm.sh/chart": "komodor-agent-X.X.X"
},
"last_deploy_at": "2025-01-22T08:26:42Z",
"last_deploy_status": "success"
}
}
Health Monitor entity in Port
{
"identifier": "random-uuid",
"title": "KIND|CLUSTER|NAMESPACE|NAME",
"blueprint": "komodorHealthMonitoring",
"properties": {
"status": "open",
"resource_identifier": "KIND-CLUSTER-NAMESPACE-NAME",
"severity": "medium",
"supporting_data": {
"restartingContainers": {
"containers": [
{
"name": "container-name",
"restarts": 969
}
],
"restartReasons": {
"breakdown": [
{
"message": "Container Exited With Error - Exit Code: 1",
"percent": 100,
"numOccurences": 1825,
"reason": "ProcessExit"
}
],
"additionalInfo": {
"podSamples": [
{
"podName": "POD_NAME_1",
"restarts": 607
},
{
"podName": "POD_NAME_2",
"restarts": 170
},
{
"podName": "POD_NAME_3",
"restarts": 57
},
{
"podName": "POD_NAME_4",
"restarts": 53
},
{
"podName": "POD_NAME_5",
"restarts": 22
}
],
"numRestartsOnTimeseries": 909,
"numRestartsOnDB": 1825
}
}
}
},
"komodor_link": "https://app.komodor.com/health/risks/drawer?checkCategory=workload-health&checkType=restartingContainers&violationId=UID&utmSource=port",
"created_at": "2025-03-20T05:11:33Z",
"last_evaluated_at": "2025-03-30T00:00:00Z",
"check_type": "restartingContainers",
"workload_type": "WORKLOAD_KIND",
"cluster_name": "CLUSTER_NAME",
"namespace_name": "NAMESPACE_NAME",
"workload_name": "NAME"
},
"relations": {
"service": [
"ServiceUID"
]
}
}

Connect Komodor services to k8s workloads

Prerequisites

  • Install Komodor integration.
  • Install Port's k8s exporter integration on your cluster.
  • Install Komodor agent on your cluster.

Create the relation

  1. Navigate to the data model page of your portal.

  2. Click on the Komodor Service blueprint.

  3. Click on the ... button in the top right corner, choose Edit blueprint, then click on the Edit JSON button.

  4. Update the existing JSON by incorporating the following data in it.

    Mapping configuration (Click to expand)
    {
    "relations": {
    "workload": {
    "title": "Workload",
    "target": "workload",
    "required": false,
    "many": false
    }
    }
    }

Set up mapping configuration

  1. Navigate to the data sources page of your portal.

  2. Click on the Komodor integration, and scroll to the mapping section in the bottom-left corner.

  3. Copy the following configuration and paste it in the editor, then click Save & Resync.

    Mapping configuration (Click to expand)
      - kind: komodorService
    selector:
    query: 'true'
    port:
    entity:
    mappings:
    identifier: .kind + "-" + .cluster + "-" + .namespace + "-" + .service
    blueprint: '"komodorService"'
    properties: {}
    relations:
    workload: .service + "-" + .kind + "-" + .namespace + "-" + .cluster
Default values

This assumes that both your Komodor integration and Kubernetes exporter are using their default key and field values. If any mappings or blueprints have been modified in either integration, you may need to adjust these values accordingly.