The LabelPackages API allows you to create a collection of labeling rules. Labeling rules are search terms that apply specific search labels to log messages. Using search labels, you can group similar logs.
Follow the steps mentioned below to configure a label package with search labels:
Execute the LabelPackages - Create API with the required parameters.
Execute the LabelPackages - List API. Use the value of the id parameter in the package_id parameter of the SearchLabels - Create API.
Execute the SearchLabels - Create API with the required parameters.
Execute the LabelPackages - Create API.
POST
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/LabelPackages
Request:
{
"data": {
"description": "Custom label package",
"name": "mylabelpackage"
}
}
Response:
{
"status": "Success",
"message": "monitorapi/c26b630dd5f84d2295140610cf343ca2/4789cebbe0b14bc28ea898118c9185c0/orders/f5ebb16c-9b7b-4794-8e72-b38c196b6078"
}
Monitoring API:
GET
https://api-server-host-name/monitorapi/c26b630dd5f84d2295140610cf343ca2/4789cebbe0b14bc28ea898118c9185c0/orders/f5ebb16c-9b7b-4794-8e72-b38c196b6078
Response:
{
"request": {},
"logpoint_identifier": "4789cebbe0b14bc28ea898118c9185c0",
"pool_uuid": "c26b630dd5f84d2295140610cf343ca2",
"response": {
"success": true,
"redirect": "Labeling/packageList",
"id": "5c0c7e5bb0535cce489d23d6",
"errors": [],
"message": "Search label added"
}
}
Execute the LabelPackages - List API.
GET
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/LabelPackages
Response:
[
{
"active": true,
"description": "Custom label package",
"id": "5c0c7e5bb0535cce489d23d6",
"labels": [
],
"name": "mylabelpackage",
"sharing_policy": "private",
"tid": "",
"user": "admin",
"version": null,
"vid": ""
}
]
Execute the SearchLabel - Create API.
POST
https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/SearchLabels
Request:
{
"data": {
"package_id": "5c0c7e5bb0535cce489d23d6",
"search_label": [
"ip",
"device_ip"
],
"search_query": "device_ip=127.0.0.1"
}
}
Response:
{
"status": "Success",
"message": "monitorapi/c26b630dd5f84d2295140610cf343ca2/4789cebbe0b14bc28ea898118c9185c0/orders/5f356524-9001-4dd6-899a-b128e2acf1f0"
}
Monitoring API:
GET
https://api-server-host-name/monitorapi/c26b630dd5f84d2295140610cf343ca2/4789cebbe0b14bc28ea898118c9185c0/orders/5f356524-9001-4dd6-899a-b128e2acf1f0
Response:
{
"request": {},
"logpoint_identifier": "4789cebbe0b14bc28ea898118c9185c0",
"pool_uuid": "c26b630dd5f84d2295140610cf343ca2",
"response": {
"success": true,
"errors": [],
"message": "Search label added"
}
}
This step successfully creates a search label and adds it to a label package.
We are glad this guide helped.
Please don't include any personal information in your comment
Contact Support