Configure Label Packages with Search Labels
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:
Create a Label Package
Execute the LabelPackages - Create API with the required parameters.
Create a Search Label
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.
Sample API Requests and Responses for Configuring a Label Package using Search Label
Create a Label Package
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" } }
Create a Search Label
Execute the LabelPackages - List API.
Execute the SearchLabel - Create API.
This step successfully creates a search label and adds it to a label package.
Was this helpful?