eBPF Program Instance

Contains the eBPF Program Catalog instances installed in the Execution Environment.

Schema

Field

Type

Required

Readonly

Auto Managed

Example

id

String

True

True

False

packet-counter@mysql-server

ebpf_program_catalog_id

String

True

False

False

packet-counter

exec_env_id

String

True

True

False

mysql-server

description

String

False

False

False

Collect system metrics from Apache HTTP Web Server.

Warning

  • It is not possible to update readonly fields.

  • it is not possible to set the Auto managed fields.

Note

  • id is required but it is auto-generated if not provided.

    It is recommended to provide a friendly for simplify the retrieve of connected date in other indices. A common syntax is to use ebpf_program_catalog_id and exec_env_id concatenated with = ‘@’.

  • ebpf_program_catalog_id should be one of those stored in eBPF Program Catalog index.

  • exec_env_id should be one of those stored in Execution Environment index.

Create

To create a new eBPF program instance use the following REST call:

POST /instance/ebpfprogrem/(string: id)

with the request body in JSON format:

POST /instance/ebpf-program HTTP/1.1
Host: cb-manager.example.com
Content-Type: application/json

{
    "id": "<ebpf-program-instance-id>",
    "ebpf_program_catalog_id": "<ebpf-program-id>",
    "exec_env_id": "<exec-env-id>"
}
Parameters
  • id – optional eBPF program instance id.

Request Headers
Response Headers
Status Codes

Replace the data with the correct values, for example <ebpf-program-instance-id> with “packet-counter@mysql-server”.

If the creation is correctly executed the response is:

HTTP/1.1 201 Created
Content-Type: application/json

[
    {
        "status": "Created",
        "code": 201,
        "error": false,
        "message": "eBPF program instance with id=<ebpf-program-instance-id> correctly created"
    }
]

Otherwise, if, for example, an eBPF program instance with the given id is already found, this is the response:

HTTP/1.1 406 Not Acceptable
Content-Type: application/json

[
    {
        "status": "Not Acceptable",
        "code": 406,
        "error": true,
        "message": "Id already found"
    }
]

If some required data is missing (for example exec_env_id), the response could be:

HTTP/1.1 406 Not Acceptable
Content-Type: application/json

[
    {
        "status": "Not Acceptable",
        "code": 406,
        "error": true,
        "message": {
            "exec_env_id": "required"
        }
    }
]

Read

To get the list of the eBPF program instances:

GET /instance/ebpf-program/(string: id)

The response includes all the eBPF program instances.

It is possible to filter the results using the following request body:

GET /instance/ebpf-program HTTP/1.1
Host: cb-manager.example.com
Content-Type: application/json

{
    "select": [ "exec_env_id" ],
    "where": {
        "equals": {
            "target:" "id",
            "expr": "<ebpf-program-instance-id>"
        }
    }
}

In this way, it will be returned only the exec_env_id of the eBPF program instance with id = “<ebpf-program-instance-id>”.

Update

To update an eBPF program instance, use:

PUT /instance/ebpf-program/(string: id)
PUT /instance/ebpf-program HTTP/1.1
Host: cb-manager.example.com
Content-Type: application/json

{
    "id": "<epbf-program-instance-id>",
    "description": "<human-readable-description>"
}
Parameters
  • id – optional eBPF program instance id.

Request Headers
Response Headers
Status Codes

This example set the description to “<human-readable-description>” of the eBPF program instance with id = “<ebpf-program-instance-id>”.

A possible response is:

HTTP/1.1 200 OK
Content-Type: application/json

[
    {
        "status": "OK",
        "code": 200,
        "error": false,
        "message": "eBPF program instance with id=<ebpf-program-instance-id> correctly updated"
    }
]

Instead, if the are not changes the response is:

HTTP/1.1 304 Not Modified
Content-Type: application/json

[
    {
        "status": "Not Modified",
        "code": 304,
        "error": false,
        "message": "Update for eBPF program instance with id=<ebpf-program-instance-id> not necessary"
    }
]

Delete

To delete eBPF program instances, use:

DELETE /instance/ebpf-program/(string: id)
DELETE /instance/ebpf-program HTTP/1.1
Host: cb-manager.example.com
Content-Type: application/json

{
    "where": {
        "equals": {
            "target:" "id",
            "expr": "<ebpf-program-instance-id>"
        }
    }
}
Parameters
  • id – optional eBPF program instance id.

Request Headers
Response Headers
Status Codes

This request removes the eBPF program instance with id = “<ebpf-program-instance-id>”.

This is a possible response:

HTTP/1.1 205 Reset Content
Content-Type: application/json

[
    {
        "status": "Reset Content",
        "code": 200,
        "error": false,
        "message": "eBPF program instance the id=<ebpf-program-instance-id> correctly deleted"
    }
]

Caution

Without request body, it removes all the eBPF program instances.