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

  • tenantIdstringrequired

    Describes the clientId or mspId of tenant

Query Parameters

  • actionstring

    Query based on action i..e INCLUDE or EXCLUDE rules

    Enum:
    includeexclude
  • tagsstring

    Query/search the rules based on tags at each scope

  • uuidstring

    rule uuid

Responses

  • resultsarray

  • totalResultsinteger

  • orderBystring

  • pageNointeger

  • pageSizeinteger

  • totalPagesinteger

  • nextPageboolean

  • previousPageNointeger

  • descendingOrderboolean

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

  • tenantIdstringrequired

    Describes the clientId or mspId of tenant

Request Body

application/json

  • namestring

    Syslog rule name

  • uuidstring

    Rule uuid.(Not required while creating a rule)

  • ruleActionstring

    Include or exclude the expression rule while filtering syslog messages

  • patternstring

    Filter pattern to filter syslog messages

  • metricNamestring

    Custom metric name for the alert generated

  • alertSubstring

    Alert Subject

  • alertDescstring

    Alert Description

  • alertServeritystring

    Alert Severity

    Enum:
    CriticalWarning
  • tagsstring

    Group Tag name of the rule

  • additionalPropertiesobject

    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
}