Syslog Rules
User can create syslog rules with given attributes in their tenancy scope.
Notes
Users needs to be aware of the below properties of Syslog APIs
- Rules or Profiles uniqueness is defined by uniqueId.
- API endpoints need a uniqueId for reference.
- It’s recommended that users should not delete a profile associated with a single rule in the filter.
- Deleting profiles and rules are exclusive and are not dependent on each other.
- Only the rules within the same tenant can be associated with the profile.
List the created rules for given tenant
Path Parameters
- tenantId
Describes the clientId or mspId of tenant
Query Parameters
- action
Query based on action i..e INCLUDE or EXCLUDE rules
- Enum:
- includeexclude
- tags
Query/search the rules based on tags at each scope
- uuid
rule uuid
Responses
- results
- totalResults
- orderBy
- pageNo
- pageSize
- totalPages
- nextPage
- previousPageNo
- descendingOrder
Response Samples
{
"results": [
{
"name": "TEST_RULES_2_PR_LG-123",
"uuid": "dc7ae817-9fa4-4c4a-a401-6f7131a8c99d",
"ruleAction": "INCLUDE",
"pattern": "chrome",
"metricName": "Test3Partener2Metric10",
"alertSub": "TEST SUBJECT",
"alertDesc": "TEST SUBJECT",
"alertServerity": "Critical",
"tags": "test",
"additionalProperties": {
"component": "testing"
}
},
{
"name": "TEST_RULES_2_PR_LG",
"uuid": "5051fc52-5318-460f-94f7-f87d05957d74",
"ruleAction": "INCLUDE",
"pattern": "chrome",
"metricName": "Test3Partener2Metric10",
"alertSub": "TEST SUBJECT",
"alertDesc": "TEST SUBJECT",
"alertServerity": "Critical",
"tags": "test",
"additionalProperties": {
"component": "testing"
}
}
],
"totalResults": 2,
"orderBy": "id",
"pageNo": 1,
"pageSize": 100,
"totalPages": 1,
"nextPage": false,
"previousPageNo": 0,
"descendingOrder": true
}
Create config rule for given tenant
Path Parameters
- tenantId
Describes the clientId or mspId of tenant
Request Body
application/json
- name
Syslog rule name
- uuid
Rule uuid.(Not required while creating a rule)
- ruleAction
Include or exclude the expression rule while filtering syslog messages
- pattern
Filter pattern to filter syslog messages
- metricName
Custom metric name for the alert generated
- alertSub
Alert Subject
- alertDesc
Alert Description
- alertServerity
Alert Severity
- Enum:
- CriticalWarning
- tags
Group Tag name of the rule
- additionalProperties
Additional details for alerts. Eg Resource Component.
Request Body Samples
[
{
"name": "TEST_RULES_2_PR_LG-123",
"ruleAction": "INCLUDE",
"pattern": "chrome",
"metricName": "Test3Partener2Metric10",
"alertSub": "TEST SUBJECT",
"alertDesc": "TEST SUBJECT",
"alertServerity": "Critical",
"tags": "test",
"additionalProperties": {
"component": "testing"
}
},
{
"name": "TEST_RULES_2_PR_LG",
"ruleAction": "INCLUDE",
"pattern": "chrome",
"metricName": "Test3Partener2Metric10",
"alertSub": "TEST SUBJECT",
"alertDesc": "TEST SUBJECT",
"alertServerity": "Critical",
"tags": "test",
"additionalProperties": {
"component": "testing"
}
}
]
Responses
Response Samples
{
"createdList": [
{
"name": "TEST_RULES_2_PR_LG-123",
"uuid": "fc9d8f19-30b7-4bef-8b19-ca01b53e0d70"
},
{
"name": "TEST_RULES_3_PR_LG-124",
"uuid": "bc9d6f19-30b8-4bef-8b19-ca01b53e0d70"
}
],
"createdCount": 2
}