eBPF Program Instance¶
Contains the eBPF Program Catalog instances installed in the Execution Environment.
Schema¶
Field |
Type |
Required |
Readonly |
Auto Managed |
Example |
---|---|---|---|---|---|
|
String |
True |
True |
False |
|
|
String |
True |
False |
False |
packet-counter |
|
String |
True |
True |
False |
mysql-server |
|
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
andexec_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
Authorization – JWT Authentication.
Content-Type – application/json
- Response Headers
Content-Type – application/json
- Status Codes
201 Created – eBPF program instances correctly created.
204 No Content – No content to create eBPF program instances based on the request.
400 Bad Request – Request not valid.
401 Unauthorized – Authentication failed.
406 Not Acceptable – Request validation failed.
415 Unsupported Media Type – Media type not supported.
422 Unprocessable Entity – Not possible to create ore or more eBPF program instances based on the request.
500 Internal Server Error – Server not available to satisfy the request.
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 withid
= “<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
Authorization – JWT Authentication.
Content-Type – application/json
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – All eBPF program instances correctly updated.
204 No Content – No content to update eBPF program instances based on the request.
304 Not Modified – Update for one or more eBPF program instances not necessary.
400 Bad Request – Request not valid.
401 Unauthorized – Authentication failed.
406 Not Acceptable – Request validation failed.
415 Unsupported Media Type – Media type not supported.
422 Unprocessable Entity – Not possible to update one or more eBPF program instances based on the request.
500 Internal Server Error – Server not available to satisfy the request.
This example set the
description
to “<human-readable-description>” of the eBPF program instance withid
= “<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
Authorization – JWT Authentication.
Content-Type – application/json
- Response Headers
Content-Type – application/json
- Status Codes
205 Reset Content – All eBPF program instances correctly deleted.
400 Bad Request – Request not valid.
401 Unauthorized – Authentication failed.
404 Not Found – eBPF program instances based on the request query not found.
406 Not Acceptable – Request validation failed.
415 Unsupported Media Type – Media type not supported.
422 Unprocessable Entity – Not possible to delete one or more eBPF program instances based on the request query.
500 Internal Server Error – Server not available to satisfy the request.
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.